/* =========================================================
   Reusable App Layout System
   ========================================================= */

:root {
	--app-bg: #f3f7fb;
	--app-surface: #ffffff;
	--app-text: #0f1f35;
	--app-muted: #405575;
	--app-soft: #71829c;
	--app-border: #dbe5f0;
	--app-border-strong: #cbd8e6;

	--app-navy: #0b2138;
	--app-navy-2: #102b46;
	--app-teal: #007c78;
	--app-orange: #f59e0b;
	--app-red: #dc2626;
	--app-green: #16a34a;

	--app-radius-lg: 18px;
	--app-radius-md: 14px;
	--app-shadow: 0 16px 35px rgba(15, 31, 53, .08);
}

body {
	background: var(--app-bg);
	color: var(--app-text);
}

/* Page wrapper */

.app-page {
	padding: 24px;
}

.app-page-inner {
	max-width: 1600px;
	margin: 0 auto;
}

/* Page header */

.app-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
}

.app-page-kicker,
.app-kicker {
	margin-bottom: 8px;
	color: var(--app-teal);
	font-size: .76rem;
	font-weight: 950;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.app-page-title {
	margin: 0;
	color: var(--app-text);
	font-size: clamp(1.75rem, 3vw, 2.4rem);
	line-height: 1;
	font-weight: 950;
	letter-spacing: -.045em;
}

.app-page-subtitle {
	margin: 10px 0 0;
	max-width: 72ch;
	color: var(--app-muted);
	font-size: .98rem;
	font-weight: 650;
	line-height: 1.5;
}

.app-page-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

/* Buttons */

.app-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: .65rem 1rem;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: .9rem;
	font-weight: 900;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition:
		background .15s ease,
		border-color .15s ease,
		color .15s ease,
		transform .15s ease,
		box-shadow .15s ease;
}

.app-btn:hover {
	transform: translateY(-1px);
	text-decoration: none;
}

.app-btn-primary {
	background: #111827;
	border-color: #111827;
	color: #ffffff;
	box-shadow: 0 10px 20px rgba(17, 24, 39, .12);
}

.app-btn-primary:hover {
	background: #000000;
	border-color: #000000;
	color: #ffffff;
}

.app-btn-outline {
	background: #ffffff;
	border-color: #111827;
	color: #111827;
}

.app-btn-outline:hover {
	background: #111827;
	color: #ffffff;
}

.app-btn-muted {
	background: #ffffff;
	border-color: var(--app-border-strong);
	color: var(--app-text);
}

.app-btn-muted:hover {
	background: #f8fafc;
	color: var(--app-text);
}

/* Metric cards */

.app-metric-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 22px;
}

.app-metric-card {
	position: relative;
	overflow: hidden;
	min-height: 116px;
	padding: 20px;
	border-radius: var(--app-radius-lg);
	background: var(--app-surface);
	border: 1px solid var(--app-border);
	box-shadow: 0 8px 22px rgba(15, 31, 53, .04);
}

.app-metric-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	bottom: 14px;
	width: 4px;
	border-radius: 999px;
	background: var(--app-navy);
}

.app-metric-card.is-teal::before {
	background: var(--app-teal);
}

.app-metric-card.is-orange::before {
	background: var(--app-orange);
}

.app-metric-card.is-red::before {
	background: var(--app-red);
}

.app-metric-label {
	margin-bottom: 9px;
	color: #60718f;
	font-size: .76rem;
	font-weight: 950;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.app-metric-value {
	color: var(--app-text);
	font-size: 2rem;
	line-height: 1;
	font-weight: 950;
	letter-spacing: -.04em;
}

.app-metric-help {
	margin-top: 10px;
	color: var(--app-muted);
	font-size: .86rem;
	font-weight: 650;
}

/* General cards */

.app-card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.app-card {
	padding: 24px;
	border-radius: var(--app-radius-lg);
	background: var(--app-surface);
	border: 1px solid var(--app-border);
	box-shadow: 0 8px 22px rgba(15, 31, 53, .04);
}

.app-card-kicker {
	margin-bottom: 8px;
	color: var(--app-teal);
	font-size: .74rem;
	font-weight: 950;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.app-card-kicker.is-orange {
	color: #c2410c;
}

.app-card-kicker.is-red {
	color: var(--app-red);
}

.app-card-title {
	margin: 0;
	color: var(--app-text);
	font-size: 1.35rem;
	line-height: 1.15;
	font-weight: 950;
	letter-spacing: -.035em;
}

.app-card-text {
	margin: 10px 0 18px;
	color: var(--app-muted);
	font-size: .95rem;
	font-weight: 650;
	line-height: 1.55;
}

/* Generic badges */

.app-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-height: 28px;
	padding: 5px 10px;
	border-radius: 999px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .74rem;
	font-weight: 900;
}

.app-badge.is-soon {
	background: #eef3f8;
	color: #66758d;
}

/* Responsive */

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

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

@media (max-width: 760px) {
	.app-page {
		padding: 16px;
	}

	.app-page-header {
		flex-direction: column;
	}

	.app-page-actions {
		justify-content: flex-start;
		width: 100%;
	}

	.app-page-actions .app-btn {
		flex: 1;
	}

	.app-metric-grid {
		grid-template-columns: 1fr;
	}

	.app-card {
		padding: 20px;
	}
}

:root {
	--auth-navy: #0d253f;
	--auth-navy-dark: #071b2f;
	--auth-navy-soft: #20384f;
	--auth-panel-bg: #f6f8fb;
	--auth-card-bg: #ffffff;
	--auth-text: #111827;
	--auth-muted: #64748b;
	--auth-border: #e5eaf1;
	--auth-border-strong: #d9e1ec;
	--auth-teal: #0f766e;
	--auth-teal-soft: #e6f7f5;
	--auth-danger-bg: #fff1f2;
	--auth-danger-border: #fecdd3;
	--auth-danger-text: #b42318;
	--auth-info-bg: #eff6ff;
	--auth-info-border: #bfdbfe;
	--auth-info-text: #1d4ed8;
	--auth-radius-lg: 24px;
	--auth-radius-md: 14px;
	--auth-shadow: 0 24px 60px rgba(15, 23, 42, .16);
}

.auth-body {
	min-height: 100vh;
	margin: 0;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--auth-text);
	background: var(--auth-panel-bg);
}

.login-page {
	min-height: 100vh;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 420px;
	background: var(--auth-panel-bg);
}

.login-hero {
	position: relative;
	overflow: hidden;
	min-height: 100vh;
	padding: 40px;
	background:
		radial-gradient(circle at 94% 6%, rgba(255, 255, 255, .12) 0 0, transparent 270px),
		radial-gradient(circle at 3% 100%, rgba(15, 118, 110, .35) 0 0, transparent 140px),
		linear-gradient(135deg, var(--auth-navy-dark), var(--auth-navy));
	color: #ffffff;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
}

.login-brand {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 12px;
}

.login-brand-mark {
	width: 42px;
	height: 42px;
	border-radius: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	color: var(--auth-navy);
	font-size: 1.15rem;
	box-shadow: 0 14px 30px rgba(0, 0, 0, .14);
}

