/**
 * Adworth Cargo Management System - Frontend Stylesheet
 * Responsive, modern design system for public & staff operations.
 */

:root {
	--acms-primary: #2d3192;
	--acms-primary-hover: #1f2266;
	--acms-primary-light: #eceef9;
	--acms-primary-tint: #f4f5fc;
	--acms-cta: #ff6600;
	--acms-cta-hover: #e65c00;
	--acms-cta-light: #fff4eb;
	--acms-cta-border: #ffd1b3;
	--acms-brand-head: #2d3192;
	--acms-brand-orange: #ff6600;
	--acms-secondary: #0f172a;
	--acms-bg: #f8fafc;
	--acms-card-bg: #ffffff;
	--acms-border: #e2e8f0;
	--acms-border-dark: #cbd5e1;
	--acms-text: #334155;
	--acms-text-dark: #0f172a;
	--acms-text-muted: #64748b;
	--acms-success: #059669;
	--acms-success-bg: #ecfdf5;
	--acms-warning: #d97706;
	--acms-warning-bg: #fffbeb;
	--acms-danger: #dc2626;
	--acms-danger-bg: #fef2f2;
	--acms-radius: 10px;
	--acms-radius-sm: 6px;
	--acms-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--acms-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--acms-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--acms-sidebar-width: 240px;
	--acms-sidebar-collapsed-width: 64px;
	--acms-header-height: 60px;
}

/* ============================================================
   CORPORATE DEFAULT STYLE — enforced across all Cargo UI
   Font: Inter (body/UI) + Montserrat (headings), weights 400/500/600/700/800,
   style normal, optimized for corporate legibility.
   ============================================================ */
.acms-container, .acms-hub-layout, .acms-site-header, .acms-site-footer, .acms-track-popup, .acms-access-denied-wrap {
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
	color: var(--acms-text) !important;
	font-weight: 400 !important;
	font-style: normal !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
.acms-container *, .acms-hub-layout *, .acms-site-header *, .acms-site-footer *, .acms-track-popup *, .acms-access-denied-wrap * { box-sizing: border-box; }
.acms-container h1, .acms-hub-layout h1, .acms-site-header h1, .acms-access-denied-wrap h1,
.acms-container h2, .acms-hub-layout h2, .acms-site-header h2, .acms-access-denied-wrap h2,
.acms-container h3, .acms-hub-layout h3, .acms-site-header h3, .acms-access-denied-wrap h3,
.acms-container h4, .acms-hub-layout h4, .acms-site-header h4, .acms-access-denied-wrap h4 {
	font-family: Montserrat, Inter, Arial, sans-serif !important;
	font-weight: 700 !important;
	font-style: normal !important;
	line-height: 1.25 !important;
	letter-spacing: -0.02em !important;
}
.acms-container h1, .acms-hub-layout h1, .acms-access-denied-wrap h1 { font-size: clamp(21px, 2.5vw, 28px) !important; font-weight: 800 !important; }
.acms-container h2, .acms-hub-layout h2, .acms-access-denied-wrap h2 { font-size: clamp(19px, 2.2vw, 24px) !important; font-weight: 700 !important; }
.acms-container h3, .acms-hub-layout h3, .acms-access-denied-wrap h3 { font-size: 17px !important; font-weight: 700 !important; }
.acms-container h4, .acms-hub-layout h4, .acms-access-denied-wrap h4 { font-size: 15px !important; font-weight: 600 !important; }
.acms-container input, .acms-container select, .acms-container textarea, .acms-container button,
.acms-hub-layout input, .acms-hub-layout select, .acms-hub-layout textarea, .acms-hub-layout button,
.acms-site-header input, .acms-site-header button, .acms-access-denied-wrap input, .acms-access-denied-wrap button {
	font-family: Inter, Arial, sans-serif !important;
	font-weight: 500 !important;
	font-style: normal !important;
}
.acms-label { font-weight: 600 !important; font-style: normal !important; }
.acms-btn { font-weight: 600 !important; font-style: normal !important; letter-spacing: 0.01em !important; }
.acms-kicker { font-weight: 700 !important; letter-spacing: 0.1em !important; }
.acms-badge { font-weight: 600 !important; }
.acms-nav-link, .acms-sidebar-nav-link { font-weight: 500 !important; }
.acms-nav-link.active, .acms-sidebar-nav-link.active { font-weight: 700 !important; }

/* ===== SITE HEADER (standalone pages) ===== */
.acms-site-header {
	--acms-header-height: 64px;
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.9);
	color: #0f172a;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	backdrop-filter: saturate(180%) blur(18px);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

body.admin-bar .acms-site-header {
	top: 32px;
}

.acms-site-header-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding: 0 24px;
	height: var(--acms-header-height);
}

.acms-site-header .acms-site-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	margin-left: -4px;
	padding: 4px;
	border-radius: 10px;
	text-decoration: none;
	color: #0f172a;
	flex-shrink: 0;
	transition: opacity 0.18s ease;
}

.acms-site-header .acms-site-brand:hover {
	opacity: 0.8;
	color: #0f172a;
}

.acms-site-logo {
	width: 36px;
	height: 36px;
	padding: 4px;
	border-radius: 10px;
	background: #ffffff;
	border: 1px solid #e6eaf2;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}

.acms-site-logo img {
	max-width: 28px;
	max-height: 28px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.acms-site-header .acms-site-brand-text {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 260px;
}

.acms-site-nav {
	display: flex;
	align-items: center;
	gap: 26px;
	margin-left: auto;
}

.acms-site-header .acms-site-nav-link {
	position: relative;
	padding: 8px 0;
	color: #64748b;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: -0.005em;
	white-space: nowrap;
	transition: color 0.18s ease;
}

.acms-site-header .acms-site-nav-link:hover {
	color: #0f172a;
}

.acms-site-header .acms-site-nav-link.active {
	color: #0f172a;
}

.acms-site-header .acms-site-nav-link.active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -1px;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: #ff6600;
	transform: translateX(-50%);
}

.acms-site-header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-left: 22px;
	border-left: 1px solid #eef1f6;
	flex-shrink: 0;
}

.acms-site-user {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
}

.acms-site-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #1b1e55;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
}

