:root {
	--sidebar-width: 280px;
	--chat-panel-width: 420px;
	--chat-panel-min-width: 320px;
	--chat-panel-max-width: 640px;
	
	/* Professional Color System - Microsoft/Dell Inspired */
	--ca-navy-900: #0a1929;
	--ca-navy-800: #0f2942;
	--ca-azure-600: #0078d4;
	--ca-azure-500: #2b88d8;
	--ca-gray-900: #1a1f2e;
	--ca-gray-800: #2d3748;
	--ca-gray-700: #475569;
	--ca-gray-400: #cbd5e0;
	--ca-gray-200: #edf2f7;
	--ca-gray-100: #f7fafc;
	--ca-gray-50: #fafbfc;
	--ca-bg-primary: #ffffff;
	--ca-bg-secondary: #fafbfc;
	--ca-text-primary: #1a1f2e;
	--ca-text-secondary: #475569;
	--ca-text-muted: #94a3b8;
	--ca-border-default: #e2e8f0;
	--ca-shadow-sm: 0 1px 3px 0 rgba(10, 25, 41, 0.05), 0 1px 2px 0 rgba(10, 25, 41, 0.02);
	--ca-shadow-md: 0 4px 6px -1px rgba(10, 25, 41, 0.06), 0 2px 4px -1px rgba(10, 25, 41, 0.03);
}

html,
body {
	height: 100%;
	width: 100%;
	overflow-x: hidden;
	overflow-y: auto;
}

body {
	margin: 0;
	font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	background-color: var(--ca-bg-secondary);
	color: var(--ca-text-primary);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.app-shell {
	display: grid;
	grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
	min-height: 100vh;
	width: 100vw;
	max-width: 100vw;
	background: var(--ca-bg-secondary);
	transition: none;
	overflow: hidden;
}

.app-shell.chat-open {
	grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--chat-panel-width);
	transition: none;
}

.sidebar {
	background: linear-gradient(180deg, var(--ca-navy-900) 0%, var(--ca-navy-800) 100%);
	color: #ffffff;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 2px 0 8px rgba(10, 25, 41, 0.04);
	grid-column: 1;
}

.content-shell {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background-color: var(--ca-bg-secondary);
	grid-column: 2;
}

.top-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1.5rem;
	height: 60px;
	background: var(--ca-bg-primary);
	border-bottom: 1px solid var(--ca-border-default);
	position: sticky;
	top: 0;
	z-index: 5;
	box-shadow: var(--ca-shadow-sm);
}

.top-row-left {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.top-row .actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.chat-icon-btn {
	position: relative;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 12px;
	background: var(--ca-azure-600);
	color: #ffffff;
	box-shadow: var(--ca-shadow-md);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chat-icon-btn:hover {
	background: #106ebe;
	transform: translateY(-1px);
	box-shadow: 0 8px 16px rgba(0, 120, 212, 0.25);
}

.chat-icon-btn .bi {
	font-size: 1.25rem;
}

.chat-icon-btn .badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #de350b;
	color: #ffffff;
	border-radius: 999px;
	font-size: 0.625rem;
	padding: 2px 6px;
	font-weight: 600;
	box-shadow: 0 0 0 2px var(--ca-bg-primary);
}

.chat-icon-btn:focus-visible {
	outline: 2px solid var(--ca-azure-600);
	outline-offset: 2px;
}

.content {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
}

.chat-launcher {
	position: fixed;
	top: 50%;
	right: 0.75rem;
	transform: translateY(-50%);
	background: var(--ca-azure-600);
	color: #ffffff;
	border: none;
	border-radius: 16px 6px 6px 16px;
	padding: 0.75rem 1rem 0.75rem 1.15rem;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	box-shadow: 0 8px 16px rgba(0, 120, 212, 0.25);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	z-index: 20;
}

.chat-launcher .badge {
	background: var(--ca-navy-900);
	color: #ffffff;
	border-radius: 999px;
	padding: 0.1rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
}

.chat-launcher span {
	font-weight: 600;
	letter-spacing: 0.01em;
}

.chat-launcher .bi {
	font-size: 1.2rem;
}

.chat-launcher:hover {
	transform: translateY(-50%) translateX(-2px);
	background: #106ebe;
	box-shadow: 0 12px 20px rgba(0, 120, 212, 0.3);
}

.corporate-shell .sidebar,
.corporate-sidebar {
	display: none;
}

.corporate-content {
	position: relative;
	min-height: 100vh;
}

.corporate-main {
	flex: 1;
}

@media (max-width: 1024px) {
	.chat-launcher {
		top: auto;
		bottom: 1.25rem;
		right: 1.25rem;
		transform: translateY(0);
		border-radius: 18px;
		padding: 0.9rem 1.15rem;
	}
}

.navbar-brand {
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
}

.nav-scrollable {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 0 2rem 0;
}

.nav-scrollable::-webkit-scrollbar {
	width: 6px;
}

.nav-scrollable::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 999px;
}

.nav-link {
	color: rgba(255, 255, 255, 0.8);
	font-weight: 500;
	border-radius: 8px;
	padding: 0.65rem 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
	color: #ffffff;
	background: rgba(0, 120, 212, 0.15);
}

.nav-link.active {
	font-weight: 600;
	position: relative;
}

.nav-link.active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 24px;
	background: var(--ca-azure-600);
	border-radius: 0 2px 2px 0;
}

.nav-link .bi {
	font-size: 1.05rem;
}

.navbar-toggler {
	display: none;
}

@media (max-width: 992px) {
	:root {
		--sidebar-width: 220px;
	}
}

@media (max-width: 768px) {
	.app-shell {
		grid-template-columns: minmax(0, 1fr);
	}

	.sidebar {
		display: none;
	}

	.top-row {
		position: relative;
	}
}