.login-brand-title {
	font-size: .98rem;
	font-weight: 900;
	letter-spacing: -.02em;
	line-height: 1.1;
}

.login-brand-subtitle {
	margin-top: 3px;
	font-size: .78rem;
	font-weight: 650;
	color: rgba(255, 255, 255, .68);
}

.login-hero-content {
	position: relative;
	z-index: 1;
	max-width: 620px;
	margin-top: -80px;
}

.login-kicker {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 8px 12px;
	margin-bottom: 22px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .10);
	border: 1px solid rgba(255, 255, 255, .15);
	color: rgba(255, 255, 255, .82);
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .72rem;
	font-weight: 900;
}

.login-hero h1 {
	margin: 0;
	max-width: 13ch;
	font-size: clamp(2.7rem, 5vw, 4.35rem);
	line-height: .95;
	font-weight: 950;
	letter-spacing: -.065em;
}

.login-hero p {
	margin: 24px 0 0;
	max-width: 55ch;
	color: rgba(255, 255, 255, .72);
	font-size: 1.02rem;
	font-weight: 650;
	line-height: 1.55;
}

.login-feature-row {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.login-feature-card {
	min-height: 76px;
	padding: 15px 16px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .075);
	border: 1px solid rgba(255, 255, 255, .12);
	backdrop-filter: blur(10px);
}

.login-feature-card strong {
	display: block;
	margin-bottom: 5px;
	color: #ffffff;
	font-size: .9rem;
	font-weight: 900;
}

.login-feature-card span {
	display: block;
	color: rgba(255, 255, 255, .62);
	font-size: .78rem;
	font-weight: 650;
	line-height: 1.4;
}

.login-panel {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	background:
		radial-gradient(circle at 62% 10%, rgba(215, 191, 163, .22), transparent 220px),
		linear-gradient(180deg, #fbfaf8 0%, #f4f7fb 100%);
}

.login-card {
	width: 100%;
	max-width: 360px;
	padding: 28px;
	border-radius: var(--auth-radius-lg);
	background: var(--auth-card-bg);
	border: 1px solid var(--auth-border);
	box-shadow: var(--auth-shadow);
}

.login-card-heading {
	margin-bottom: 22px;
}

.login-card-kicker {
	margin-bottom: 8px;
	color: var(--auth-teal);
	font-size: .72rem;
	font-weight: 950;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.login-card h2 {
	margin: 0;
	color: #111827;
	font-size: 1.85rem;
	line-height: 1.05;
	font-weight: 950;
	letter-spacing: -.04em;
}

.login-card p {
	margin: 9px 0 0;
	color: var(--auth-muted);
	font-size: .92rem;
	font-weight: 650;
	line-height: 1.45;
}

.auth-alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 16px;
	padding: 12px 13px;
	border-radius: 14px;
	border: 1px solid transparent;
	font-size: .84rem;
	font-weight: 700;
	line-height: 1.4;
}

.auth-alert-info {
	background: var(--auth-info-bg);
	border-color: var(--auth-info-border);
	color: var(--auth-info-text);
}

.auth-alert-danger {
	background: var(--auth-danger-bg);
	border-color: var(--auth-danger-border);
	color: var(--auth-danger-text);
}

.auth-field {
	margin-bottom: 15px;
}

.auth-field label {
	display: block;
	margin-bottom: 7px;
	color: #172033;
	font-size: .82rem;
	font-weight: 900;
}

.auth-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.auth-input-wrap input {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px 12px 48px;
	border-radius: var(--auth-radius-md);
	border: 1px solid var(--auth-border-strong);
	background: #ffffff;
	color: var(--auth-text);
	font-size: .92rem;
	font-weight: 700;
	outline: none;
	transition:
		border-color .16s ease,
		box-shadow .16s ease,
		background .16s ease;
}

.auth-input-wrap input::placeholder {
	color: #94a3b8;
	font-weight: 750;
}

.auth-input-wrap input:focus {
	border-color: rgba(15, 118, 110, .55);
	box-shadow: 0 0 0 4px rgba(15, 118, 110, .10);
	background: #ffffff;
}

.auth-input-icon {
	position: absolute;
	left: 13px;
	width: 25px;
	height: 25px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef5f8;
	color: #52677a;
	font-size: .86rem;
	pointer-events: none;
	z-index: 1;
}

.auth-password-toggle {
	position: absolute;
	right: 8px;
	border: 0;
	background: transparent;
	color: var(--auth-muted);
	font-size: .78rem;
	font-weight: 900;
	padding: 7px 8px;
	border-radius: 9px;
	z-index: 2;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
	color: var(--auth-teal);
	background: var(--auth-teal-soft);
	outline: none;
}

.auth-input-wrap input[type="password"],
.auth-input-wrap input[type="text"] {
	padding-right: 66px;
}

.caps-warning {
	display: none;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	color: #9a6700;
	font-size: .78rem;
	font-weight: 800;
}

.caps-warning.is-visible {
	display: flex;
}

.auth-options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 2px 0 18px;
	flex-wrap: wrap;
}

.auth-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: #334155;
	font-size: .82rem;
	font-weight: 800;
	cursor: pointer;
	user-select: none;
}

.auth-check input {
	width: 15px;
	height: 15px;
	accent-color: var(--auth-teal);
}

.auth-options a {
	color: #172033;
	font-size: .82rem;
	font-weight: 900;
	text-decoration: none;
}

.auth-options a:hover {
	color: var(--auth-teal);
	text-decoration: underline;
}

.auth-submit {
	width: 100%;
	min-height: 48px;
	border: 0;
	border-radius: var(--auth-radius-md);
	background: var(--auth-navy);
	color: #ffffff;
	font-size: .92rem;
	font-weight: 950;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	box-shadow: 0 16px 24px rgba(7, 27, 47, .18);
	transition:
		transform .16s ease,
		box-shadow .16s ease,
		background .16s ease;
}

.auth-submit:hover,
.auth-submit:focus {
	background: var(--auth-navy-dark);
	transform: translateY(-1px);
	box-shadow: 0 20px 30px rgba(7, 27, 47, .22);
	outline: none;
}

.auth-submit:disabled {
	opacity: .75;
	cursor: wait;
	transform: none;
}

.login-security-note {
	margin-top: 24px;
	padding: 14px;
	border-radius: 16px;
	border: 1px solid var(--auth-border);
	background: #f8fafc;
	display: flex;
	align-items: center;
	gap: 12px;
}