.acms-site-user-name {
	font-size: 12.5px;
	font-weight: 600;
	color: #334155;
	max-width: 130px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acms-site-header .acms-site-logout,
.acms-site-header .acms-site-signin {
	font-size: 12.5px;
	font-weight: 600;
	color: #64748b;
	text-decoration: none;
	padding: 8px 2px;
	white-space: nowrap;
	transition: color 0.18s ease;
}

.acms-site-header .acms-site-logout:hover,
.acms-site-header .acms-site-signin:hover {
	color: #0f172a;
}

.acms-site-header .acms-site-btn {
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1;
	padding: 11px 17px;
	border-radius: 10px;
	text-decoration: none;
	box-shadow: none;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.acms-site-header .acms-site-btn-cta {
	background: #1b1e55;
	border: 1px solid #1b1e55;
	color: #ffffff;
}

.acms-site-header .acms-site-btn-cta:hover {
	background: #0f172a;
	border-color: #0f172a;
	color: #ffffff;
	transform: translateY(-1px);
}

.acms-site-menu-toggle {
	display: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 10px;
	background: #ffffff;
	border: 1px solid #e6eaf2;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	flex-shrink: 0;
	transition: background 0.18s ease, border-color 0.18s ease;
}

.acms-site-menu-toggle:hover {
	background: #f8fafc;
	border-color: #dbe2ec;
}

.acms-site-menu-toggle span {
	display: block;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: #0f172a;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.acms-site-menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.acms-site-menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.acms-site-menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.acms-site-mobile {
	display: none;
	padding: 10px 16px 18px;
	border-top: 1px solid #eef1f6;
	background: rgba(255, 255, 255, 0.98);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
}

.acms-site-mobile:not([hidden]) {
	display: block;
	animation: acms-site-mobile-in 0.18s ease both;
}

@keyframes acms-site-mobile-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

.acms-site-mobile-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.acms-site-header .acms-site-mobile-link {
	display: flex;
	align-items: center;
	padding: 11px 12px;
	border-radius: 8px;
	color: #475569;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.18s ease, color 0.18s ease;
}

.acms-site-header .acms-site-mobile-link:hover {
	background: #f8fafc;
	color: #0f172a;
}

.acms-site-header .acms-site-mobile-link.active {
	background: #f1f5f9;
	color: #0f172a;
}

.acms-site-mobile-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
	padding-top: 14px;
	border-top: 1px solid #eef1f6;
}

.acms-site-mobile-actions .acms-site-user {
	flex: 1 1 auto;
}

.acms-site-mobile-actions .acms-site-btn {
	flex: 1 1 auto;
	justify-content: center;
	text-align: center;
}

@media (max-width: 900px) {
	.acms-site-nav {
		display: none;
	}
	.acms-site-header-actions {
		display: none;
	}
	.acms-site-menu-toggle {
		display: flex;
	}
	.acms-site-header-inner {
		height: 60px;
		min-height: 0;
		padding: 0 16px;
		gap: 12px;
	}
	.acms-site-header .acms-site-brand {
		margin-left: 0;
	}
}

@media (max-width: 782px) {
	body.admin-bar .acms-site-header {
		top: 46px;
	}
}

@media (max-width: 480px) {
	.acms-site-header-inner {
		height: 58px;
	}
	.acms-site-logo {
		width: 34px;
		height: 34px;
		border-radius: 9px;
	}
	.acms-site-header .acms-site-brand-text {
		font-size: 14px;
		max-width: 190px;
	}
	.acms-site-menu-toggle {
		width: 38px;
		height: 38px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.acms-site-brand,
	.acms-site-nav-link,
	.acms-site-menu-toggle,
	.acms-site-menu-toggle span,
	.acms-site-header .acms-site-btn {
		transition: none;
	}
	.acms-site-mobile:not([hidden]) {
		animation: none;
	}
}

/* ===== COMPACT TRACKING SEARCH [acms_search1] ===== */
.acms-search1-wrap {
	width: 100%;
	max-width: 520px;
	margin: 0;
}

.acms-search1 {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 6px 6px 6px 16px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	box-shadow: 0 10px 30px -20px rgba(15, 23, 42, 0.45), 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.acms-search1:focus-within {
	border-color: #c7cbe8;
	box-shadow: 0 0 0 4px rgba(45, 49, 146, 0.1), 0 10px 30px -20px rgba(15, 23, 42, 0.45);
}

.acms-search1-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: #94a3b8;
	flex: 0 0 auto;
}

.acms-search1-icon svg {
	display: block;
}

.acms-search1 .acms-search1-input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 11px 0;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.4;
	color: #0f172a;
	-webkit-appearance: none;
	appearance: none;
}

.acms-search1 .acms-search1-input::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.acms-search1 .acms-search1-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.acms-search1 .acms-search1-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	flex: 0 0 auto;
	margin: 0;
	padding: 11px 16px;
	border: 0;
	border-radius: 11px;
	background: #1b1e55;
	color: #ffffff;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background 0.18s ease, transform 0.18s ease;
}

.acms-search1 .acms-search1-submit:hover {
	background: #0f172a;
	color: #ffffff;
	transform: translateY(-1px);
}

.acms-search1-submit svg {
	display: block;
}

