/* ATS global navigation — scoped to allowlisted ATS pages only. */

#ats-uat-banner.ats-uat-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	width: 100%;
	height: var(--ats-uat-banner-h, 46px);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 16px;
	overflow: hidden;
	text-align: center;
	font: 700 14px/1.2 "Segoe UI", sans-serif;
	letter-spacing: 0.06em;
	color: #1a1200;
	background: repeating-linear-gradient(-45deg, #ffd54f, #ffd54f 12px, #ffb300 12px, #ffb300 24px);
	border-bottom: 4px solid #c62828;
}

body.ats-nav-app,
body.ats-fin-app,
body.ats-md-app {
	--ats-uat-banner-h: 0px;
}

body.ats-uat-banner-on {
	--ats-uat-banner-h: 46px;
	/* Desk sets body { padding-top: 0 !important }. Keep every ATS page below the fixed banner. */
	padding-top: var(--ats-uat-banner-h) !important;
	box-sizing: border-box;
}

body.ats-nav-app.ats-uat-not-live {
	height: 100vh;
}

body.ats-nav-app {
	--ats-nav-w: 248px;
	--ats-page-pad: 24px;
	--ats-nav-navy: #16324d;
	--ats-nav-sel: #2a4d68;
	--ats-nav-gold: #c9a227;
	--navbar-height: 0px;
	--navbar-outer-height: 0px;
	--page-head-height: 0px;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	height: 100vh;
	overflow: hidden;
}

body.ats-nav-app.is-ats-nav-collapsed {
	--ats-nav-w: 72px;
}