.login-security-icon {
	width: 34px;
	height: 34px;
	border-radius: 12px;
	background: var(--auth-teal-soft);
	color: var(--auth-teal);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.login-security-note strong {
	display: block;
	color: #172033;
	font-size: .82rem;
	font-weight: 950;
	line-height: 1.2;
}

.login-security-note span {
	display: block;
	margin-top: 3px;
	color: var(--auth-muted);
	font-size: .76rem;
	font-weight: 700;
	line-height: 1.35;
}

@media (max-width: 1100px) {
	.login-page {
		grid-template-columns: 1fr;
	}

	.login-hero {
		min-height: auto;
		padding: 32px;
	}

	.login-hero-content {
		margin-top: 40px;
		margin-bottom: 40px;
	}

	.login-panel {
		min-height: auto;
		padding: 32px;
	}
}

@media (max-width: 760px) {
	.login-hero {
		padding: 24px;
	}

	.login-hero h1 {
		font-size: 2.75rem;
	}

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

	.login-panel {
		padding: 20px;
	}

	.login-card {
		max-width: none;
		padding: 24px;
	}

	.auth-options {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 520px) {
	.login-hero-content {
		margin-top: 28px;
		margin-bottom: 28px;
	}

	.login-hero h1 {
		font-size: 2.25rem;
	}

	.login-hero p {
		font-size: .95rem;
	}

	.login-brand-title {
		font-size: .9rem;
	}

	.login-brand-subtitle {
		font-size: .72rem;
	}

	.login-card h2 {
		font-size: 1.65rem;
	}
}

.auth-return-link {
	margin-top: 18px;
	text-align: center;
}

.auth-return-link a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	color: #172033;
	font-size: .84rem;
	font-weight: 900;
	text-decoration: none;
}

.auth-return-link a:hover {
	color: var(--auth-teal);
	text-decoration: underline;
}

/* =========================================================
   Reusable App Layout System
   ========================================================= */

:root {
	--app-bg: #f3f7fb;
	--app-surface: #ffffff;
	--app-text: #0f1f35;
	--app-muted: #405575;
	--app-soft: #71829c;
	--app-border: #dbe5f0;
	--app-border-strong: #cbd8e6;

	--app-navy: #0b2138;
	--app-navy-dark: #071727;
	--app-teal: #007c78;
	--app-blue: #2563eb;
	--app-orange: #f59e0b;
	--app-red: #dc2626;
	--app-green: #16a34a;

	--app-radius-lg: 18px;
	--app-radius-md: 14px;
	--app-shadow: 0 16px 35px rgba(15, 31, 53, .08);
	--app-shadow-soft: 0 8px 22px rgba(15, 31, 53, .04);
}

body {
	background: var(--app-bg);
	color: var(--app-text);
}

.app-page {
	padding: 24px;
}

.app-page-inner {
	max-width: 1600px;
	margin: 0 auto;
}

.app-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 22px;
}

.app-page-kicker,
.app-kicker {
	margin-bottom: 8px;
	color: var(--app-teal);
	font-size: .76rem;
	font-weight: 950;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.app-page-title {
	margin: 0;
	color: var(--app-text);
	font-size: clamp(1.75rem, 3vw, 2.4rem);
	line-height: 1;
	font-weight: 950;
	letter-spacing: -.045em;
}

.app-page-subtitle {
	margin: 10px 0 0;
	max-width: 78ch;
	color: var(--app-muted);
	font-size: .98rem;
	font-weight: 650;
	line-height: 1.5;
}

.app-page-actions,
.app-card-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.app-card-actions {
	justify-content: flex-start;
	margin-top: 18px;
}

/* Buttons */

.app-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: .65rem 1rem;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: .9rem;
	font-weight: 900;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition:
		background .15s ease,
		border-color .15s ease,
		color .15s ease,
		transform .15s ease,
		box-shadow .15s ease;
}

.app-btn:hover {
	transform: translateY(-1px);
	text-decoration: none;
}

.app-btn-sm {
	min-height: 34px;
	padding: .48rem .72rem;
	font-size: .8rem;
}

.app-btn-primary {
	background: #111827;
	border-color: #111827;
	color: #ffffff;
	box-shadow: 0 10px 20px rgba(17, 24, 39, .12);
}

.app-btn-primary:hover {
	background: #000000;
	border-color: #000000;
	color: #ffffff;
}

.app-btn-outline {
	background: #ffffff;
	border-color: #111827;
	color: #111827;
}

.app-btn-outline:hover {
	background: #111827;
	color: #ffffff;
}

.app-btn-muted {
	background: #ffffff;
	border-color: var(--app-border-strong);
	color: var(--app-text);
}

.app-btn-muted:hover {
	background: #f8fafc;
	color: var(--app-text);
}

/* Alerts */

.app-alert {
	margin-bottom: 18px;
	padding: 16px 18px;
	border-radius: var(--app-radius-lg);
	background: #ffffff;
	border: 1px solid var(--app-border);
	box-shadow: var(--app-shadow-soft);
	color: var(--app-muted);
}

.app-alert-title {
	margin-bottom: 6px;
	color: var(--app-text);
	font-weight: 950;
}

.app-alert-warning {
	border-left: 4px solid var(--app-orange);
}

/* Search */

.app-search-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 18px;
	margin-bottom: 22px;
	padding: 18px;
	border-radius: var(--app-radius-lg);
	background: var(--app-surface);
	border: 1px solid var(--app-border);
	box-shadow: var(--app-shadow-soft);
}

.app-field-label {
	display: block;
	margin-bottom: 8px;
	color: var(--app-text);
	font-size: .82rem;
	font-weight: 900;
}

.app-search-form {
	margin: 0;
}

.app-search-input {
	position: relative;
	display: flex;
	align-items: center;
}

.app-search-input i {
	position: absolute;
	left: 14px;
	color: var(--app-soft);
	font-size: .95rem;
	pointer-events: none;
}

.app-search-input input {
	width: 100%;
	min-height: 48px;
	padding: 12px 78px 12px 42px;
	border-radius: 14px;
	border: 1px solid var(--app-border-strong);
	background: #ffffff;
	color: var(--app-text);
	font-size: .92rem;
	font-weight: 700;
	outline: none;
}

.app-search-input input:focus {
	border-color: rgba(0, 124, 120, .55);
	box-shadow: 0 0 0 4px rgba(0, 124, 120, .10);
}

.app-search-clear {
	position: absolute;
	right: 8px;
	min-height: 32px;
	padding: 7px 10px;
	border: 0;
	border-radius: 9px;
	background: #f1f5f9;
	color: var(--app-muted);
	font-size: .78rem;
	font-weight: 900;
	text-decoration: none;
}

.app-search-clear:hover {
	background: #e2e8f0;
	color: var(--app-text);
}

.app-summary-pills {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 9px;
	flex-wrap: wrap;
}

.app-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	width: fit-content;
	padding: 7px 10px;
	border-radius: 999px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .78rem;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.app-pill strong {
	color: var(--app-text);
	font-weight: 950;
}

/* Metrics */

.app-metric-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 22px;
}

.app-metric-card {
	position: relative;
	overflow: hidden;
	min-height: 116px;
	padding: 20px;
	border-radius: var(--app-radius-lg);
	background: var(--app-surface);
	border: 1px solid var(--app-border);
	box-shadow: var(--app-shadow-soft);
	color: var(--app-text);
	text-decoration: none;
	transition:
		transform .15s ease,
		box-shadow .15s ease,
		border-color .15s ease;
}

.app-metric-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--app-shadow);
	border-color: var(--app-border-strong);
	color: var(--app-text);
}

.app-metric-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	bottom: 14px;
	width: 4px;
	border-radius: 999px;
	background: var(--app-navy);
}