@media (max-width: 480px) {
	.acms-search1 {
		gap: 8px;
		padding: 5px 5px 5px 13px;
		border-radius: 14px;
	}
	.acms-search1 .acms-search1-input {
		padding: 10px 0;
		font-size: 14px;
	}
	.acms-search1 .acms-search1-submit {
		padding: 10px 13px;
	}
	.acms-search1-submit-text {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.acms-search1,
	.acms-search1 .acms-search1-submit {
		transition: none;
	}
}

/* ===== SITE FOOTER (standalone pages) ===== */
.acms-site-footer {
	background: var(--acms-secondary);
	color: rgba(255,255,255,0.6);
	text-align: center;
	padding: 24px;
	font-size: 13px;
	margin-top: 40px;
}

.acms-site-footer a {
	color: rgba(255,255,255,0.8);
	text-decoration: none;
}

.acms-site-footer a:hover {
	color: #ffffff;
}

.acms-site-footer-links {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

/* ===== HUB FOOTER (inside dashboards) ===== */
.acms-hub-footer {
	border-top: 1px solid var(--acms-border);
	padding: 20px 30px;
	text-align: center;
	font-size: 12px;
	color: var(--acms-text-muted);
	background: var(--acms-card-bg);
	flex-shrink: 0;
	margin-top: auto;
}

.acms-hub-footer a {
	color: var(--acms-text-muted);
	text-decoration: none;
	margin: 0 10px;
}

.acms-hub-footer a:hover {
	color: var(--acms-primary);
}

.acms-hub-footer-links {
	margin-bottom: 6px;
}

/* ===== LAYOUT ===== */
.acms-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: var(--acms-text);
	background: var(--acms-bg);
	padding: 30px 24px;
	box-sizing: border-box;
	line-height: 1.5;
	min-height: 100vh;
}

.acms-shell {
	max-width: 1200px;
	margin: 0 auto;
}

/* ===== SIDEBAR HUB LAYOUT ===== */
.acms-hub-layout {
	display: grid;
	grid-template-columns: var(--acms-sidebar-width) 1fr;
	gap: 0;
	min-height: 100vh;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	transition: grid-template-columns 0.25s ease;
}

.acms-sidebar {
	background: var(--acms-card-bg);
	border-right: 1px solid var(--acms-border);
	padding: 12px 0;
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100dvh;
	overflow-y: auto;
	overflow-x: hidden;
	transition: width 0.25s ease;
	scrollbar-width: thin;
	scrollbar-color: var(--acms-border) transparent;
}
/* Desktop: ensure all 16+ tabs fit without scrolling off screen */
@media (min-width: 1024px) and (min-height: 700px) {
	.acms-sidebar { padding: 10px 0; }
	.acms-sidebar-brand { padding: 2px 14px 10px; margin-bottom: 8px; }
	.acms-sidebar-user { padding: 0 14px 10px; margin-bottom: 8px; }
	.acms-sidebar-nav-link { padding: 6px 14px; font-size: 12px; }
	.acms-sidebar-footer { padding: 10px 14px 0; margin-top: 8px; }
}
@media (min-width: 1280px) {
	.acms-hub-content { padding: 20px 24px; }
	.acms-card { padding: 20px; }
}

/* Customer bookings: compact booking ID, items, actions */
.acms-col-booking-id { width: 106px; min-width: 106px; max-width: 118px; }
.acms-col-route { min-width: 150px; }
.acms-col-items { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acms-col-actions { width: 108px; min-width: 108px; max-width: 120px; }
.acms-actions-select {
	min-width: 92px !important;
	max-width: 110px;
	width: 102px;
	padding: 4px 18px 4px 6px !important;
	font-size: 11px !important;
	font-weight: 500;
	line-height: 1.2;
	border-radius: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.acms-actions-select option {
	font-size: 11px;
	white-space: normal;
	word-wrap: break-word;
	padding: 4px 6px;
}
.acms-copy-id {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	padding: 4px 8px;
	font-size: 11.5px;
	font-weight: 600;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
	letter-spacing: 0.02em;
	color: var(--acms-secondary);
	background: #f1f5f9;
	border: 1px solid var(--acms-border);
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}
.acms-copy-id:hover { background: var(--acms-primary-light); border-color: var(--acms-primary); color: var(--acms-primary); }
.acms-copy-id:active { transform: scale(0.98); }
.acms-copy-id.copied { background: var(--acms-success-bg); border-color: var(--acms-success); color: var(--acms-success); }
.acms-copy-id::after {
	content: "⧉";
	font-size: 10px;
	opacity: 0.6;
	flex-shrink: 0;
}
.acms-copy-id.copied::after { content: "✓"; opacity: 1; }
/* Tighten table on desktop so all 9 columns fit 1024px */
@media (min-width: 1024px) {
	#acms-shipments-table th, #acms-shipments-table td { padding: 9px 10px; font-size: 12.5px; }
	#acms-shipments-table .acms-badge { font-size: 10px; padding: 2px 6px; }
	#acms-shipments-table .acms-btn-sm { padding: 3px 8px; font-size: 11px; }
}
/* Mobile: keep horizontal scroll, already handled; ensure copy tap target large enough */
@media (max-width: 768px) {
	.acms-copy-id { padding: 6px 10px; font-size: 12px; min-height: 32px; }
	#acms-shipments-table { min-width: 820px; }
}

/* ===== COLLAPSIBLE SIDEBAR ===== */
.acms-sidebar-collapse-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	background: transparent;
	border: 0;
	border-top: 1px solid var(--acms-border);
	padding: 8px 0;
	margin-top: 8px;
	cursor: pointer;
	color: var(--acms-text-muted);
	font-size: 12px;
	transition: background 0.15s ease, color 0.15s ease;
}

.acms-sidebar-collapse-btn:hover {
	background: var(--acms-primary-light);
	color: var(--acms-primary);
}

/* Sidebar collapsed state */
.acms-hub-layout.sidebar-collapsed {
	grid-template-columns: var(--acms-sidebar-collapsed-width) 1fr;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar {
	width: var(--acms-sidebar-collapsed-width);
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-nav-link {
	justify-content: center;
	padding: 12px 0;
	gap: 0;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-nav-text,
.acms-hub-layout.sidebar-collapsed .acms-sidebar-user-name,
.acms-hub-layout.sidebar-collapsed .acms-sidebar-user-role,
.acms-hub-layout.sidebar-collapsed .acms-sidebar-nav-badge {
	display: none;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-user {
	padding: 0 0 16px;
	text-align: center;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-footer {
	padding: 16px 0 0;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-logout {
	justify-content: center;
	padding-left: 0;
	padding-right: 0;
	width: 100%;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-logout .acms-sidebar-nav-text {
	display: none;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-collapse-btn .acms-sidebar-collapse-icon {
	transform: rotate(180deg);
}

.acms-sidebar-collapse-icon {
	display: inline-block;
	transition: transform 0.25s ease;
}

/* ===== SIDEBAR BRAND (logo) ===== */
.acms-sidebar-brand {
	padding: 4px 20px 14px;
	border-bottom: 1px solid var(--acms-border);
	margin-bottom: 12px;
	background: #ffffff;
	overflow: hidden;
	white-space: nowrap;
	transition: padding 0.25s ease;
}

.acms-sidebar-logo {
	max-width: 100%;
	height: 34px;
	width: auto;
	object-fit: contain;
	display: block;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-brand {
	padding: 4px 8px 14px;
	text-align: center;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-logo {
	max-width: 40px;
	height: auto;
	margin: 0 auto;
}

.acms-sidebar-user {
	padding: 0 20px 16px;
	border-bottom: 1px solid var(--acms-border);
	margin-bottom: 12px;
	overflow: hidden;
	white-space: nowrap;
	transition: padding 0.25s ease;
}

.acms-hub-layout.sidebar-collapsed .acms-sidebar-user {
	padding: 0 0 16px;
}

.acms-sidebar-user-name {
	font-weight: 700;
	font-size: 14px;
	color: var(--acms-secondary);
	margin-bottom: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.acms-sidebar-user-role {
	font-size: 12px;
	color: var(--acms-text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
}

.acms-sidebar-nav {
	list-style: none;
	padding: 0;
	margin: 0;
}

.acms-sidebar-nav-item {
	margin: 0;
}

.acms-sidebar-nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	/* Inactive menu items must always be black text. */
	color: #000000 !important;
	text-decoration: none;
	font-size: 12.5px;
	font-weight: 500;
	transition: all 0.15s ease;
	border-left: 3px solid transparent;
	white-space: nowrap;
	overflow: hidden;
	line-height: 1.2;
}

.acms-sidebar-nav-link .acms-sidebar-nav-text {
	color: #000000 !important;
}

.acms-sidebar-nav-link:hover {
	background: var(--acms-primary-light);
	color: var(--acms-primary);
	border-left-color: var(--acms-primary);
}

.acms-sidebar-nav-link.active {
	background: var(--acms-primary-light);
	color: var(--acms-primary);
	border-left-color: var(--acms-primary);
	font-weight: 700;
}

.acms-sidebar-nav-icon {
	width: 20px;
	text-align: center;
	flex-shrink: 0;
	font-size: 14px;
}

.acms-sidebar-nav-text {
	overflow: hidden;
	text-overflow: ellipsis;
}

.acms-sidebar-nav-badge {
	margin-left: auto;
	background: var(--acms-danger);
	color: #ffffff;
	font-size: 10px;
	padding: 2px 7px;
	border-radius: 10px;
	font-weight: 700;
	line-height: 1.3;
	flex-shrink: 0;
}

.acms-sidebar-footer {
	padding: 16px 20px 0;
	margin-top: 12px;
	border-top: 1px solid var(--acms-border);
	display: flex;
	flex-direction: column;
	gap: 0;
}

.acms-hub-content {
	padding: 24px 30px;
	background: var(--acms-bg);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	box-sizing: border-box;
}

.acms-hub-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--acms-border);
	flex-shrink: 0;
}

.acms-hub-topbar-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--acms-secondary);
	margin: 0;
}

.acms-hub-topbar-actions {
	display: flex;
	gap: 8px;
}

/* ===== HEADER & TYPOGRAPHY ===== */
.acms-header {
	margin-bottom: 24px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.acms-kicker {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--acms-primary);
	margin-bottom: 4px;
}

.acms-title {
	font-size: 26px;
	font-weight: 700;
	color: var(--acms-secondary);
	margin: 0;
}

.acms-subtitle {
	color: var(--acms-text-muted);
	font-size: 14px;
	margin: 4px 0 0;
}

/* ===== TAB NAVIGATION (horizontal - kept for backwards compat) ===== */
.acms-nav-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	background: #ffffff;
	padding: 8px;
	border-radius: var(--acms-radius);
	border: 1px solid var(--acms-border);
	margin-bottom: 24px;
	box-shadow: var(--acms-shadow);
}

.acms-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: var(--acms-radius-sm);
	color: var(--acms-text);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	transition: all 0.15s ease;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.acms-nav-link:hover {
	background: var(--acms-primary-light);
	color: var(--acms-primary);
}

.acms-nav-link.active {
	background: var(--acms-primary);
	color: #ffffff;
}

.acms-nav-badge {
	background: rgba(0, 0, 0, 0.15);
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 10px;
	line-height: 1;
}

.acms-tab-content {
	display: none;
	flex: 1;
}

.acms-tab-content.active {
	display: block;
	animation: acmsFadeIn 0.2s ease-in-out;
	flex: 1;
}

@keyframes acmsFadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ===== KPI CARDS ===== */
.acms-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.acms-kpi-card {
	background: var(--acms-card-bg);
	border: 1px solid var(--acms-border);
	border-radius: var(--acms-radius);
	padding: 18px;
	box-shadow: var(--acms-shadow);
	position: relative;
	overflow: hidden;
}

.acms-kpi-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--acms-primary);
}

.acms-kpi-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--acms-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.acms-kpi-value {
	font-size: 28px;
	font-weight: 700;
	color: var(--acms-secondary);
	margin-top: 6px;
	line-height: 1.1;
}

/* ===== CARDS ===== */
.acms-card {
	background: var(--acms-card-bg);
	border: 1px solid var(--acms-border);
	border-radius: var(--acms-radius);
	padding: 24px;
	box-shadow: var(--acms-shadow);
	margin-bottom: 24px;
}

.acms-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--acms-border);
	padding-bottom: 14px;
	margin-bottom: 18px;
}

.acms-card-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	color: var(--acms-secondary);
}

/* ===== TOOLBAR & FILTERS ===== */
.acms-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.acms-search-form {
	display: flex;
	gap: 8px;
	flex: 1;
	max-width: 450px;
}

.acms-filter-group {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* ===== TABLES ===== */
.acms-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--acms-radius-sm);
	border: 1px solid var(--acms-border);
	background: #ffffff;
}

.acms-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	text-align: left;
}

.acms-table th {
	background: var(--acms-brand-head, #2d3192);
	color: #ffffff;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.05em;
	padding: 12px 14px;
	border-bottom: 2px solid var(--acms-primary-hover, #1f2266);
	white-space: nowrap;
}

.acms-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--acms-border);
	vertical-align: middle;
}

.acms-table tr:last-child td {
	border-bottom: 0;
}

.acms-table tr:hover td {
	background: var(--acms-primary-tint, #f4f5fc);
}

/* ===== SORTABLE TABLE HEADERS ===== */
.acms-table-sortable th[data-sort] {
	cursor: pointer;
	user-select: none;
	position: relative;
	padding-right: 24px;
}

.acms-table-sortable th[data-sort]:hover {
	background: var(--acms-primary-hover, #1f2266);
	color: #ffffff;
}

.acms-table-sortable th[data-sort]:after {
	content: " ⇅";
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	position: absolute;
	right: 6px;
}

.acms-table-sortable th.sort-asc[data-sort]:after {
	content: " ↑";
	color: rgba(255, 255, 255, 0.85);
}

.acms-table-sortable th.sort-desc[data-sort]:after {
	content: " ↓";
	color: rgba(255, 255, 255, 0.85);
}

/* ===== BADGES ===== */
.acms-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
}

.acms-badge-pending { background: #fef3c7; color: #92400e; }
.acms-badge-approved { background: #ecfdf5; color: #059669; }
.acms-badge-rejected { background: #fee2e2; color: #991b1b; }
.acms-badge-status { background: #eceef9; color: #2d3192; }
.acms-badge-paid { background: #ecfdf5; color: #059669; }
.acms-badge-delivered { background: #ecfdf5; color: #059669; }
.acms-badge-intransit { background: #fff4eb; color: #c2410c; border: 1px solid #ffd1b3; }

.acms-doc-label {
	display: block;
	margin: 0 0 2px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: var(--acms-text-muted, #64748b);
}

.acms-booking-actions {
	border: 1px solid var(--acms-border, #e2e8f0);
	background: var(--acms-surface, #ffffff);
	cursor: pointer;
	color: var(--acms-text, #0f172a);
}
.acms-booking-actions:focus { outline: 2px solid var(--acms-primary, #2d3192); outline-offset: 1px; }


/* ===== BUTTONS ===== */
.acms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: var(--acms-radius-sm);
	font-size: 13px;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s ease;
	line-height: 1.4;
	white-space: nowrap;
}

/* Primary action buttons carry the corporate navy; the orange stays available
   via .acms-btn-cta for highlighted calls-to-action only. */
.acms-btn-primary {
	background: var(--acms-brand-head, #2d3192);
	color: #ffffff;
	box-shadow: 0 2px 5px rgba(45, 49, 146, 0.28);
}

.acms-btn-primary:hover {
	background: var(--acms-primary-hover, #1f2266);
	color: #ffffff;
	box-shadow: 0 4px 10px rgba(45, 49, 146, 0.35);
}

.acms-btn-cta {
	background: var(--acms-cta, #ff6600);
	color: #ffffff;
	box-shadow: 0 2px 5px rgba(255, 102, 0, 0.25);
}

.acms-btn-cta:hover {
	background: var(--acms-cta-hover, #e65c00);
	color: #ffffff;
	box-shadow: 0 4px 10px rgba(255, 102, 0, 0.35);
}

/* Force readable white labels on solid brand buttons — theme stylesheets can
   otherwise paint the text in the same color as the button background. */
.acms-btn-primary,
.acms-btn-cta,
.acms-btn-navy,
.acms-btn-brand {
	color: #ffffff !important;
}
.acms-btn-primary:hover,
.acms-btn-cta:hover,
.acms-btn-navy:hover,
.acms-btn-brand:hover {
	color: #ffffff !important;
}
.acms-btn-primary *,
.acms-btn-cta *,
.acms-btn-navy *,
.acms-btn-brand * {
	color: inherit !important;
}

.acms-btn-navy,
.acms-btn-brand {
	background: var(--acms-brand-head, #2d3192);
	color: #ffffff;
}

.acms-btn-navy:hover,
.acms-btn-brand:hover {
	background: var(--acms-primary-hover, #1f2266);
	color: #ffffff;
}

.acms-btn-secondary {
	background: #ffffff;
	border-color: var(--acms-border);
	color: var(--acms-text);
}

.acms-btn-secondary:hover {
	background: #f1f5f9;
	color: var(--acms-secondary);
}

.acms-btn-success {
	background: var(--acms-success);
	color: #ffffff;
}

.acms-btn-danger {
	background: var(--acms-danger);
	color: #ffffff;
}

.acms-btn-sm {
	padding: 4px 10px;
	font-size: 12px;
}

/* ===== FORMS & INPUTS ===== */
.acms-form-group {
	margin-bottom: 16px;
}

.acms-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--acms-secondary);
	margin-bottom: 5px;
}

.acms-input,
.acms-select,
.acms-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border: 1px solid var(--acms-border);
	border-radius: var(--acms-radius-sm);
	font-size: 14px;
	color: var(--acms-text);
	background: #ffffff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.acms-input:focus,
.acms-select:focus,
.acms-textarea:focus {
	outline: none;
	border-color: var(--acms-primary);
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.acms-textarea {
	min-height: 80px;
	resize: vertical;
}

.acms-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.acms-grid-3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.acms-grid-4 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.acms-fieldset {
	border: 1px solid var(--acms-border);
	border-radius: var(--acms-radius-sm);
	padding: 16px;
	margin-bottom: 16px;
	background: #ffffff;
}

.acms-legend {
	font-size: 13px;
	font-weight: 700;
	color: var(--acms-primary);
	padding: 0 6px;
}

/* ===== TIMELINE ===== */
.acms-timeline {
	list-style: none;
	padding: 0;
	margin: 0;
	position: relative;
}

.acms-timeline-item {
	display: flex;
	gap: 14px;
	padding-bottom: 20px;
	position: relative;
}

.acms-timeline-item:last-child {
	padding-bottom: 0;
}

.acms-timeline-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--acms-primary);
	margin-top: 5px;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
}

.acms-timeline-line {
	position: absolute;
	left: 5px;
	top: 17px;
	bottom: 0;
	width: 2px;
	background: var(--acms-border);
}

.acms-timeline-item:last-child .acms-timeline-line {
	display: none;
}

.acms-timeline-content {
	flex: 1;
}

.acms-timeline-time {
	font-size: 11px;
	color: var(--acms-text-muted);
}

/* ===== ALERTS ===== */
.acms-alert {
	padding: 12px 16px;
	border-radius: var(--acms-radius-sm);
	margin-bottom: 18px;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.acms-alert-success { background: var(--acms-success-bg); color: #166534; border: 1px solid #bbf7d0; }
.acms-alert-error { background: var(--acms-danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.acms-alert-warning { background: var(--acms-warning-bg); color: #92400e; border: 1px solid #fde68a; }

/* ===== CUSTOMER PROFILE & CARDS ===== */
.acms-customer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.acms-customer-card {
	background: #ffffff;
	border: 1px solid var(--acms-border);
	border-radius: var(--acms-radius);
	padding: 16px;
	text-decoration: none;
	color: inherit;
	display: flex;
	gap: 14px;
	align-items: center;
	transition: all 0.15s ease;
}

.acms-customer-card:hover {
	border-color: var(--acms-primary);
	box-shadow: var(--acms-shadow-md);
	transform: translateY(-1px);
}

.acms-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--acms-primary-light);
	color: var(--acms-primary);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.acms-avatar-lg {
	width: 64px;
	height: 64px;
	font-size: 24px;
}

/* ===== MODAL ===== */
.acms-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.acms-modal-backdrop.active {
	opacity: 1;
	visibility: visible;
}

.acms-modal {
	background: #ffffff;
	border-radius: var(--acms-radius);
	max-width: 680px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: var(--acms-shadow-lg);
	padding: 24px;
	position: relative;
}

.acms-modal-close {
	position: absolute;
	top: 18px;
	right: 18px;
	background: transparent;
	border: 0;
	font-size: 20px;
	cursor: pointer;
	color: var(--acms-text-muted);
}

/* ===== MOBILE SIDEBAR TOGGLE ===== */
.acms-mobile-sidebar-toggle {
	display: none;
	background: var(--acms-primary);
	color: #ffffff;
	border: 0;
	border-radius: var(--acms-radius-sm);
	padding: 6px 10px;
	font-size: 16px;
	cursor: pointer;
	line-height: 1;
}
@media (min-width: 769px) { .acms-mobile-sidebar-toggle { display: none !important; } }

/* ===== ITEMS TO SHIP LIST ===== */
.acms-items-list {
	counter-reset: acms-item;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 10px;
	padding: 12px;
	background: var(--acms-primary-tint, #f4f5fc);
	border: 1px solid var(--acms-border, #e2e8f0);
	border-radius: var(--acms-radius-sm);
}
.acms-item-row {
	counter-increment: acms-item;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 6px 4px 4px;
	background: var(--acms-card-bg, #ffffff);
	border: 1px solid var(--acms-border, #e2e8f0);
	border-radius: 7px;
	box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
	transition: border-color 0.15s, box-shadow 0.15s;
}
.acms-item-row:focus-within {
	border-color: var(--acms-primary, #2d3192);
	box-shadow: 0 0 0 3px rgb(45 49 146 / 0.08);
}
.acms-item-row::before {
	content: counter(acms-item);
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--acms-primary-light, #eceef9);
	color: var(--acms-primary, #2d3192);
	font-size: 11px;
	font-weight: 700;
}
.acms-item-row .acms-input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	padding-left: 0;
}
.acms-item-row .acms-input:focus {
	outline: none;
	box-shadow: none;
}
.acms-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background: transparent;
	color: var(--acms-text-muted, #64748b);
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	opacity: 0.75;
	transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.acms-btn-icon:hover {
	opacity: 1;
	background: var(--acms-danger-bg, #fef2f2);
	color: var(--acms-danger, #dc2626);
}
.acms-item-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 9px 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--acms-primary, #2d3192);
	background: transparent;
	border: 1.5px dashed var(--acms-primary, #2d3192);
	border-radius: var(--acms-radius-sm);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.acms-item-add::before {
	content: "+";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--acms-primary, #2d3192);
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}
.acms-item-add:hover {
	background: var(--acms-primary-light, #eceef9);
	border-style: solid;
}

/* ===== PENDING REVIEW BANNER ===== */
.acms-pending-banner {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0 0 18px;
	padding: 12px 16px;
	background: var(--acms-warning-bg, #fffbeb);
	border: 1px solid #fde68a;
	border-left: 4px solid var(--acms-warning, #d97706);
	border-radius: var(--acms-radius-sm);
	font-size: 13.5px;
	color: #78350f;
}
.acms-pending-banner strong {
	font-weight: 700;
	white-space: nowrap;
}

/* ===== ATTACHMENT TABLE CELL ===== */
.acms-attach-cell .acms-attach-select {
	min-width: 132px;
	padding: 6px 26px 6px 10px;
	font-size: 12.5px;
	font-weight: 500;
	border-radius: 6px;
	background-color: #ffffff;
	background-image: linear-gradient(45deg, transparent 50%, var(--acms-text-muted, #64748b) 50%), linear-gradient(135deg, var(--acms-text-muted, #64748b) 50%, transparent 50%);
	background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
	background-size: 5px 5px;
	background-repeat: no-repeat;
	-webkit-appearance: none;
	appearance: none;
}
.acms-attach-cell .acms-attach-select:hover {
	border-color: var(--acms-primary, #2d3192);
}

/* ===== LOGIN HELPERS ===== */
.acms-linklike {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--acms-primary, #2d3192);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.acms-linklike:hover {
	color: var(--acms-primary-hover, #1f2266);
}
.acms-forgot-panel {
	margin-top: 14px;
	padding: 16px;
	background: var(--acms-primary-tint, #f4f5fc);
	border: 1px solid var(--acms-border, #e2e8f0);
	border-radius: var(--acms-radius-sm);
}

/* ===== HUB FOOTER ===== */
.acms-hub-footer {
	margin-top: 8px;
	padding-top: 16px;
	border-top: 1px solid var(--acms-border, #e2e8f0);
}

/* ===== FEEDBACK ===== */
.acms-rating-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.acms-rating-pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1.5px solid var(--acms-border, #e2e8f0);
	border-radius: 50%;
	cursor: pointer;
	font-weight: 700;
	font-size: 14px;
	color: var(--acms-text, #0f172a);
	background: var(--acms-card-bg, #fff);
	transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}
.acms-rating-pill input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}
.acms-rating-pill:has(input:checked) {
	background: var(--acms-primary, #2d3192);
	border-color: var(--acms-primary, #2d3192);
	color: #ffffff;
	transform: scale(1.06);
}
.acms-rating-pill:has(input:focus-visible) {
	outline: 2px solid var(--acms-primary, #2d3192);
	outline-offset: 2px;
}
.acms-feedback-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.acms-feedback-item {
	padding: 14px 16px;
	border: 1px solid var(--acms-border, #e2e8f0);
	border-left: 4px solid var(--acms-warning, #d97706);
	border-radius: var(--acms-radius-sm);
	background: var(--acms-card-bg, #fff);
}
.acms-feedback-answered {
	border-left-color: var(--acms-success, #059669);
}
.acms-feedback-closed {
	border-left-color: var(--acms-border-dark, #cbd5e1);
	opacity: 0.85;
}
.acms-feedback-head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.acms-feedback-stars {
	color: #d97706;
	letter-spacing: 2px;
	font-size: 13px;
}
.acms-feedback-date {
	margin-left: auto;
	font-size: 12px;
	color: var(--acms-text-muted, #64748b);
	white-space: nowrap;
}
.acms-feedback-meta {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: var(--acms-text-muted, #64748b);
}
.acms-feedback-message {
	margin: 8px 0 0;
	font-size: 14px;
	white-space: pre-wrap;
}
.acms-feedback-reply {
	margin-top: 10px;
	padding: 10px 12px;
	background: var(--acms-success-bg, #ecfdf5);
	border: 1px solid #a7f3d0;
	border-radius: 6px;
	font-size: 13.5px;
}
.acms-feedback-reply strong {
	display: block;
	margin-bottom: 4px;
	color: #065f46;
	font-size: 12.5px;
}
.acms-feedback-reply p {
	margin: 0;
	white-space: pre-wrap;
}
.acms-feedback-actions {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	flex-wrap: wrap;
}
.acms-feedback-actions .acms-input {
	flex: 1;
	min-width: 220px;
}

/* ===== RESPONSIVENESS HARDENING ===== */

/* Tablet and below: tables become edge-scrollable cards with sticky first
   column feel; keep layouts on a single axis. */
@media (max-width: 900px) {
	.acms-grid-3,
	.acms-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	/* Data tables: horizontal scroll instead of crushed columns. */
	.acms-table-responsive {
		-webkit-overflow-scrolling: touch;
		border-radius: var(--acms-radius-sm);
	}
	.acms-table {
		min-width: 720px;
	}
	.acms-table th,
	.acms-table td {
		padding: 10px 12px;
		white-space: normal;
	}
	/* Forms keep full width; selects and inputs stop overflowing. */
	.acms-form-group .acms-input,
	.acms-form-group .acms-select,
	.acms-form-group .acms-textarea,
	.acms-input,
	.acms-select,
	.acms-textarea {
		max-width: 100%;
	}
	/* Toolbars, headers and actions stack and wrap cleanly. */
	.acms-card-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.acms-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.acms-search-form {
		display: flex;
		gap: 8px;
		max-width: 100%;
	}
	.acms-search-form .acms-input {
		flex: 1;
		min-width: 0;
	}
	/* Review banner and feedback rows wrap instead of clipping. */
	.acms-pending-banner {
		flex-direction: column;
		gap: 4px;
	}
	.acms-feedback-head {
		align-items: flex-start;
	}
	.acms-feedback-date {
		margin-left: 0;
		width: 100%;
	}
	/* Full-width primary buttons on small touch targets. */
	.acms-form-group .acms-btn,
	form > .acms-btn {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.acms-grid-2,
	.acms-grid-3,
	.acms-grid-4 {
		grid-template-columns: 1fr;
	}
	.acms-hub-topbar {
		flex-wrap: wrap;
		gap: 8px;
	}
	.acms-hub-topbar-actions .acms-btn {
		width: 100%;
	}
	.acms-item-row {
		gap: 6px;
	}
	.acms-item-row::before {
		width: 18px;
		height: 18px;
		font-size: 10px;
	}
	.acms-rating-pill {
		width: 38px;
		height: 38px;
	}
	.acms-feedback-actions .acms-btn {
		flex: 1 1 auto;
	}
}

/* ===== DISABLED TRACK BUTTON (cancelled bookings) ===== */
.acms-track-disabled {
	position: relative;
	cursor: not-allowed !important;
	opacity: 0.55;
	pointer-events: auto;
	user-select: none;
	display: inline-flex;
	align-items: center;
}
.acms-track-disabled:hover {
	filter: none;
}
.acms-hover-tip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: #1e293b;
	color: #ffffff;
	font-size: 11px;
	font-weight: 500;
	padding: 5px 10px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, transform 0.15s ease;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
	z-index: 60;
}
.acms-hover-tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: #1e293b;
}
.acms-track-disabled:hover .acms-hover-tip,
.acms-track-disabled:focus .acms-hover-tip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE ===== */

/* Phones only: sidebar becomes off-canvas, hamburger appears */
@media (max-width: 768px) {
	.acms-hub-layout,
	.acms-hub-layout.sidebar-collapsed {
		grid-template-columns: 1fr;
	}
	.acms-sidebar,
	.acms-hub-layout.sidebar-collapsed .acms-sidebar {
		position: fixed;
		top: 0;
		left: -300px;
		width: 280px;
		max-width: 85vw;
		height: 100vh;
		height: 100dvh;
		z-index: 900;
		box-shadow: var(--acms-shadow-lg);
		transition: left 0.3s ease;
	}
	.acms-sidebar.open {
		left: 0;
	}
	.acms-hub-content,
	.acms-hub-layout.sidebar-collapsed .acms-hub-content {
		padding: 16px;
		min-height: 100vh;
		min-height: 100dvh;
		width: auto;
	}
	/* Hamburger visible on phones only */
	.acms-mobile-sidebar-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		font-size: 18px;
		border-radius: 8px;
		touch-action: manipulation;
	}
	/* Inline-collapse arrow is a desktop control */
	.acms-sidebar-collapse-btn {
		display: none !important;
	}
}

/* Phones */
@media (max-width: 768px) {
	.acms-grid-2,
	.acms-grid-3,
	.acms-grid-4 {
		grid-template-columns: 1fr;
	}
	.acms-header {
		flex-direction: column;
		align-items: flex-start;
	}
	.acms-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.acms-toolbar .acms-btn {
		align-self: flex-start;
	}
	.acms-search-form {
		max-width: 100%;
	}
	.acms-search-form .acms-input {
		flex: 1 1 auto;
		width: 100%;
	}
	.acms-kpi-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
	.acms-hub-topbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.acms-card-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	.acms-card-header .acms-btn {
		align-self: flex-start;
	}
	.acms-hub-footer {
		padding: 16px;
		text-align: center;
	}
	.acms-hub-footer nav {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 10px;
	}
	/* Tables stay scrollable instead of breaking layout */
	.acms-table-responsive {
		margin: 0 -16px;
		padding: 0 16px;
	}
}

/* Small phones */
@media (max-width: 480px) {
	.acms-container {
		padding: 16px 12px;
	}
	.acms-kpi-grid {
		grid-template-columns: 1fr;
	}
	.acms-title {
		font-size: 22px;
	}
	.acms-table {
		font-size: 12px;
	}
	.acms-table th,
	.acms-table td {
		padding: 8px 10px;
	}
	.acms-btn {
		padding: 7px 12px;
		font-size: 12px;
	}
	.acms-card {
		padding: 16px;
	}
	.acms-fieldset {
		padding: 12px;
	}
	.acms-hub-content {
		padding: 12px;
	}
}

/* Sidebar overlay backdrop for mobile */
.acms-sidebar-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.4);
	z-index: 899;
}

.acms-sidebar-overlay.active {
	display: block;
}

/* ===== NOTIFICATION TOASTS ===== */
.acms-toast-stack {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: min(360px, calc(100vw - 40px));
}
.acms-toast {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: #ffffff;
	color: #1e293b;
	border: 1px solid var(--acms-border, #e2e8f0);
	border-left: 4px solid var(--acms-primary, #2d3192);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
	padding: 12px 14px;
	cursor: pointer;
	opacity: 0;
	transform: translateX(30px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.acms-toast.acms-toast-in {
	opacity: 1;
	transform: translateX(0);
}
.acms-toast-icon {
	font-size: 20px;
	line-height: 1.2;
}
.acms-toast-body {
	flex: 1;
	min-width: 0;
}
.acms-toast-body strong {
	display: block;
	font-size: 13px;
	margin-bottom: 2px;
}
.acms-toast-body p {
	margin: 0;
	font-size: 12px;
	color: #475569;
	overflow-wrap: break-word;
}
.acms-toast-body small {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	color: #94a3b8;
}
.acms-toast-close {
	background: none;
	border: 0;
	font-size: 16px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 2px;
}
.acms-toast-close:hover {
	color: #1e293b;
}

/* Notification list */
.acms-notification-item.acms-notification-unread {
	background: var(--acms-primary-light, #eceef9);
	border-radius: 8px;
	padding-left: 10px !important;
	padding-right: 10px !important;
}
.acms-notification-item.acms-notification-unread strong::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--acms-primary, #2d3192);
	margin-right: 6px;
	vertical-align: middle;
}

@media (max-width: 480px) {
	.acms-toast-stack {
		bottom: 12px;
		right: 12px;
		left: 12px;
		max-width: none;
	}
}

/* ===== CITY TYPEAHEAD ===== */
.acms-ac-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #ffffff;
	border: 1px solid var(--acms-border, #e2e8f0);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
	z-index: 50;
	max-height: 220px;
	overflow: auto;
	margin-top: 4px;
}
.acms-ac-item {
	padding: 9px 12px;
	font-size: 13px;
	cursor: pointer;
	color: var(--acms-text, #1e293b);
}
.acms-ac-item:hover,
.acms-ac-item.acms-ac-active {
	background: var(--acms-primary, #2d3192);
	color: #ffffff;
}

/* ===== CORPORATE DOCUMENT VIEWS (INVOICE, RECEIPT, WAYBILL) ===== */
.acms-legacy-route-delivery { display: none; }

/* ===== COMPACT TRACKING SEARCH WIDGETS ===== */
.acms-track-mini-form { display:flex; align-items:center; max-width:360px; border-radius:999px; overflow:hidden; }
.acms-track-mini-form input { min-width:0; flex:1; outline:0; padding:11px 15px; color:var(--acms-text,#0f172a); font:inherit; }
.acms-track-mini-form button,.acms-track-popup-trigger { display:grid; place-items:center; width:42px; height:42px; flex:0 0 42px; border:0; cursor:pointer; font-size:25px; line-height:1; }
/* Style 1 is intentionally transparent and has no focus or hover border. */
.acms-track-widget-style1 { background:transparent; border:0; box-shadow:none; }
.acms-track-widget-style1 input,.acms-track-widget-style1 input:hover,.acms-track-widget-style1 input:focus { border:0 !important; outline:0 !important; box-shadow:none !important; background:transparent; }
.acms-track-widget-style1 button,.acms-track-widget-style1 .acms-track-popup-trigger { color:var(--acms-primary,#2d3192); background:transparent; }
.acms-track-widget-style1 button:hover,.acms-track-widget-style1 .acms-track-popup-trigger:hover { color:var(--acms-cta,#ff6600); background:transparent; transform:none; }
/* Style 2: clean white search bar with a navy search button. */
.acms-track-widget-style2 { border:1px solid #dbe1ef; background:#fff; box-shadow:0 3px 12px rgba(15,23,42,.08); }
.acms-track-widget-style2 button,.acms-track-widget-style2 .acms-track-popup-trigger { color:#fff; background:var(--acms-primary,#2d3192); }
/* Style 3: orange-accented pale card. */
/* Alert left accents: success / info use the corporate navy, danger stays red.
   Orange is reserved for action buttons. */
.acms-alert {
	border-left: 4px solid var(--acms-primary, #2d3192);
}
.acms-alert-success {
	border-left-color: var(--acms-success, #059669);
}
.acms-alert-error,
.acms-alert-danger {
	border-left-color: var(--acms-danger, #dc2626);
}

/* Track widget style 3 keeps its soft navy panel instead of orange. */
.acms-track-widget-style3 {
	border: 1px solid var(--acms-border, #e2e8f0);
	background: var(--acms-primary-tint, #f4f5fc);
}
.acms-track-widget-style3 button,
.acms-track-widget-style3 .acms-track-popup-trigger {
	color: #fff;
	background: var(--acms-primary, #2d3192);
}
/* Style 4: dark compact control for use over bright page sections. */
.acms-track-widget-style4 { border:1px solid #1e293b; background:#0f172a; }
.acms-track-widget-style4 input { color:#fff; }
.acms-track-widget-style4 input::placeholder { color:#cbd5e1; }
.acms-track-widget-style4 button,.acms-track-widget-style4 .acms-track-popup-trigger { color:#0f172a; background:#fff; }
.acms-track-popup-wrap { display:inline-block; }
.acms-track-popup-trigger { border-radius:50%; box-shadow:0 4px 12px rgba(15,23,42,.18); }
.acms-track-popup { position:fixed; z-index:99999; inset:0; display:grid; place-items:center; padding:20px; background:rgba(15,23,42,.52); }
.acms-track-popup[hidden] { display:none; }
.acms-track-popup-panel { position:relative; width:min(100%,420px); padding:28px; border-radius:14px; background:#fff; box-shadow:0 18px 55px rgba(15,23,42,.3); }
.acms-track-popup-panel h3 { margin:0 32px 18px 0; color:var(--acms-primary,#2d3192); }
.acms-track-mini-form-popup { max-width:none; }
.acms-track-popup-close { position:absolute; top:10px; right:12px; border:0; background:transparent; color:var(--acms-text-muted,#64748b); cursor:pointer; font-size:28px; line-height:1; }
/* ===== ACCESS DENIED — CORPORATE (Sign In / Create Account) ===== */
.acms-access-denied-wrap {
	display: flex;
	justify-content: center;
	padding: 40px 16px;
	background: var(--acms-bg, #f8fafc);
}
.acms-access-denied {
	max-width: 560px;
	width: 100%;
	background: #ffffff;
	border: 1px solid var(--acms-border, #e2e8f0);
	border-radius: 14px;
	box-shadow: var(--acms-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
	padding: 40px 32px;
	text-align: center;
	font-family: Inter, Arial, sans-serif !important;
}
.acms-access-denied-icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--acms-primary-light, #eceef9);
	border: 2px solid var(--acms-primary, #2d3192);
	display: grid;
	place-items: center;
	font-size: 34px;
	line-height: 1;
	color: var(--acms-primary, #2d3192);
}
.acms-access-denied-title {
	font-family: Montserrat, Inter, Arial, sans-serif !important;
	font-size: 24px !important;
	font-weight: 800 !important;
	color: var(--acms-secondary, #0f172a) !important;
	margin: 0 0 10px !important;
	letter-spacing: -0.02em !important;
	line-height: 1.2 !important;
}
.acms-access-denied-message {
	font-family: Inter, Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.6 !important;
	color: var(--acms-text-muted, #64748b) !important;
	margin: 0 0 24px !important;
}
.acms-access-denied-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.acms-access-denied-actions .acms-btn {
	min-width: 148px;
	padding: 11px 22px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
}
.acms-access-denied-help {
	font-size: 12px !important;
	font-weight: 400 !important;
	color: var(--acms-text-muted, #94a3b8) !important;
	margin: 0 !important;
}
.acms-access-denied-help a { color: var(--acms-primary, #2d3192); font-weight: 600; text-decoration: none; }
.acms-access-denied-help a:hover { text-decoration: underline; }
.acms-access-denied-code {
	display: inline-block;
	margin-top: 10px;
	padding: 4px 10px;
	background: var(--acms-bg, #f8fafc);
	border: 1px solid var(--acms-border, #e2e8f0);
	border-radius: 9999px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
	font-size: 11px;
	font-weight: 600;
	color: var(--acms-text-muted, #64748b);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
@media (max-width: 480px) {
	.acms-access-denied { padding: 28px 20px; }
	.acms-access-denied-actions { flex-direction: column; }
	.acms-access-denied-actions .acms-btn { width: 100%; }
}

/* ===== PHONE DIAL PREFIX (country code beside the phone box) ===== */
.acms-phone-dial-wrap {
	display: flex;
	align-items: stretch;
}
.acms-phone-dial-wrap .acms-input {
	flex: 1;
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}
.acms-phone-dial {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 58px;
	padding: 0 12px;
	background: var(--acms-bg, #f8fafc);
	border: 1px solid var(--acms-border, #e2e8f0);
	border-right: none;
	border-radius: 8px 0 0 8px;
	font-weight: 600;
	font-size: 14px;
	color: var(--acms-text, #0f172a);
	white-space: nowrap;
	user-select: none;
}
.acms-phone-dial-wrap .acms-input:focus {
	border-color: var(--acms-primary, #2d3192);
}

.acms-doc-shell {
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid var(--acms-border, #e2e8f0);
	box-shadow: var(--acms-shadow-md);
	overflow: hidden;
	margin-bottom: 24px;
}

.acms-doc-header-banner {
	background: var(--acms-brand-head, #2d3192);
	color: #ffffff;
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 2px solid var(--acms-primary-hover, #1f2266);
}

.acms-doc-header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.acms-doc-header-title {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0;
	color: #ffffff;
}

.acms-doc-header-subtitle {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.75);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 2px;
}

.acms-doc-route-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--acms-primary-light, #eceef9);
	color: var(--acms-primary, #2d3192);
	padding: 6px 14px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 700;
}

.acms-doc-route-arrow {
	color: var(--acms-primary, #2d3192);
	font-weight: 900;
}

.acms-doc-action-group {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.acms-doc-action-group .acms-btn {
	font-size: 12px;
	padding: 6px 12px;
}