body.ats-nav-app .navbar,
body.ats-nav-app header.navbar,
body.ats-nav-app #navbar,
body.ats-nav-app .page-head {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.ats-nav-app .body-sidebar,
body.ats-nav-app .body-sidebar-container,
body.ats-nav-app .body-sidebar-placeholder,
body.ats-nav-app .desk-sidebar,
body.ats-nav-app .layout-side-section,
body.ats-nav-app .standard-sidebar,
body.ats-nav-app .sidebar-toggle,
body.ats-nav-app .btn-reset.sidebar-toggle-btn {
	display: none !important;
	width: 0 !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Rail is in-flow (not fixed), so content cannot sit underneath it. */
body.ats-nav-app .main-section {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	box-sizing: border-box;
	overflow-x: hidden;
	overflow-y: auto;
	height: auto !important;
	align-self: stretch;
	min-height: 0;
}

body.ats-nav-app .container.page-body,
body.ats-nav-app .container.page-container,
body.ats-nav-app .page-wrapper,
body.ats-nav-app .page-content,
body.ats-nav-app .layout-main,
body.ats-nav-app .layout-main-section-wrapper,
body.ats-nav-app .layout-main-section {
	margin: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	max-width: none !important;
	width: 100% !important;
	flex: 1 1 100% !important;
	box-sizing: border-box;
}

body.ats-nav-app .ats-rental-page,
body.ats-nav-app .ats-hr-page,
body.ats-nav-app .ats-fleet-page,
body.ats-nav-app .ats-ws-page,
body.ats-nav-app .ats-crm,
body.ats-nav-app .ats-ua,
body.ats-nav-app .ats-exec-dashboard,
body.ats-nav-app .ats-pur-host,
body.ats-nav-app .ats-pur-ov,
body.ats-nav-app .ats-co-page {
	max-width: none !important;
	width: 100% !important;
	box-sizing: border-box;
}

body.ats-nav-app .ats-rental-page,
body.ats-nav-app .ats-hr-page,
body.ats-nav-app .ats-fleet-page,
body.ats-nav-app .ats-ws-page,
body.ats-nav-app .ats-crm,
body.ats-nav-app .ats-pur-host,
body.ats-nav-app .ats-pur-ov {
	margin: 0 !important;
	padding: 20px var(--ats-page-pad) 32px !important;
	min-height: 100%;
}

body.ats-nav-app .ats-rental-page .ats-table-wrap {
	max-width: 100%;
	overflow-x: auto;
}

body.ats-nav-app .ats-ua {
	height: auto;
	max-height: 100%;
	min-height: 0;
}

.ats-global-nav {
	position: relative;
	order: -1;
	top: auto;
	left: auto;
	flex: 0 0 var(--ats-nav-w);
	width: var(--ats-nav-w);
	height: auto;
	align-self: stretch;
	min-height: 0;
	z-index: 20;
	background: var(--ats-nav-navy, #16324d);
	color: #e8eef4;
	display: flex;
	flex-direction: column;
	padding: 16px 12px 12px;
	box-sizing: border-box;
}

.ats-nav-brand {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 2px 6px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	margin-bottom: 10px;
}

.ats-brand-identity {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	min-width: 0;
	width: 100%;
}

.ats-brand-identity:hover,
.ats-brand-identity:focus {
	color: inherit;
	text-decoration: none;
}

.ats-brand-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	width: 100%;
}

.ats-nav-brand-company {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	align-items: center;
	gap: 4px;
	max-width: 100%;
	padding: 0 4px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	color: #d7e3ee;
	overflow: hidden;
	white-space: normal;
	overflow-wrap: anywhere;
}

.ats-brand-chevron {
	flex-shrink: 0;
	opacity: 0.8;
	font-size: 11px;
}

.ats-brand-lockup {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.ats-brand-plate {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	background: #f4f6f8;
	border-radius: 10px;
	flex-shrink: 0;
	overflow: hidden;
	box-sizing: border-box;
}

.ats-brand-logo {
	width: 48px;
	height: 48px;
	object-fit: contain;
	display: block;
	aspect-ratio: 1 / 1;
}

.ats-brand-lockup.is-home .ats-brand-plate {
	width: 72px;
	height: 72px;
	background: #fff;
	border: 1px solid #e4ecf3;
}

.ats-brand-lockup.is-home .ats-brand-logo {
	width: 62px;
	height: 62px;
}

.ats-brand-shell {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 24px;
}

.ats-brand-shell h1 {
	margin: 0;
	font-size: 20px;
	color: #16324d;
}

.ats-brand-shell p {
	margin: 0;
	color: #5b6b7c;
}

.ats-nav-home-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 4px;
}

.ats-nav-home-brand h2 {
	margin: 0;
}

.ats-nav-brand-title {
	font-size: 13px;
	font-weight: 700;
	padding: 0 4px;
}

.ats-global-nav.is-collapsed .ats-nav-brand-title,
.ats-global-nav.is-collapsed .ats-nav-text,
.ats-global-nav.is-collapsed .ats-brand-copy,
.ats-fin-page.is-collapsed .ats-brand-copy,
.ats-fin-page.is-collapsed .ats-fin-brand-title {
	display: none;
}

.ats-global-nav.is-collapsed .ats-nav-brand,
.ats-fin-page.is-collapsed .ats-fin-brand {
	align-items: center;
	padding-left: 0;
	padding-right: 0;
}

.ats-global-nav.is-collapsed .ats-brand-identity,
.ats-fin-page.is-collapsed .ats-brand-identity {
	align-items: center;
}

.ats-global-nav.is-collapsed .ats-brand-lockup {
	justify-content: center;
}

.ats-global-nav.is-collapsed .ats-brand-plate,
.ats-fin-page.is-collapsed .ats-brand-plate {
	width: 40px;
	height: 40px;
	margin: 0 auto;
}

.ats-global-nav.is-collapsed .ats-brand-logo,
.ats-fin-page.is-collapsed .ats-brand-logo {
	width: 34px;
	height: 34px;
}

.ats-nav-list {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
	overflow: auto;
}

.ats-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	text-decoration: none;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 13px;
	cursor: pointer;
}

.ats-nav-item:hover {
	background: var(--ats-nav-sel, #2a4d68);
	color: #fff;
	text-decoration: none;
}

.ats-nav-item.is-active {
	background: var(--ats-nav-sel, #2a4d68);
	box-shadow: inset 3px 0 0 var(--ats-nav-gold, #c9a227);
	color: #fff;
}

.ats-global-nav.is-collapsed .ats-nav-item {
	justify-content: center;
	padding: 10px 8px;
}

.ats-nav-ico {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.ats-nav-foot {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ats-nav-home {
	margin: 16px 16px 8px;
	padding: 16px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(22, 50, 77, 0.08);
}

.ats-nav-home h2 {
	margin: 0;
	font-size: 20px;
	color: #16324d;
}

.ats-nav-home-meta {
	margin: 4px 0 14px;
	color: #5b6b7c;
	font-size: 13px;
}

.ats-nav-home-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 10px 0 8px;
}

.ats-nav-home-field,
.ats-nav-home-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #16324d;
}

.ats-nav-home-field select {
	min-width: 240px;
	height: 32px;
	border: 1px solid #d5dee7;
	border-radius: 8px;
	padding: 0 8px;
	background: #fff;
}

.ats-nav-demo-badge {
	background: #fff7ed;
	color: #b45309;
	border: 1px solid #f6d7b0;
	border-radius: 999px;
	padding: 6px 10px;
	font-size: 11px;
	font-weight: 750;
}

.ats-nav-home-context {
	font-size: 11px;
	color: #5b6b7c;
}

.ats-nav-home-note {
	font-size: 11px;
	color: #b45309;
}

.ats-nav-home-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.ats-nav-home-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px;
	border: 1px solid #e4ecf3;
	border-radius: 10px;
	background: #f8fafc;
	color: #16324d;
	text-decoration: none;
}

.ats-nav-home-card:hover {
	border-color: #c9a227;
	color: #16324d;
	text-decoration: none;
}

.ats-nav-home-kpi {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 12px;
}

.ats-nav-home-kpi-lab {
	color: #5b6b7c;
}

.ats-nav-home-kpi-val {
	font-weight: 700;
}

#ats-global-nav .hidden,
.ats-global-nav .hidden {
	display: none !important;
}

@media (max-width: 767px), (max-height: 500px) {
	body.ats-uat-banner-on {
		--ats-uat-banner-h: 32px;
	}
	#ats-uat-banner.ats-uat-banner {
		padding: 6px 12px;
		font-size: 12px;
		letter-spacing: 0.04em;
		line-height: 1.25;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}