.app-metric-card.is-teal::before {
	background: var(--app-teal);
}

.app-metric-card.is-blue::before {
	background: var(--app-blue);
}

.app-metric-card.is-orange::before {
	background: var(--app-orange);
}

.app-metric-card.is-red::before {
	background: var(--app-red);
}

.app-metric-label {
	margin-bottom: 9px;
	color: #60718f;
	font-size: .76rem;
	font-weight: 950;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.app-metric-value {
	color: var(--app-text);
	font-size: 2rem;
	line-height: 1;
	font-weight: 950;
	letter-spacing: -.04em;
}

.app-metric-help {
	margin-top: 10px;
	color: var(--app-muted);
	font-size: .86rem;
	font-weight: 650;
}

/* Cards */

.app-card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.app-card {
	padding: 24px;
	border-radius: var(--app-radius-lg);
	background: var(--app-surface);
	border: 1px solid var(--app-border);
	box-shadow: var(--app-shadow-soft);
}

.app-card-kicker {
	margin-bottom: 8px;
	color: var(--app-teal);
	font-size: .74rem;
	font-weight: 950;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.app-card-kicker.is-orange {
	color: #c2410c;
}

.app-card-kicker.is-teal {
	color: var(--app-teal);
}

.app-card-kicker.is-red {
	color: var(--app-red);
}

.app-card-title {
	margin: 0;
	color: var(--app-text);
	font-size: 1.35rem;
	line-height: 1.15;
	font-weight: 950;
	letter-spacing: -.035em;
}

.app-card-text {
	margin: 10px 0 18px;
	color: var(--app-muted);
	font-size: .95rem;
	font-weight: 650;
	line-height: 1.55;
}

/* Lists */

.app-list {
	display: grid;
	gap: 10px;
}

.app-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
}

.app-list-main {
	min-width: 0;
	flex: 1;
}

.app-list-title {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 5px;
	color: var(--app-text);
	font-size: .92rem;
	font-weight: 950;
}

.app-list-title a {
	color: var(--app-text);
	text-decoration: none;
}

.app-list-title a:hover {
	color: var(--app-teal);
	text-decoration: underline;
}

.app-list-title span {
	color: var(--app-muted);
	font-size: .84rem;
	font-weight: 750;
}

.app-list-sub {
	margin-bottom: 8px;
	color: var(--app-muted);
	font-size: .82rem;
	font-weight: 750;
	line-height: 1.35;
}

.app-list-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
}

.app-empty {
	padding: 16px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px dashed var(--app-border-strong);
	color: var(--app-muted);
	font-size: .9rem;
	font-weight: 750;
}

/* Badges / dots */

.app-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-height: 28px;
	padding: 5px 10px;
	border-radius: 999px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .74rem;
	font-weight: 950;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.app-badge.is-blue {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: var(--app-blue);
}

.app-badge.is-teal {
	background: #e6f7f5;
	border-color: #b9ebe5;
	color: var(--app-teal);
}

.app-badge.is-orange {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #c2410c;
}

.app-dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	display: inline-block;
	flex: 0 0 auto;
	background: var(--app-soft);
}

.app-dot.is-blue,
.app-progress-line .is-blue {
	background: var(--app-blue);
}

.app-dot.is-orange,
.app-progress-line .is-orange {
	background: var(--app-orange);
}

.app-dot.is-green,
.app-progress-line .is-green {
	background: var(--app-green);
}

.app-dot.is-red,
.app-progress-line .is-red {
	background: var(--app-red);
}

.app-dot.is-muted {
	background: var(--app-soft);
}

/* Mini cards / workflow */

.app-progress-line {
	display: flex;
	overflow: hidden;
	width: 100%;
	height: 14px;
	margin: 18px 0;
	border-radius: 999px;
	background: #eef2f7;
	border: 1px solid var(--app-border);
}

.app-progress-line span {
	display: block;
	min-width: 0;
	height: 100%;
}

.app-mini-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.app-mini-card {
	display: block;
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-text);
	text-decoration: none;
	transition:
		transform .15s ease,
		background .15s ease,
		border-color .15s ease;
}

.app-mini-card:hover {
	transform: translateY(-1px);
	background: #ffffff;
	border-color: var(--app-border-strong);
	color: var(--app-text);
}

.app-mini-label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	color: var(--app-muted);
	font-size: .78rem;
	font-weight: 850;
}

.app-mini-value {
	color: var(--app-text);
	font-size: 1.55rem;
	font-weight: 950;
	line-height: 1;
	letter-spacing: -.04em;
}

/* Action tiles */

.app-action-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.app-action-tile {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-text);
	text-decoration: none;
	transition:
		transform .15s ease,
		background .15s ease,
		border-color .15s ease;
}

.app-action-tile:hover {
	transform: translateY(-1px);
	background: #ffffff;
	border-color: var(--app-border-strong);
	color: var(--app-text);
}

.app-action-tile > span {
	width: 36px;
	height: 36px;
	border-radius: 12px;
	background: #eef3f8;
	color: var(--app-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.app-action-tile strong {
	display: block;
	font-size: .9rem;
	font-weight: 950;
	line-height: 1.2;
}

.app-action-tile small {
	display: block;
	margin-top: 3px;
	color: var(--app-muted);
	font-size: .76rem;
	font-weight: 700;
	line-height: 1.25;
}

/* Search overlay */

body.app-search-active {
	overflow: hidden;
}

.app-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 1080;
	display: none;
	padding: 28px;
	background: rgba(7, 27, 47, .58);
	backdrop-filter: blur(8px);
}

body.app-search-active .app-search-overlay {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.app-search-modal {
	width: min(860px, 100%);
	margin-top: 5vh;
	overflow: hidden;
	border-radius: 22px;
	background: #ffffff;
	border: 1px solid var(--app-border);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .26);
}

.app-search-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--app-border);
	background: #f8fafc;
}

.app-search-modal-title {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--app-text);
	font-size: .98rem;
	font-weight: 950;
}

.app-search-modal-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.app-search-shortcuts {
	color: var(--app-soft);
	font-size: .78rem;
	font-weight: 800;
}

.app-search-modal-body {
	padding: 16px;
}

.app-search-results {
	display: none;
	border-top: 1px solid var(--app-border);
}

.app-search-results.show {
	display: block;
}

.app-search-results-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 18px;
	background: #ffffff;
	border-bottom: 1px solid var(--app-border);
	color: var(--app-text);
	font-size: .78rem;
	font-weight: 950;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.app-search-results-head span:last-child {
	color: var(--app-muted);
	font-size: .72rem;
	font-weight: 850;
	text-transform: none;
	letter-spacing: 0;
}

.app-search-results-body {
	max-height: 52vh;
	overflow: auto;
	padding: 10px;
	background: #ffffff;
}

.app-search-group {
	padding: 10px 8px 6px;
	color: var(--app-muted);
	font-size: .72rem;
	font-weight: 950;
	text-transform: uppercase;
	letter-spacing: .1em;
}

.app-search-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding: 12px;
	border-radius: 14px;
	color: var(--app-text);
	text-decoration: none;
}

.app-search-item:hover,
.app-search-item.active {
	background: #f1f5f9;
	color: var(--app-text);
}

.app-search-item-title {
	color: var(--app-text);
	font-size: .92rem;
	font-weight: 950;
}

.app-search-item-sub {
	margin-top: 3px;
	color: var(--app-muted);
	font-size: .8rem;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.app-search-item-meta {
	color: var(--app-muted);
	font-size: .76rem;
	font-weight: 850;
	white-space: nowrap;
}

.app-search-empty {
	margin: 8px;
	padding: 16px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px dashed var(--app-border-strong);
	color: var(--app-muted);
	font-size: .9rem;
	font-weight: 750;
}

.app-search-results-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-top: 1px solid var(--app-border);
	background: #f8fafc;
	color: var(--app-muted);
	font-size: .82rem;
	font-weight: 750;
}

.app-search-footer-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Responsive */

@media (max-width: 1200px) {
	.app-metric-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

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

	.app-summary-pills {
		justify-content: flex-start;
	}
}

@media (max-width: 760px) {
	.app-page {
		padding: 16px;
	}

	.app-page-header {
		flex-direction: column;
	}

	.app-page-actions {
		justify-content: flex-start;
		width: 100%;
	}

	.app-page-actions .app-btn {
		flex: 1;
	}

	.app-metric-grid {
		grid-template-columns: 1fr;
	}

	.app-card {
		padding: 20px;
	}

	.app-list-item {
		align-items: flex-start;
		flex-direction: column;
	}

	.app-list-item > .app-btn {
		width: 100%;
	}

	.app-mini-grid,
	.app-action-list {
		grid-template-columns: 1fr;
	}

	.app-search-overlay {
		padding: 12px;
	}

	.app-search-modal {
		margin-top: 2vh;
	}

	.app-search-modal-head,
	.app-search-results-footer {
		align-items: flex-start;
		flex-direction: column;
	}

	.app-search-modal-actions,
	.app-search-footer-actions {
		width: 100%;
	}

	.app-search-footer-actions .app-btn {
		flex: 1;
	}
}

@media (max-width: 520px) {
	.app-page {
		padding: 12px;
	}

	.app-page-title {
		font-size: 1.95rem;
	}

	.app-card,
	.app-search-card {
		padding: 16px;
	}

	.app-metric-card {
		min-height: 112px;
		padding: 18px;
	}

	.app-metric-value {
		font-size: 1.9rem;
	}
}
/* =========================================================
   Generic Filter Bar
   ========================================================= */

.app-filter-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: -8px 0 22px;
	padding: 14px 18px;
	border-radius: var(--app-radius-lg);
	background: var(--app-surface);
	border: 1px solid var(--app-border);
	box-shadow: var(--app-shadow-soft);
}

.app-filter-left {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.app-segmented {
	display: inline-flex;
	padding: 4px;
	border-radius: 12px;
	background: #eef3f8;
	border: 1px solid var(--app-border);
}

.app-segment-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 7px 13px;
	border-radius: 9px;
	color: var(--app-muted);
	font-size: .82rem;
	font-weight: 900;
	text-decoration: none;
}

.app-segment-btn:hover {
	color: var(--app-text);
	text-decoration: none;
}

.app-segment-btn.active {
	background: #ffffff;
	color: var(--app-text);
	box-shadow: 0 6px 14px rgba(15, 31, 53, .08);
}

.app-az-scroll {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	overflow-x: auto;
	padding-bottom: 2px;
}

.app-az-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 9px;
	border-radius: 9px;
	background: #ffffff;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .78rem;
	font-weight: 900;
	text-decoration: none;
	white-space: nowrap;
}

.app-az-btn:hover,
.app-az-btn.active {
	background: var(--app-navy);
	border-color: var(--app-navy);
	color: #ffffff;
	text-decoration: none;
}

.app-filter-clear {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--app-muted);
	font-size: .84rem;
	font-weight: 900;
	text-decoration: none;
	white-space: nowrap;
}

.app-filter-clear:hover {
	color: var(--app-teal);
	text-decoration: underline;
}

/* =========================================================
   Generic Record List
   ========================================================= */

.app-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.app-record-list {
	display: grid;
	gap: 10px;
}

.app-record-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px;
	border-radius: 16px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	cursor: pointer;
	transition:
		background .15s ease,
		border-color .15s ease,
		transform .15s ease;
}

.app-record-item:hover {
	background: #ffffff;
	border-color: var(--app-border-strong);
	transform: translateY(-1px);
}

.app-record-main {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	flex: 1;
}

.app-avatar {
	width: 46px;
	height: 46px;
	border-radius: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--app-navy);
	color: #ffffff;
	font-size: .9rem;
	font-weight: 950;
	flex: 0 0 auto;
}

.app-record-content {
	min-width: 0;
	flex: 1;
}

.app-record-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 7px;
}

.app-record-title {
	color: var(--app-text);
	font-size: .98rem;
	font-weight: 950;
	text-decoration: none;
}

.app-record-title:hover {
	color: var(--app-teal);
	text-decoration: underline;
}

.app-record-meta,
.app-record-sub {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	color: var(--app-muted);
	font-size: .82rem;
	font-weight: 750;
	line-height: 1.4;
}

.app-record-meta span,
.app-record-sub {
	min-width: 0;
}

.app-record-meta i,
.app-record-sub i {
	color: var(--app-soft);
}

.app-record-sub {
	margin-top: 6px;
}

.app-record-side {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex-wrap: wrap;
	flex: 0 0 auto;
}

.app-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 10px;
	border-radius: 999px;
	border: 1px solid var(--app-border);
	background: #ffffff;
	color: var(--app-muted);
	font-size: .78rem;
	font-weight: 900;
	white-space: nowrap;
}

.app-status-pill.is-active {
	background: #ecfdf3;
	border-color: #bbf7d0;
	color: #166534;
}

.app-status-pill.is-archived {
	background: #f8fafc;
	color: var(--app-muted);
}

/* Empty state */

.app-empty-state {
	padding: 42px 20px;
	text-align: center;
	border-radius: 16px;
	background: #f8fafc;
	border: 1px dashed var(--app-border-strong);
}

.app-empty-icon {
	width: 58px;
	height: 58px;
	margin: 0 auto 14px;
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef3f8;
	color: var(--app-navy);
	font-size: 1.4rem;
}

.app-empty-title {
	color: var(--app-text);
	font-size: 1.15rem;
	font-weight: 950;
}

.app-empty-sub {
	margin: 8px auto 0;
	max-width: 56ch;
	color: var(--app-muted);
	font-size: .92rem;
	font-weight: 650;
	line-height: 1.5;
}
@media (max-width: 900px) {
	.app-filter-bar,
	.app-filter-left {
		align-items: stretch;
		flex-direction: column;
	}

	.app-az-scroll {
		width: 100%;
	}

	.app-record-item {
		align-items: flex-start;
		flex-direction: column;
	}

	.app-record-main {
		width: 100%;
		align-items: flex-start;
	}

	.app-record-side {
		width: 100%;
		justify-content: flex-start;
	}
}

/* =========================================================
   Generic Detail / Side Layout
   ========================================================= */

.app-title-row {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.app-avatar-lg {
	width: 58px;
	height: 58px;
	border-radius: 18px;
	font-size: 1rem;
}

.app-layout-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 18px;
	align-items: start;
}

.app-main-stack,
.app-side-stack {
	display: grid;
	gap: 18px;
}

.app-side-panel {
	position: sticky;
	top: 18px;
}

.app-detail-list {
	display: grid;
	gap: 10px;
	margin-top: 16px;
}

.app-detail-row {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 12px;
	padding: 12px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
}

.app-detail-label {
	color: var(--app-muted);
	font-size: .78rem;
	font-weight: 900;
}

.app-detail-value {
	min-width: 0;
	color: var(--app-text);
	font-size: .86rem;
	font-weight: 800;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.app-mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.app-side-actions {
	display: grid;
	gap: 9px;
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--app-border);
}

.app-side-actions .app-btn {
	width: 100%;
	justify-content: flex-start;
}

.app-text-link {
	color: var(--app-teal);
	font-size: .84rem;
	font-weight: 950;
	text-decoration: none;
	white-space: nowrap;
}

.app-text-link:hover {
	color: var(--app-navy);
	text-decoration: underline;
}

.app-link-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.app-action-list-wide {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-badge.is-muted {
	background: #f8fafc;
	border-color: var(--app-border);
	color: var(--app-muted);
}

.app-badge.is-red {
	background: #fff1f2;
	border-color: #fecdd3;
	color: var(--app-red);
}

@media (max-width: 1200px) {
	.app-layout-grid {
		grid-template-columns: 1fr;
	}

	.app-action-list-wide {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.app-title-row {
		align-items: flex-start;
	}

	.app-action-list-wide {
		grid-template-columns: 1fr;
	}

	.app-detail-row {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.app-card-head {
		flex-direction: column;
	}
}

/* =========================================================
   Generic Forms / Edit Pages
   ========================================================= */

.app-form-grid {
	display: grid;
	gap: 16px;
}

.app-form-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-field {
	display: grid;
	gap: 7px;
}

.app-input {
	width: 100%;
	min-height: 46px;
	padding: 11px 13px;
	border-radius: 12px;
	border: 1px solid var(--app-border-strong);
	background: #ffffff;
	color: var(--app-text);
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.45;
	outline: none;
	transition:
		border-color .15s ease,
		box-shadow .15s ease,
		background .15s ease;
}

textarea.app-input {
	min-height: 110px;
	resize: vertical;
}

.app-input::placeholder {
	color: #94a3b8;
	font-weight: 700;
}

.app-input:focus {
	border-color: rgba(0, 124, 120, .55);
	box-shadow: 0 0 0 4px rgba(0, 124, 120, .10);
	background: #ffffff;
}

.app-help-text {
	color: var(--app-muted);
	font-size: .78rem;
	font-weight: 700;
	line-height: 1.4;
}

.app-optional {
	margin-left: 5px;
	color: var(--app-soft);
	font-size: .72rem;
	font-weight: 850;
	text-transform: none;
	letter-spacing: 0;
}

.app-info-box {
	display: grid;
	align-content: center;
	gap: 4px;
	min-height: 74px;
	padding: 12px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
}

.app-form-actions {
	justify-content: flex-end;
	gap: 10px;
}

.app-mobile-save-bar {
	position: sticky;
	bottom: 0;
	z-index: 20;
	margin-top: 18px;
	padding: 12px;
	border-radius: 18px 18px 0 0;
	background: rgba(243, 247, 251, .92);
	border: 1px solid var(--app-border);
	backdrop-filter: blur(12px);
}

/* Side panel helpers */

.app-jump-list,
.app-check-list {
	display: grid;
	gap: 9px;
	margin-top: 16px;
}

.app-jump-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-text);
	font-size: .86rem;
	font-weight: 900;
	text-decoration: none;
}

.app-jump-link span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.app-jump-link:hover {
	background: #ffffff;
	border-color: var(--app-border-strong);
	color: var(--app-teal);
	text-decoration: none;
}

.app-jump-link.is-danger {
	color: var(--app-red);
}

.app-check-item {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	padding: 12px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .82rem;
	font-weight: 700;
	line-height: 1.45;
}

.app-check-item i {
	color: var(--app-teal);
	margin-top: 2px;
}

.app-danger-card {
	border-color: #fecdd3;
}

.app-danger-box {
	padding: 14px;
	border-radius: 14px;
	background: #fff1f2;
	border: 1px solid #fecdd3;
	color: #7f1d1d;
	font-size: .88rem;
	font-weight: 700;
}

.app-check-control {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-bottom: 14px;
}

.app-check-control label {
	color: #7f1d1d;
	font-size: .84rem;
	font-weight: 850;
	line-height: 1.4;
}

.app-btn-danger {
	background: var(--app-red);
	border-color: var(--app-red);
	color: #ffffff;
}

.app-btn-danger:hover {
	background: #b91c1c;
	border-color: #b91c1c;
	color: #ffffff;
}

.app-btn-success {
	background: #ffffff;
	border-color: #86efac;
	color: #166534;
}

.app-btn-success:hover {
	background: #ecfdf3;
	color: #166534;
}

.app-alert-danger {
	border-left: 4px solid var(--app-red);
}

.app-alert-success {
	border-left: 4px solid var(--app-green);
}

@media (max-width: 900px) {
	.app-form-grid-2 {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   Generic Section Intro / Notes
   ========================================================= */

.app-section-title {
	margin: 0;
	color: var(--app-text);
	font-size: 1.25rem;
	line-height: 1.15;
	font-weight: 950;
	letter-spacing: -.035em;
}

.app-section-subtitle {
	margin: 7px 0 0;
	color: var(--app-muted);
	font-size: .92rem;
	font-weight: 650;
	line-height: 1.5;
}

.app-note-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.app-note-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 10px;
	border-radius: 999px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .76rem;
	font-weight: 850;
}

.app-note-pill.is-success {
	background: #ecfdf3;
	border-color: #bbf7d0;
	color: #166534;
}

/* =========================================================
   App Shell / Sidebar / Header
   ========================================================= */

:root {
	--sb-width: 260px;
}

body.app-shell {
	min-height: 100vh;
	background: var(--app-bg, #f3f7fb);
}

.app-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1030;
	display: flex;
	flex-direction: column;
	width: var(--sb-width);
	height: 100vh;
	background: #ffffff;
	border-right: 1px solid rgba(15, 31, 53, .08);
	box-shadow: 8px 0 24px rgba(15, 31, 53, .03);
}

.app-content {
	min-height: 100vh;
	margin-left: var(--sb-width);
}

.sidebar-top {
	display: flex;
	align-items: center;
	gap: .65rem;
	padding: .95rem .95rem .8rem;
	border-bottom: 1px solid rgba(15, 31, 53, .08);
}

.brand-mini {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	background: var(--app-navy, #0b2138);
	color: #ffffff;
	font-size: .8rem;
	font-weight: 950;
	letter-spacing: .04em;
}

.brand-text {
	color: var(--app-text, #0f1f35);
	font-size: .98rem;
	font-weight: 950;
	letter-spacing: -.02em;
	white-space: nowrap;
}

.sidebar-nav {
	flex: 1 1 auto;
	padding: .75rem .6rem;
	overflow-y: auto;
}

.sidebar-section-title {
	margin: .95rem .65rem .35rem;
	color: var(--app-soft, #71829c);
	font-size: .68rem;
	font-weight: 950;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.sb-link {
	display: flex;
	align-items: center;
	gap: .65rem;
	min-height: 40px;
	padding: .56rem .68rem;
	border-radius: .78rem;
	color: var(--app-text, #0f1f35);
	font-size: .9rem;
	font-weight: 800;
	text-decoration: none;
	transition:
		background .15s ease,
		color .15s ease,
		transform .15s ease;
}

.sb-link:hover {
	background: #f3f7fb;
	color: var(--app-text, #0f1f35);
	text-decoration: none;
}

.sb-link.active {
	background: #e6f7f5;
	color: var(--app-teal, #007c78);
	font-weight: 950;
}

.sb-link i {
	width: 24px;
	font-size: 1.05rem;
	text-align: center;
}

.sb-collapse .btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .65rem;
	min-height: 40px;
	padding: .56rem .68rem;
	border-radius: .78rem;
	color: var(--app-text, #0f1f35);
	font-size: .9rem;
}

.sb-collapse .btn:hover {
	background: #f3f7fb;
}

.sb-collapse .btn:focus {
	box-shadow: none;
}

.sb-collapse .chev {
	transition: transform .15s ease;
}

.sb-collapse .btn.collapsed .chev {
	transform: rotate(-90deg);
}

.sidebar-footer {
	padding: .8rem .95rem;
	border-top: 1px solid rgba(15, 31, 53, .08);
}

.user-line {
	display: flex;
	align-items: center;
	gap: .65rem;
	min-width: 0;
}

.user-meta {
	min-width: 0;
	line-height: 1.15;
}

.user-name {
	max-width: 170px;
	color: var(--app-text, #0f1f35);
	font-size: .88rem;
	font-weight: 900;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.user-badges {
	margin-top: .3rem;
}

.online-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--app-green, #16a34a);
	box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}

.bg-purple {
	background: #7c3aed !important;
}

.app-topbar {
	position: sticky;
	top: 0;
	z-index: 1020;
	background: rgba(243, 247, 251, .82);
	backdrop-filter: blur(10px);
}

.sb-backdrop {
	display: none;
}

@media (max-width: 991.98px) {
	.app-sidebar {
		transform: translateX(-100%);
		transition: transform .2s ease;
	}

	body.sb-mobile-open .app-sidebar {
		transform: translateX(0);
		box-shadow: 0 18px 45px rgba(15, 31, 53, .18);
	}

	.app-content {
		margin-left: 0;
	}

	.sb-backdrop {
		position: fixed;
		inset: 0;
		z-index: 1029;
		display: none;
		background: rgba(7, 23, 39, .45);
		backdrop-filter: blur(3px);
	}

	body.sb-mobile-open .sb-backdrop {
		display: block;
	}
}

/* =========================================================
   Company / Branding Helpers
   ========================================================= */

.app-logo-mark {
	width: 58px;
	height: 58px;
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--app-navy);
	color: #ffffff;
	font-size: .95rem;
	font-weight: 950;
	overflow: hidden;
	flex: 0 0 auto;
}

.app-logo-mark img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #ffffff;
	padding: 6px;
}

.app-company-mini {
	margin: 16px 0;
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
}

.app-company-mini-name {
	color: var(--app-text);
	font-size: .95rem;
	font-weight: 950;
	line-height: 1.2;
}

.app-company-mini-sub {
	margin-top: 4px;
	color: var(--app-muted);
	font-size: .82rem;
	font-weight: 750;
	overflow-wrap: anywhere;
}

.app-logo-side-preview {
	margin-top: 16px;
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	text-align: center;
}

.app-logo-side-preview img {
	max-width: 180px;
	max-height: 90px;
	object-fit: contain;
}

.app-metric-icon {
	font-size: 1.8rem;
}

.app-metric-text {
	font-size: 1.55rem;
}

.app-tab-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.app-tab-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 9px 13px;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .84rem;
	font-weight: 900;
	text-decoration: none;
}

.app-tab-link:hover {
	background: #ffffff;
	border-color: var(--app-border-strong);
	color: var(--app-text);
	text-decoration: none;
}

.app-tab-link.active {
	background: var(--app-navy);
	border-color: var(--app-navy);
	color: #ffffff;
}

.app-logo-stage {
	margin-bottom: 24px;
	padding: 22px;
	border-radius: 16px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	text-align: center;
}

.app-logo-placeholder {
	width: 110px;
	height: 110px;
	margin: 0 auto 14px;
	border-radius: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--app-navy);
	color: #ffffff;
	font-size: 1.4rem;
	font-weight: 950;
	overflow: hidden;
}

.app-logo-placeholder img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #ffffff;
	padding: 10px;
}

.app-logo-preview {
	display: block;
	max-width: 260px;
	max-height: 140px;
	margin: 12px auto 0;
	object-fit: contain;
}

.app-file-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .78rem;
	font-weight: 850;
}

.app-brand-note {
	margin-top: 24px;
	padding: 16px;
	border-radius: 16px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	color: var(--app-muted);
	font-size: .88rem;
	font-weight: 700;
	line-height: 1.5;
}

.app-brand-note-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	color: var(--app-text);
	font-weight: 950;
}

/* =========================================================
   Users / Admin Lists
   ========================================================= */

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

.app-filter-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--app-border);
}

.app-user-list {
	display: grid;
	gap: 10px;
}

.app-user-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px;
	border-radius: 16px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
	transition:
		background .15s ease,
		border-color .15s ease,
		transform .15s ease;
}

.app-user-row:hover {
	background: #ffffff;
	border-color: var(--app-border-strong);
	transform: translateY(-1px);
}

.app-user-main {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	flex: 1;
}

.app-user-content {
	min-width: 0;
	flex: 1;
}

.app-user-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.app-user-name {
	color: var(--app-text);
	font-size: .98rem;
	font-weight: 950;
	line-height: 1.2;
	text-decoration: none;
}

.app-user-name:hover {
	color: var(--app-teal);
	text-decoration: underline;
}

.app-user-sub {
	margin-bottom: 8px;
	color: var(--app-muted);
	font-size: .84rem;
	font-weight: 750;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.app-user-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex-wrap: wrap;
	flex: 0 0 auto;
}

.app-status-pill.is-disabled {
	background: #fff1f2;
	border-color: #fecdd3;
	color: var(--app-red);
}

.app-modal-content {
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid rgba(17, 24, 39, .10);
}

.app-temp-password-box {
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
}

@media (max-width: 1100px) {
	.app-user-row {
		align-items: flex-start;
		flex-direction: column;
	}

	.app-user-actions {
		width: 100%;
		justify-content: flex-start;
	}

	.app-user-actions .app-btn,
	.app-user-actions form {
		flex: 1;
	}

	.app-user-actions .app-btn,
	.app-user-actions button {
		width: 100%;
	}
}

@media (max-width: 900px) {
	.app-form-grid-3 {
		grid-template-columns: 1fr;
	}

	.app-filter-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.app-filter-actions .app-card-actions {
		width: 100%;
	}

	.app-filter-actions .app-btn {
		flex: 1;
	}
}

/* =========================================================
   Generic Soft Panels / Notes
   ========================================================= */

.app-soft-panel {
	padding: 18px;
	border-radius: 16px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
}

.app-soft-panel-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 16px;
}

.app-soft-panel-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--app-text);
	font-size: 1.05rem;
	line-height: 1.2;
	font-weight: 950;
	letter-spacing: -.025em;
}

.app-info-note {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	padding: 12px;
	border-radius: 14px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1d4ed8;
	font-size: .82rem;
	font-weight: 750;
	line-height: 1.45;
}

.app-info-note i {
	margin-top: 2px;
}

/* =========================================================
   Account / Password Field Helpers
   ========================================================= */

.app-user-mini {
	margin: 16px 0;
	padding: 14px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px solid var(--app-border);
}

.app-user-mini-name {
	color: var(--app-text);
	font-size: .95rem;
	font-weight: 950;
	line-height: 1.2;
}

.app-user-mini-sub {
	margin-top: 4px;
	color: var(--app-muted);
	font-size: .82rem;
	font-weight: 750;
	overflow-wrap: anywhere;
}

.app-password-field {
	position: relative;
	display: flex;
	align-items: center;
}

.app-password-field .app-input {
	padding-right: 50px;
}

.app-password-btn {
	position: absolute;
	right: 8px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 10px;
	background: #f1f5f9;
	color: var(--app-muted);
	display: flex;
	align-items: center;
	justify-content: center;
}

.app-password-btn:hover {
	background: #e2e8f0;
	color: var(--app-text);
}

/* =========================================================
   Generic Tables / Job Filters
   ========================================================= */

.app-table-wrap {
	width: 100%;
	overflow-x: auto;
}

.app-table {
	margin: 0;
}

.app-table thead th {
	padding: .85rem 1rem;
	border-bottom: 1px solid var(--app-border);
	background: #f8fafc;
	color: var(--app-muted);
	font-size: .72rem;
	font-weight: 950;
	text-transform: uppercase;
	letter-spacing: .08em;
	white-space: nowrap;
}

.app-table tbody td {
	padding: 1rem;
	border-color: var(--app-border);
	vertical-align: middle;
}

.app-row-click {
	cursor: pointer;
}

.app-row-click:hover {
	background: #f8fafc;
}

.app-inline-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.app-count-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	background: rgba(15, 31, 53, .08);
	color: inherit;
	font-size: .72rem;
	font-weight: 950;
}

.app-tab-link.active .app-count-badge {
	background: rgba(255, 255, 255, .18);
	color: #ffffff;
}

.app-filter-stack {
	display: grid;
	gap: 14px;
	margin-top: 18px;
}

.app-filter-line {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}

.app-filter-label {
	padding-top: 10px;
	color: var(--app-muted);
	font-size: .74rem;
	font-weight: 950;
	text-transform: uppercase;
	letter-spacing: .1em;
}

.app-mobile-filter-selects {
	display: none;
	gap: 10px;
	margin-bottom: 16px;
}

.app-mobile-record-list {
	display: none;
}

@media (max-width: 991.98px) {
	.app-table-wrap {
		display: none;
	}

	.app-mobile-record-list {
		display: grid;
	}
}

@media (max-width: 760px) {
	.app-desktop-filter-line {
		display: none;
	}

	.app-mobile-filter-selects {
		display: grid;
	}

	.app-filter-line {
		grid-template-columns: 1fr;
	}

	.app-filter-label {
		padding-top: 0;
	}
}

/* =========================================================
   Job View Helpers
   ========================================================= */

.app-status-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.app-badge.status-open,
.app-badge.status-progress,
.app-badge.status-complete,
.app-badge.status-cancel,
.app-badge.status-neutral,
.app-badge.priority-high,
.app-badge.priority-medium,
.app-badge.priority-low {
	background: #ffffff;
}

.app-badge.status-open {
	border-color: #bfdbfe;
	color: #1d4ed8;
}

.app-badge.status-progress,
.app-badge.priority-medium {
	border-color: #fde68a;
	color: #92400e;
}

.app-badge.status-complete,
.app-badge.priority-low {
	border-color: #bbf7d0;
	color: #166534;
}

.app-badge.status-cancel,
.app-badge.priority-high {
	border-color: #fecaca;
	color: #991b1b;
}

.app-badge.status-neutral {
	border-color: var(--app-border);
	color: var(--app-muted);
}

.app-dot.dot-blue,
.app-dot.is-blue {
	background: #2563eb;
}

.app-dot.dot-amber,
.app-dot.is-orange {
	background: #d97706;
}

.app-dot.dot-green,
.app-dot.is-green {
	background: #16a34a;
}

.app-dot.dot-red,
.app-dot.is-red {
	background: #dc2626;
}

.app-dot.dot-slate,
.app-dot.is-muted {
	background: #64748b;
}

.app-progress {
	height: 10px;
	border-radius: 999px;
	background: #eef2f7;
	border: 1px solid var(--app-border);
	overflow: hidden;
}

.app-progress-bar {
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: var(--app-teal);
	transition: width .35s ease;
}

.app-progress-bar.is-complete {
	background: var(--app-green);
}

.app-progress-bar.is-cancelled {
	background: var(--app-red);
}

.app-description-box {
	color: var(--app-text);
	font-size: .92rem;
	font-weight: 650;
	line-height: 1.65;
	white-space: pre-wrap;
}

.app-description-box.is-clamped {
	position: relative;
	max-height: 9.5rem;
	overflow: hidden;
}

.app-description-box.is-clamped::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2.5rem;
	background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
}

.app-tab-panel {
	display: none;
}

.app-tab-panel.active {
	display: block;
}

.app-card-head-flat {
	margin: 18px 0 12px;
	padding: 0;
	border: 0;
	background: transparent;
}

.app-split-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
	gap: 14px;
	margin-bottom: 18px;
}

.app-timeline-list {
	display: grid;
	gap: 12px;
}

.app-timeline-item {
	padding: 14px;
	border-radius: 16px;
	background: #ffffff;
	border: 1px solid var(--app-border);
}

.app-timeline-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.app-timeline-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	color: var(--app-muted);
	font-size: .8rem;
	font-weight: 800;
}

.app-timeline-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.app-timeline-body {
	color: var(--app-text);
	font-size: .9rem;
	font-weight: 650;
	line-height: 1.6;
}

.app-file-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.app-pre-wrap {
	white-space: pre-wrap;
}

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

@media (max-width: 1200px) {
	.app-split-grid,
	.app-detail-card-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	.app-timeline-top {
		flex-direction: column;
	}

	.app-file-row {
		align-items: flex-start;
		flex-direction: column;
	}
}