/*
 * Company Theme — Full ERPNext / Frappe branding
 * Change the variables in :root to rebrand the whole system.
 */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700&display=swap");

:root,
[data-theme="light"] {
	/* ===== Brand palette (edit these) ===== */
	--ct-brand: #FCA11B;
	--ct-brand-hover: #E18A08;
	--ct-brand-soft: #FFF2DA;
	--ct-brand-ink: #06315D;
	--ct-brand-rgb: 252, 161, 27;
	--ct-accent: #06315D;
	--ct-sidebar-bg: #06315D;
	--ct-sidebar-text: #EAF2FA;
	--ct-sidebar-muted: #AFC2D8;
	--ct-sidebar-active: #174C75;
	--ct-sidebar-hover: #FFF2DA;
	--ct-page-bg: #FFF9EF;
	--ct-radius: 10px;

	/* Map onto Frappe CSS variables */
	--primary: var(--ct-brand);
	--primary-color: var(--ct-brand);
	--brand-color: var(--ct-brand);
	--btn-primary: var(--ct-brand);
	--progress-bar-bg: var(--ct-brand);

	--bg-color: var(--ct-page-bg);
	--fg-color: #ffffff;
	--subtle-accent: #eef3f9;
	--subtle-fg: #e6edf6;
	--navbar-bg: #ffffff;
	--control-bg: #eef3f9;
	--card-bg: #ffffff;
	--modal-bg: #ffffff;

	--sidebar-hover-color: var(--ct-sidebar-hover);
	--sidebar-active-color: var(--ct-sidebar-active);
	--sidebar-border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] {
	--ct-brand: #FCA11B;
	--ct-brand-hover: #FFB846;
	--ct-brand-soft: #33291A;
	--ct-brand-ink: #06315D;
	--ct-brand-rgb: 252, 161, 27;
	--ct-sidebar-bg: #041D37;
	--ct-sidebar-hover: #FFF2DA;
	--ct-page-bg: #0f0f0f;

	--primary: var(--ct-brand);
	--primary-color: var(--ct-brand);
	--brand-color: var(--ct-brand);
	--btn-primary: var(--ct-brand);
}

/* ===== Top navbar ===== */
.navbar {
	background: var(--navbar-bg) !important;
	border-bottom: 1px solid var(--subtle-fg) !important;
	box-shadow: 0 1px 0 rgba(11, 31, 58, 0.04);
}

.navbar .navbar-brand,
.navbar .nav-link {
	font-weight: 600;
}

/* ===== Workspace left menu ONLY (not list/form filter sidebars) ===== */
/*
 * Keep this self-contained: force dark panel + light text on desk-sidebar.
 * Do not rely on parent tokens alone — Frappe children often reset to white.
 */
.layout-side-section:has(.desk-sidebar),
[data-page-route="Workspaces"] .layout-side-section,
body[data-route^="Workspaces"] .layout-side-section {
	--sidebar-select-color: var(--ct-sidebar-active) !important;
	--text-color: #ffffff !important;
	--text-muted: #a8bdd9 !important;
	--icon-stroke: #d7e3f4 !important;
	--fg-color: transparent !important;
	--subtle-fg: transparent !important;
	--bg-color: var(--ct-sidebar-bg) !important;
	--card-bg: transparent !important;
	--border-color: rgba(255, 255, 255, 0.08) !important;

	background: var(--ct-sidebar-bg) !important;
	background-color: var(--ct-sidebar-bg) !important;
	color: #ffffff !important;
	font-family: "Manrope", system-ui, sans-serif;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.layout-side-section:has(.desk-sidebar) > *,
[data-page-route="Workspaces"] .layout-side-section > *,
.desk-sidebar,
.desk-sidebar .standard-sidebar-section,
.desk-sidebar .nested-container,
.desk-sidebar .sidebar-item-container,
.layout-side-section .desk-sidebar,
.workspace-sidebar {
	background: transparent !important;
	background-color: transparent !important;
	color: #ffffff !important;
	border: none !important;
	box-shadow: none !important;
}

.desk-sidebar {
	padding: 4px 2px !important;
	width: 100% !important;
}

.desk-sidebar .standard-sidebar-label,
.desk-sidebar .sidebar-label,
.desk-sidebar .text-muted {
	color: #8fa3bf !important;
	font-size: 0.68rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	margin: 10px 8px 8px !important;
	opacity: 1 !important;
	background: transparent !important;
}

/* Base item row — never white */
.desk-sidebar .standard-sidebar-item,
.desk-sidebar .desk-sidebar-item {
	background: transparent !important;
	background-color: transparent !important;
	border-radius: 10px !important;
	margin-bottom: 3px !important;
	transition: background 0.15s ease, box-shadow 0.15s ease !important;
	overflow: hidden !important;
	border: none !important;
	box-shadow: none !important;
}

.desk-sidebar .item-anchor,
.desk-sidebar .standard-sidebar-item > a,
.desk-sidebar a.item-anchor,
.desk-sidebar a {
	color: #ffffff !important;
	text-decoration: none !important;
	display: flex !important;
	align-items: center !important;
	gap: 2px !important;
	padding: 8px 10px !important;
	border-radius: 10px !important;
	background: transparent !important;
}

.desk-sidebar .sidebar-item-label,
.desk-sidebar .item-anchor .sidebar-item-label,
.desk-sidebar span.sidebar-item-label {
	color: #ffffff !important;
	font-weight: 550 !important;
	font-size: 0.9rem !important;
	letter-spacing: 0.01em !important;
	opacity: 1 !important;
}

/* Icons — bright on dark */
.desk-sidebar .sidebar-item-icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 22px !important;
	min-width: 22px !important;
	margin-right: 8px !important;
	--icon-stroke: #d7e3f4 !important;
	opacity: 1 !important;
}

.desk-sidebar .sidebar-item-icon svg,
.desk-sidebar .sidebar-item-icon .icon,
.desk-sidebar .sidebar-item-icon .es-icon,
.desk-sidebar svg.icon,
.desk-sidebar .es-icon,
.desk-sidebar svg {
	--icon-stroke: #d7e3f4 !important;
	stroke: #d7e3f4 !important;
	color: #d7e3f4 !important;
	fill: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	width: 16px !important;
	height: 16px !important;
}

/* Hover */
.desk-sidebar .standard-sidebar-item:hover,
.desk-sidebar .desk-sidebar-item:hover,
.desk-sidebar .standard-sidebar-item:focus-within {
	background: #FFF2DA !important;
	background-color: #FFF2DA !important;
	box-shadow: inset 3px 0 0 var(--ct-brand) !important;
	text-decoration: none !important;
}

.desk-sidebar .standard-sidebar-item:hover .item-anchor,
.desk-sidebar .desk-sidebar-item:hover .item-anchor,
.desk-sidebar .standard-sidebar-item:hover .sidebar-item-label,
.desk-sidebar .desk-sidebar-item:hover .sidebar-item-label,
.desk-sidebar .standard-sidebar-item:hover a,
.desk-sidebar .standard-sidebar-item:focus-within .item-anchor,
.desk-sidebar .standard-sidebar-item:focus-within .sidebar-item-label,
.desk-sidebar .standard-sidebar-item:hover *,
.desk-sidebar .desk-sidebar-item:hover * {
	color: var(--ct-brand-ink) !important;
}

.desk-sidebar .standard-sidebar-item:hover svg,
.desk-sidebar .desk-sidebar-item:hover svg,
.desk-sidebar .standard-sidebar-item:focus-within svg {
	--icon-stroke: var(--ct-brand-ink) !important;
	stroke: var(--ct-brand-ink) !important;
	color: var(--ct-brand-ink) !important;
}

/* Active / selected */
.desk-sidebar .standard-sidebar-item.selected,
.desk-sidebar .desk-sidebar-item.selected {
	background: var(--ct-brand) !important;
	background-color: var(--ct-brand) !important;
	box-shadow: 0 6px 16px rgba(var(--ct-brand-rgb), 0.28) !important;
}

.desk-sidebar .standard-sidebar-item.selected .item-anchor,
.desk-sidebar .desk-sidebar-item.selected .item-anchor,
.desk-sidebar .standard-sidebar-item.selected .sidebar-item-label,
.desk-sidebar .desk-sidebar-item.selected .sidebar-item-label,
.desk-sidebar .standard-sidebar-item.selected a,
.desk-sidebar .standard-sidebar-item.selected * {
	color: var(--ct-brand-ink) !important;
	font-weight: 600 !important;
}

.desk-sidebar .standard-sidebar-item.selected svg,
.desk-sidebar .desk-sidebar-item.selected svg {
	--icon-stroke: var(--ct-brand-ink) !important;
	stroke: var(--ct-brand-ink) !important;
	color: var(--ct-brand-ink) !important;
}

.desk-sidebar .drop-icon svg {
	--icon-stroke: #a8bdd9 !important;
	stroke: #a8bdd9 !important;
}

/* ===== Primary buttons ===== */
.btn-primary,
.btn-primary:not(:disabled):not(.disabled),
button.btn-primary,
.page-actions .btn-primary,
.modal-footer .btn-primary {
	background-color: var(--ct-brand) !important;
	border-color: var(--ct-brand) !important;
	color: var(--ct-brand-ink) !important;
	border-radius: var(--ct-radius) !important;
	box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
	background-color: #FFF2DA !important;
	border-color: #FFF2DA !important;
}

.btn-secondary,
.btn-default {
	border-radius: var(--ct-radius) !important;
}

/* ===== Page / form chrome ===== */
.page-container,
.layout-main-section,
.frappe-card,
.form-section,
.widget,
.dashboard-widget-box {
	border-radius: var(--ct-radius);
}

.page-head,
.page-form {
	background: transparent;
}

.form-control,
.input-with-feedback,
.awesomplete > input,
.select-input,
.control-input input:not([type="checkbox"]):not([type="radio"]),
.control-input select,
.control-input textarea {
	border-radius: 8px !important;
}

.form-control:focus,
.input-with-feedback:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
	border-color: var(--ct-brand) !important;
	box-shadow: 0 0 0 3px var(--ct-brand-soft) !important;
}

/* Links & active states */
a,
.link-text,
.text-primary {
	color: var(--ct-brand-ink);
}

a:hover,
.link-text:hover,
.text-primary:hover {
	color: var(--ct-brand-hover);
}

.indicator-pill.blue,
.indicator.blue {
	background: var(--ct-brand-soft) !important;
	color: var(--ct-brand-ink) !important;
}

/* List / filters */
.list-row:hover,
.list-row-container:hover {
	background: #FFF2DA !important;
}

.filter-button.active,
.filter-x-button,
.btn.filter-button.btn-primary-light {
	background: var(--ct-brand-soft) !important;
	color: var(--ct-brand-ink) !important;
}

/* ===== Desk Check fields (Face Attendance Settings, etc.) =====
   Company theme was forcing round empty rings + hiding the checked tick.
   Restore clear square checkboxes with a high-contrast navy tick on orange. */
body:not(.ct-login) .frappe-control[data-fieldtype="Check"] input[type="checkbox"],
body:not(.ct-login) .checkbox input[type="checkbox"],
body:not(.ct-login) input[type="checkbox"] {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	width: 16px !important;
	height: 16px !important;
	min-width: 16px !important;
	min-height: 16px !important;
	margin: 0 8px 0 0 !important;
	padding: 0 !important;
	border-radius: 4px !important;
	border: 1.5px solid #94a3b8 !important;
	background-color: #ffffff !important;
	background-image: none !important;
	box-shadow: none !important;
	vertical-align: middle !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
}

body:not(.ct-login) .frappe-control[data-fieldtype="Check"] input[type="checkbox"]:checked,
body:not(.ct-login) .checkbox input[type="checkbox"]:checked,
body:not(.ct-login) input[type="checkbox"]:checked,
/* Frappe renders read-only list Check fields with this class, not :checked. */
body:not(.ct-login) input[type="checkbox"].disabled-selected {
	background-color: var(--ct-brand, #FCA11B) !important;
	border-color: var(--ct-brand, #FCA11B) !important;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 8 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L2.66667 5.8L7 1.2' stroke='%2306315D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-size: 70% !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	box-shadow: none !important;
}

body:not(.ct-login) .frappe-control[data-fieldtype="Check"] input[type="checkbox"]:focus,
body:not(.ct-login) .checkbox input[type="checkbox"]:focus,
body:not(.ct-login) input[type="checkbox"]:focus {
	outline: none !important;
	box-shadow: 0 0 0 3px var(--ct-brand-soft, #FFF2DA) !important;
	border-color: var(--ct-brand, #FCA11B) !important;
}

body:not(.ct-login) .frappe-control[data-fieldtype="Check"] .checkbox,
body:not(.ct-login) .frappe-control[data-fieldtype="Check"] .checkbox label {
	display: flex !important;
	align-items: center !important;
	gap: 2px !important;
	cursor: pointer !important;
}

body:not(.ct-login) input[type="checkbox"].disabled-selected,
body:not(.ct-login) input[type="checkbox"].disabled-deselected,
body:not(.ct-login) input[type="checkbox"]:disabled {
	cursor: default !important;
}

body:not(.ct-login) .frappe-control[data-fieldtype="Check"] .label-area {
	color: #0f2744 !important;
	font-weight: 600 !important;
}

/* Tabs */
.form-tabs-list .nav-link.active,
.nav-link.active {
	color: var(--ct-brand) !important;
	border-bottom-color: var(--ct-brand) !important;
}

.form-tabs-list .nav-link.active {
	color: var(--ct-sidebar-bg) !important;
	background-color: var(--ct-brand-soft) !important;
}

/* Progress / timeline */
.progress-bar,
.progress .progress-bar {
	background-color: var(--ct-brand) !important;
}

/* ===== Force true full-width desk + docked left workspace menu ===== */
html:not(.ct-login) body:not(.ct-login) {
	overflow-x: hidden;
}

body:not(.ct-login) .main-section,
body:not(.ct-login) .page-container,
body:not(.ct-login) #body,
body:not(.ct-login) #body > .page-container {
	width: 100% !important;
	max-width: 100% !important;
}

body:not(.ct-login) .navbar > .container,
body:not(.ct-login) .page-head > .container,
body:not(.ct-login) .container.page-body,
body:not(.ct-login) .page-body.container,
body:not(.ct-login).full-width .container,
body:not(.ct-login) .page-toolbar > .container,
body:not(.ct-login) .container {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body:not(.ct-login) .navbar > .container {
	padding-left: 1rem !important;
	padding-right: 1rem !important;
}

body:not(.ct-login) .container.page-body,
body:not(.ct-login) .page-body.container {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body:not(.ct-login) .page-body > .page-wrapper,
body:not(.ct-login) .page-body .page-content,
body:not(.ct-login) .layout-main {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}

body:not(.ct-login) .layout-main.row {
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: 100% !important;
	display: flex !important;
	flex-wrap: nowrap !important;
}

/*
 * Workspace side menu — IN FLOW (not fixed overlay).
 * Sidebar takes 240px; body content sits beside it so cards are never hidden.
 */
body.ct-workspace:not(.ct-login),
body:not(.ct-login):has([data-page-route="Workspaces"] .desk-sidebar) {
	--ct-desk-sidebar-width: 240px;
}

/* No fixed overlay rail */
body.ct-workspace:not(.ct-login)::before {
	display: none !important;
	content: none !important;
	width: 0 !important;
}

body.ct-workspace:not(.ct-login) .layout-main.row,
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main.row {
	--bs-gutter-x: 0 !important;
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	width: 100% !important;
}

/* Side menu column — normal flow, flush left, full height */
body.ct-workspace:not(.ct-login) .layout-main > .layout-side-section:has(.desk-sidebar),
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main > .layout-side-section:has(.desk-sidebar),
body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section:has(.desk-sidebar) {
	position: relative !important;
	left: auto !important;
	top: auto !important;
	bottom: auto !important;
	flex: 0 0 var(--ct-desk-sidebar-width, 240px) !important;
	width: var(--ct-desk-sidebar-width, 240px) !important;
	max-width: var(--ct-desk-sidebar-width, 240px) !important;
	min-width: var(--ct-desk-sidebar-width, 240px) !important;
	height: auto !important;
	min-height: calc(100vh - var(--navbar-height, 48px) - var(--page-head-height, 60px)) !important;
	margin: 0 !important;
	padding: 12px 8px 20px !important;
	z-index: 1 !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	background: var(--ct-sidebar-bg) !important;
	background-color: var(--ct-sidebar-bg) !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	align-self: stretch !important;
}

/* Body content — fills remaining width, NEVER under the menu */
body.ct-workspace:not(.ct-login) .layout-main > .layout-main-section-wrapper,
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main > .layout-main-section-wrapper,
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main-section-wrapper {
	flex: 1 1 auto !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0.5rem 1.25rem 1.25rem !important;
	border: 0 !important;
	background: transparent !important;
	overflow-x: auto !important;
}

/* Page head + page body stay full width (sidebar is inside page-body flow) */
body.ct-workspace:not(.ct-login) .page-head,
body:not(.ct-login) [data-page-route="Workspaces"] .page-head,
body.ct-workspace:not(.ct-login) .container.page-body,
body:not(.ct-login) [data-page-route="Workspaces"] .container.page-body {
	margin-left: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.ct-workspace:not(.ct-login) .page-head > .container,
body:not(.ct-login) [data-page-route="Workspaces"] .page-head > .container {
	width: 100% !important;
	max-width: 100% !important;
	padding-left: calc(var(--ct-desk-sidebar-width, 240px) + 1rem) !important;
	padding-right: 1.25rem !important;
	margin: 0 !important;
}

body.ct-workspace:not(.ct-login) .layout-main > [class*="col"],
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main > [class*="col"] {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Remove left white edge on all desk pages */
body:not(.ct-login),
body:not(.ct-login) .main-section,
body:not(.ct-login) .page-container,
body:not(.ct-login) #body {
	margin-left: 0 !important;
	padding-left: 0 !important;
	border-left: none !important;
}

body:not(.ct-login) .layout-side-section {
	border-left: none !important;
	outline: none !important;
}

body:not(.ct-login) .layout-main-section {
	max-width: none !important;
}

body:not(.ct-login) .workspace-container,
body:not(.ct-login) .codex-editor {
	max-width: 100% !important;
}

/* Mobile: fall back to normal sidebar */
@media (max-width: 991px) {
	body.ct-workspace:not(.ct-login) {
		--ct-desk-sidebar-width: 0px;
	}
	body.ct-workspace:not(.ct-login)::before {
		display: none !important;
	}
	body.ct-workspace:not(.ct-login) .layout-side-section:has(.desk-sidebar),
	body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section:has(.desk-sidebar) {
		position: relative !important;
		left: auto !important;
		top: auto !important;
		bottom: auto !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		height: auto !important;
		flex: 1 1 auto !important;
	}
	body.ct-workspace:not(.ct-login) .page-head,
	body.ct-workspace:not(.ct-login) .container.page-body,
	body:not(.ct-login) [data-page-route="Workspaces"] .page-head,
	body:not(.ct-login) [data-page-route="Workspaces"] .container.page-body {
		margin-left: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* ===== Module dashboards / Workspaces — attractive UI ===== */
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main-section,
body:not(.ct-login) .page-container[data-page-route="Workspaces"] .layout-main-section {
	background: linear-gradient(180deg, #f5f8fc 0%, #eef3f9 100%) !important;
	border: 1px solid #e2eaf3 !important;
	border-radius: 16px !important;
	padding: 18px 18px 28px !important;
	box-shadow: 0 10px 30px rgba(15, 40, 80, 0.04) !important;
}

body:not(.ct-login) .widget-group {
	margin-bottom: 1.75rem !important;
}

body:not(.ct-login) .widget-group-head .widget-group-title,
body:not(.ct-login) .widget-group .widget-group-title {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	letter-spacing: -0.01em !important;
	color: #0f2744 !important;
	margin-bottom: 0.85rem !important;
	padding-left: 2px !important;
}

/* Shared card shell */
body:not(.ct-login) .widget,
body:not(.ct-login) .dashboard-widget-box,
body:not(.ct-login) .widget.border {
	background: #ffffff !important;
	border: 1px solid #e6eef7 !important;
	border-radius: 14px !important;
	box-shadow: 0 1px 2px rgba(15, 40, 80, 0.03) !important;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
}

body:not(.ct-login) .widget .widget-head .widget-title {
	font-family: "Manrope", system-ui, sans-serif !important;
	font-weight: 650 !important;
	color: #152a45 !important;
}

/* --- Shortcut cards (Your Shortcuts) --- */
body:not(.ct-login) .widget.shortcut-widget-box {
	padding: 14px 16px !important;
	min-height: 72px !important;
	align-items: center !important;
	justify-content: center !important;
	background: linear-gradient(145deg, #ffffff 0%, #f7faff 100%) !important;
	border: 1px solid #e3ecf7 !important;
	position: relative !important;
	overflow: hidden !important;
}

body:not(.ct-login) .widget.shortcut-widget-box::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: linear-gradient(180deg, var(--ct-brand), var(--ct-accent));
	opacity: 0;
	transition: opacity 0.18s ease;
}

body:not(.ct-login) .widget.shortcut-widget-box:hover {
	transform: translateY(-2px) !important;
	border-color: #c5d8f5 !important;
	box-shadow: 0 10px 24px rgba(var(--ct-brand-rgb), 0.1) !important;
	--icon-stroke: var(--ct-brand-ink) !important;
}

body:not(.ct-login) .widget.shortcut-widget-box:hover::before {
	opacity: 1;
}

body:not(.ct-login) .widget.shortcut-widget-box:hover .widget-title {
	color: var(--ct-brand-ink) !important;
}

body:not(.ct-login) .widget.shortcut-widget-box .widget-title {
	font-weight: 600 !important;
	font-size: 0.92rem !important;
	color: #1a2f4a !important;
}

body:not(.ct-login) .widget.shortcut-widget-box .indicator-pill {
	background: var(--ct-brand-soft) !important;
	color: var(--ct-brand-ink) !important;
	border-radius: 999px !important;
	font-weight: 600 !important;
	font-size: 0.72rem !important;
}

/* --- Links / Reports & Masters cards --- */
body:not(.ct-login) .widget.links-widget-box {
	padding: 14px 14px 10px !important;
	background: #ffffff !important;
}

body:not(.ct-login) .widget.links-widget-box .widget-head .widget-label .widget-title {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	color: #0f2744 !important;
}

body:not(.ct-login) .widget.links-widget-box .link-item {
	padding: 7px 8px !important;
	margin-bottom: 2px !important;
	border-radius: 8px !important;
	transition: background 0.15s ease, color 0.15s ease !important;
}

body:not(.ct-login) .widget.links-widget-box .link-item:hover {
	background: #FFF2DA !important;
}

body:not(.ct-login) .widget.links-widget-box .link-item .link-content {
	color: #2a3f5a !important;
	font-weight: 500 !important;
}

body:not(.ct-login) .widget.links-widget-box .link-item:hover .link-content {
	color: var(--ct-brand-ink) !important;
}

body:not(.ct-login) .widget.links-widget-box .link-item .disabled-link {
	color: #8fa3bf !important;
}

/* --- Number cards --- */
body:not(.ct-login) .widget.number-widget-box {
	padding: 16px 18px !important;
	min-height: 96px !important;
	background: linear-gradient(160deg, #ffffff 0%, #f5f9ff 100%) !important;
	border: 1px solid #e3ecf7 !important;
	position: relative !important;
	overflow: hidden !important;
}

body:not(.ct-login) .widget.number-widget-box::after {
	content: "";
	position: absolute;
	right: -20px;
	top: -20px;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(var(--ct-brand-rgb), 0.1), transparent 70%);
	pointer-events: none;
}

body:not(.ct-login) .widget.number-widget-box:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 12px 28px rgba(var(--ct-brand-rgb), 0.1) !important;
	border-color: #c9daf5 !important;
}

body:not(.ct-login) .widget.number-widget-box .widget-title {
	color: #6b7c93 !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
}

body:not(.ct-login) .widget.number-widget-box .widget-content .number {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	font-weight: 700 !important;
	color: #0f2744 !important;
	letter-spacing: -0.02em !important;
}

/* --- Chart / dashboard widgets --- */
body:not(.ct-login) .widget.dashboard-widget-box,
body:not(.ct-login) .widget.chart-widget {
	padding: 14px 16px 12px !important;
	background: #ffffff !important;
}

body:not(.ct-login) .widget.dashboard-widget-box:hover,
body:not(.ct-login) .widget.chart-widget:hover {
	box-shadow: 0 12px 28px rgba(15, 40, 80, 0.07) !important;
	border-color: #d5e3f5 !important;
}

body:not(.ct-login) .widget.dashboard-widget-box .widget-title,
body:not(.ct-login) .widget.chart-widget .widget-title {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	font-weight: 700 !important;
	color: #0f2744 !important;
}

body:not(.ct-login) .widget.dashboard-widget-box .widget-subtitle {
	color: #7a8fa8 !important;
}

/* --- Onboarding / setup cards --- */
body:not(.ct-login) .widget.onboarding-widget-box {
	padding: 18px 20px !important;
	background: linear-gradient(135deg, #ffffff 0%, #f0f6ff 55%, #eefbf6 100%) !important;
	border: 1px solid #d9e7f8 !important;
	border-radius: 16px !important;
	box-shadow: 0 8px 24px rgba(var(--ct-brand-rgb), 0.06) !important;
}

body:not(.ct-login) .widget.onboarding-widget-box .widget-title {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	font-size: 1.15rem !important;
	font-weight: 700 !important;
	color: #0f2744 !important;
}

body:not(.ct-login) .widget.onboarding-widget-box .widget-subtitle {
	color: #5f738d !important;
}

body:not(.ct-login) .widget.onboarding-widget-box .onboarding-step {
	border-radius: 10px !important;
	padding: 8px 10px !important;
	transition: background 0.15s ease !important;
}

body:not(.ct-login) .widget.onboarding-widget-box .onboarding-step:hover {
	background: #FFF2DA !important;
}

body:not(.ct-login) .widget.onboarding-widget-box .btn-primary,
body:not(.ct-login) .widget.onboarding-widget-box .btn.btn-primary {
	border-radius: 10px !important;
	font-weight: 600 !important;
	padding: 8px 14px !important;
	box-shadow: 0 6px 14px rgba(var(--ct-brand-rgb), 0.22) !important;
}

/* --- Quick list widgets --- */
body:not(.ct-login) .widget.quick-list-widget-box {
	padding: 12px 14px !important;
}

body:not(.ct-login) .widget.quick-list-widget-box .widget-title {
	font-weight: 700 !important;
	color: #0f2744 !important;
}

body:not(.ct-login) .widget.quick-list-widget-box .quick-list-item,
body:not(.ct-login) .widget.quick-list-widget-box .list-item {
	border-radius: 8px !important;
	transition: background 0.15s ease !important;
}

body:not(.ct-login) .widget.quick-list-widget-box .quick-list-item:hover,
body:not(.ct-login) .widget.quick-list-widget-box .list-item:hover {
	background: #FFF2DA !important;
}

/* Workspace footer Edit / New buttons */
body:not(.ct-login) .workspace-footer .btn,
body:not(.ct-login) [data-page-route="Workspaces"] .workspace-footer .btn {
	border-radius: 10px !important;
	font-weight: 600 !important;
	box-shadow: 0 2px 8px rgba(15, 40, 80, 0.06) !important;
}

body:not(.ct-login) .workspace-footer .btn-primary {
	box-shadow: 0 6px 14px rgba(var(--ct-brand-rgb), 0.22) !important;
}

/* Spacer / header blocks inside workspace */
body:not(.ct-login) .widget.spacer,
body:not(.ct-login) .widget.header {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

body:not(.ct-login) .widget.header .widget-title,
body:not(.ct-login) .ce-header {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	color: #0f2744 !important;
	font-weight: 700 !important;
}

/* Soft page head under navbar for modules */
body:not(.ct-login) [data-page-route="Workspaces"] .page-head,
body:not(.ct-login) .page-container[data-page-route="Workspaces"] .page-head {
	background: transparent !important;
}

body:not(.ct-login) [data-page-route="Workspaces"] .page-title .title-text {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	font-weight: 700 !important;
	color: #0f2744 !important;
	letter-spacing: -0.02em !important;
}

/* ===== List / Form / Report pages — attractive UI for every screen ===== */
body:not(.ct-login) {
	font-family: "Manrope", system-ui, sans-serif;
}

body:not(.ct-login) .page-head {
	background: rgba(255, 255, 255, 0.86) !important;
	backdrop-filter: blur(8px);
	border-bottom: 1px solid #e8eef6 !important;
}

/* Query reports make the page head static by default. Restore a stacking
   context so Actions and overflow menus remain above the filter form,
   and explicitly reset top to 0 so Frappe's sticky top offset does not shift
   the header down over the report filters. */
body:not(.ct-login) #page-query-report .page-head {
	position: relative;
	top: 0 !important;
	z-index: 1031;
	overflow: visible;
}

body:not(.ct-login) #page-query-report .page-head .dropdown-menu {
	z-index: 1032;
}

body:not(.ct-login) #page-query-report .page-form {
	margin-top: 0 !important;
	position: relative;
	z-index: 1;
	overflow: visible;
}

body:not(.ct-login) .page-title .title-text {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	font-weight: 700 !important;
	color: #0f2744 !important;
	letter-spacing: -0.02em !important;
}

body:not(.ct-login) .page-actions .btn,
body:not(.ct-login) .page-head .btn {
	border-radius: 10px !important;
	font-weight: 600 !important;
}

body:not(.ct-login) .page-actions .btn-primary,
body:not(.ct-login) .page-head .btn-primary {
	box-shadow: 0 6px 14px rgba(var(--ct-brand-rgb), 0.22) !important;
}

/* List / form main card — content only, never the side menu */
body:not(.ct-login) .layout-main-section-wrapper > .layout-main-section.frappe-card,
body:not(.ct-login) .frappe-list .layout-main-section-wrapper > .layout-main-section,
body:not(.ct-login) .form-layout .layout-main-section-wrapper > .layout-main-section,
body:not(.ct-login) .layout-main-section-wrapper > .layout-main-section {
	background: linear-gradient(150deg, #ffffff 0%, #fffaf0 100%) !important;
	border: 0 !important;
	border-radius: 14px !important;
	box-shadow: 0 6px 20px rgba(6, 49, 93, 0.035) !important;
}

/* Side menu must never get the white card border */
body:not(.ct-login) .layout-side-section,
body:not(.ct-login) .layout-side-section.frappe-card,
body:not(.ct-login) .desk-sidebar,
body:not(.ct-login) .layout-side-section * {
	/* do not inherit white card chrome onto menu */
}

/* List / Form filter sidebar — light attractive panel (never dark workspace menu) */
html body:not(.ct-login) .layout-side-section:has(.list-sidebar):not(:has(.desk-sidebar)),
html body:not(.ct-login) .layout-side-section:has(.form-sidebar):not(:has(.desk-sidebar)),
html body.ct-workspace .layout-side-section:has(.list-sidebar):not(:has(.desk-sidebar)),
html body.ct-workspace .layout-side-section:has(.form-sidebar):not(:has(.desk-sidebar)) {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: #1a2f4a !important;
	--text-color: #1a2f4a !important;
	--text-muted: #6b7c93 !important;
	--icon-stroke: #5f738d !important;
	--sidebar-select-color: var(--ct-brand-soft) !important;
	--bg-color: transparent !important;
	--fg-color: #ffffff !important;
	--ct-sidebar-bg: transparent !important;

	position: static !important;
	left: auto !important;
	top: auto !important;
	bottom: auto !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	z-index: auto !important;
	padding: 8px 12px 12px 4px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: visible !important;
}

html body:not(.ct-login) .list-sidebar,
html body:not(.ct-login) .form-sidebar,
html body.ct-workspace .list-sidebar,
html body.ct-workspace .form-sidebar {
	background: #ffffff !important;
	background-color: #ffffff !important;
	color: #1a2f4a !important;
	border: 1px solid #e4edf7 !important;
	border-radius: 14px !important;
	padding: 14px 14px 12px !important;
	box-shadow: 0 6px 18px rgba(15, 40, 80, 0.05) !important;
	margin: 0 !important;
}

/* Hide workspace dark rail on list/form pages */
html body:not(.ct-workspace)::before {
	display: none !important;
	content: none !important;
	width: 0 !important;
}

body:not(.ct-login) .list-sidebar,
body:not(.ct-login) .form-sidebar {
	background: #ffffff !important;
	border: 1px solid #e4edf7 !important;
	border-radius: 14px !important;
	padding: 14px 14px 10px !important;
	box-shadow: 0 6px 18px rgba(15, 40, 80, 0.04) !important;
}

body:not(.ct-login) .list-sidebar .sidebar-label,
body:not(.ct-login) .form-sidebar .sidebar-label,
body:not(.ct-login) .list-sidebar .sidebar-menu h6,
body:not(.ct-login) .list-sidebar .h6 {
	color: #6b7c93 !important;
	font-weight: 700 !important;
	font-size: 0.72rem !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase !important;
}

body:not(.ct-login) .list-sidebar a,
body:not(.ct-login) .form-sidebar a,
body:not(.ct-login) .list-sidebar .sidebar-action {
	color: var(--ct-brand-ink) !important;
	font-weight: 600 !important;
}

body:not(.ct-login) .list-sidebar .form-control,
body:not(.ct-login) .list-sidebar input.input-with-feedback,
body:not(.ct-login) .list-sidebar .awesomplete > input {
	background: #f4f7fb !important;
	border: 1px solid #e1eaf4 !important;
	border-radius: 10px !important;
	min-height: 34px !important;
}

body:not(.ct-login) .list-sidebar .form-control:focus,
body:not(.ct-login) .list-sidebar input:focus {
	border-color: var(--ct-brand) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px rgba(var(--ct-brand-rgb), 0.12) !important;
}

/* List filter bar (ID / Item Name / etc.) */
body:not(.ct-login) .page-form,
body:not(.ct-login) .list-filters,
body:not(.ct-login) .frappe-list .page-form {
	background: linear-gradient(120deg, var(--ct-brand-soft), #ffffff) !important;
	border: 0 !important;
	border-radius: 12px !important;
	padding: 10px 12px !important;
	margin-bottom: 12px !important;
}

body:not(.ct-login) .page-form .form-control,
body:not(.ct-login) .page-form input,
body:not(.ct-login) .page-form select {
	background: #ffffff !important;
	border: 1px solid #e1eaf4 !important;
	border-radius: 9px !important;
}

body:not(.ct-login) .filter-button,
body:not(.ct-login) .filter-x-button,
body:not(.ct-login) .sort-selector-button,
body:not(.ct-login) .btn-group .btn-default {
	border-radius: 9px !important;
	font-weight: 600 !important;
}

/* Desk dropdowns: make triggers and menu choices visibly respond to mouse
   hover and keyboard focus, using the A to Z brand palette. */
body:not(.ct-login) .dropdown-toggle:hover,
body:not(.ct-login) .dropdown-toggle:focus-visible,
body:not(.ct-login) [data-toggle="dropdown"]:hover,
body:not(.ct-login) [data-toggle="dropdown"]:focus-visible,
body:not(.ct-login) [data-bs-toggle="dropdown"]:hover,
body:not(.ct-login) [data-bs-toggle="dropdown"]:focus-visible,
body:not(.ct-login) .dropdown.show > .dropdown-toggle,
body:not(.ct-login) .dropdown.open > .dropdown-toggle,
body:not(.ct-login) .custom-btn-group.open > .btn,
body:not(.ct-login) .actions-btn-group.open > .btn,
body:not(.ct-login) .menu-btn-group.open > .btn {
	background: #FFF2DA !important;
	border-color: var(--ct-brand) !important;
	color: var(--ct-brand-ink) !important;
	box-shadow: 0 0 0 2px rgba(var(--ct-brand-rgb), 0.18) !important;
}

body:not(.ct-login) .dropdown-menu .dropdown-item,
body:not(.ct-login) .dropdown-menu > li > a {
	border-radius: 7px !important;
	transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease !important;
}

body:not(.ct-login) .dropdown-menu .dropdown-item:hover,
body:not(.ct-login) .dropdown-menu .dropdown-item:focus-visible,
body:not(.ct-login) .dropdown-menu .dropdown-item:active,
body:not(.ct-login) .dropdown-menu > li > a:hover,
body:not(.ct-login) .dropdown-menu > li > a:focus-visible,
body:not(.ct-login) .dropdown-menu > li > a:active {
	background: #FFF2DA !important;
	color: var(--ct-brand-ink) !important;
	box-shadow: inset 3px 0 0 var(--ct-brand-ink) !important;
	outline: none !important;
}

body:not(.ct-login) .dropdown-menu .dropdown-item:hover svg,
body:not(.ct-login) .dropdown-menu .dropdown-item:focus-visible svg,
body:not(.ct-login) .dropdown-menu .dropdown-item:active svg,
body:not(.ct-login) .dropdown-menu > li > a:hover svg,
body:not(.ct-login) .dropdown-menu > li > a:focus-visible svg,
body:not(.ct-login) .dropdown-menu > li > a:active svg {
	--icon-stroke: var(--ct-brand-ink) !important;
	color: var(--ct-brand-ink) !important;
}

/* List filter sidebar controls (Assigned To, Created By, Tags, and actions). */
body:not(.ct-login) .list-sidebar .list-sidebar-button:hover,
body:not(.ct-login) .list-sidebar .list-sidebar-button:focus-visible,
body:not(.ct-login) .list-sidebar .sidebar-action > a:hover,
body:not(.ct-login) .list-sidebar .sidebar-action > a:focus-visible {
	background: #FFF2DA !important;
	border-color: var(--ct-brand) !important;
	color: var(--ct-brand-ink) !important;
	border-radius: 8px !important;
	text-decoration: none !important;
	box-shadow: 0 0 0 2px rgba(var(--ct-brand-rgb), 0.14) !important;
}

body:not(.ct-login) .list-sidebar .list-sidebar-button:hover svg,
body:not(.ct-login) .list-sidebar .list-sidebar-button:focus-visible svg {
	--icon-stroke: var(--ct-brand-ink) !important;
	color: var(--ct-brand-ink) !important;
}

body:not(.ct-login) .filter-button.active,
body:not(.ct-login) .tag-filters .filter-tag,
body:not(.ct-login) .frappe-tag {
	background: var(--ct-brand-soft) !important;
	color: var(--ct-brand-ink) !important;
	border-radius: 999px !important;
	border: 1px solid #d0e0ff !important;
}

/* List rows */
body:not(.ct-login) .list-row-head {
	background: var(--ct-brand-soft) !important;
	border-radius: 10px 10px 0 0 !important;
	border-bottom: 1px solid rgba(6, 49, 93, 0.08) !important;
}

body:not(.ct-login) .list-row-head .list-row-col,
body:not(.ct-login) .list-row-head .level-item {
	color: var(--ct-sidebar-bg) !important;
	font-weight: 700 !important;
	font-size: 0.75rem !important;
	text-transform: uppercase !important;
	letter-spacing: 0.04em !important;
}

body:not(.ct-login) .list-row-container {
	border-bottom: 1px solid #eef3f9 !important;
}

body:not(.ct-login) .list-row:hover:not(.list-row-head),
body:not(.ct-login) .list-row-container:hover {
	background: #FFF2DA !important;
}

body:not(.ct-login) .list-row .level-left a,
body:not(.ct-login) .list-subject a,
body:not(.ct-login) .list-row-col a {
	color: #0f2744 !important;
	font-weight: 600 !important;
}

body:not(.ct-login) .list-row .level-left a:hover,
body:not(.ct-login) .list-subject a:hover {
	color: var(--ct-brand-ink) !important;
}

/* Empty state */
body:not(.ct-login) .list-empty-state,
body:not(.ct-login) .msg-box,
body:not(.ct-login) .empty-state,
body:not(.ct-login) .no-result,
body:not(.ct-login) .frappe-list .msg-box {
	padding: 48px 24px !important;
	text-align: center !important;
}

body:not(.ct-login) .msg-box p,
body:not(.ct-login) .list-empty-state p,
body:not(.ct-login) .no-result p {
	color: #5f738d !important;
	font-size: 0.95rem !important;
	max-width: 420px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

body:not(.ct-login) .msg-box .btn,
body:not(.ct-login) .list-empty-state .btn,
body:not(.ct-login) .no-result .btn {
	border-radius: 10px !important;
	font-weight: 600 !important;
	margin-top: 8px !important;
	box-shadow: 0 6px 14px rgba(var(--ct-brand-rgb), 0.16) !important;
}

body:not(.ct-login) .msg-box svg,
body:not(.ct-login) .list-empty-state svg,
body:not(.ct-login) .no-result svg {
	opacity: 0.55 !important;
	--icon-stroke: #8fa3bf !important;
}

/* List footer / page length */
body:not(.ct-login) .list-paging-area,
body:not(.ct-login) .list-count,
body:not(.ct-login) .frappe-list .list-paging-area {
	padding: 10px 4px !important;
}

body:not(.ct-login) .btn-group.btn-group-paging .btn {
	border-radius: 8px !important;
	font-weight: 600 !important;
	color: #5f738d !important;
}

body:not(.ct-login) .btn-group.btn-group-paging .btn.active,
body:not(.ct-login) .btn-group.btn-group-paging .btn:hover {
	background: #FFF2DA !important;
	color: var(--ct-brand-ink) !important;
	border-color: #d0e0ff !important;
}

/* Form pages */
body:not(.ct-login) .form-section,
body:not(.ct-login) .form-dashboard-section {
	background: linear-gradient(135deg, #ffffff 0%, #fffaf0 100%) !important;
	border: 0 !important;
	border-radius: 14px !important;
	padding: 14px 16px !important;
	margin-bottom: 14px !important;
	box-shadow: 0 3px 12px rgba(6, 49, 93, 0.035) !important;
}

body:not(.ct-login) .form-section .section-head,
body:not(.ct-login) .form-section .section-head .uppercase {
	font-family: "Sora", "Manrope", system-ui, sans-serif !important;
	font-weight: 700 !important;
	color: var(--ct-sidebar-bg) !important;
	letter-spacing: -0.01em !important;
}

body:not(.ct-login) .control-label,
body:not(.ct-login) .frappe-control label {
	color: #5f738d !important;
	font-weight: 600 !important;
	font-size: 0.8rem !important;
}

body:not(.ct-login) .form-control,
body:not(.ct-login) .input-with-feedback {
	border: 1px solid rgba(var(--ct-brand-rgb), 0.22) !important;
	background: #fffdf8 !important;
}

body:not(.ct-login) .form-control:focus,
body:not(.ct-login) .input-with-feedback:focus {
	background: #ffffff !important;
}

/* Breadcrumbs / route links in navbar */
body:not(.ct-login) .navbar .breadcrumb,
body:not(.ct-login) .navbar a.navbar-brand + *,
body:not(.ct-login) #navbar-breadcrumbs a {
	color: #5f738d !important;
	font-weight: 500 !important;
}

body:not(.ct-login) #navbar-breadcrumbs li.disabled a {
	color: #0f2744 !important;
	font-weight: 700 !important;
}

/* Report / kanban / calendar light polish */
body:not(.ct-login) .report-wrapper,
body:not(.ct-login) .datatable,
body:not(.ct-login) .kanban,
body:not(.ct-login) .fc {
	border-radius: 12px !important;
}

body:not(.ct-login) .dt-header,
body:not(.ct-login) .datatable .dt-header {
	background: #f5f8fc !important;
}


/* Hard override: desk-sidebar must stay dark even if later page rules set white cards */
body:not(.ct-login) .desk-sidebar,
body:not(.ct-login) .desk-sidebar .standard-sidebar-section,
body:not(.ct-login) .desk-sidebar .standard-sidebar-item:not(.selected):not(:hover),
body:not(.ct-login) .layout-side-section:has(.desk-sidebar),
body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section {
	background-color: var(--ct-sidebar-bg) !important;
}
body:not(.ct-login) .desk-sidebar .standard-sidebar-section,
body:not(.ct-login) .desk-sidebar .nested-container,
body:not(.ct-login) .desk-sidebar .sidebar-item-container,
body:not(.ct-login) .desk-sidebar .standard-sidebar-item:not(.selected):not(:hover) {
	background: transparent !important;
	background-color: transparent !important;
}
body:not(.ct-login) .desk-sidebar .sidebar-item-label,
body:not(.ct-login) .desk-sidebar .item-anchor,
body:not(.ct-login) .desk-sidebar a {
	color: #ffffff !important;
}
body:not(.ct-login) .layout-side-section:has(.desk-sidebar) {
	background: var(--ct-sidebar-bg) !important;
	border-radius: 0 !important;
	border: 0 !important;
	border-left: 0 !important;
	box-shadow: none !important;
}

/* ===== Login page — Synergy left + Login card right ===== */
body.ct-login,
body[data-path="login"].ct-login,
html.ct-login body {
	background: #EAF2FA !important;
	font-family: "Manrope", system-ui, sans-serif !important;
	min-height: 100vh;
	margin: 0 !important;
	padding: 0 !important;
	overflow-x: hidden !important;
}

body.ct-login .web-footer,
body.ct-login .navbar,
body.ct-login header.web-navbar,
body.ct-login .page-breadcrumbs,
body.ct-login .page-header-wrapper {
	display: none !important;
}

/* Kill Bootstrap container limits that cause empty side space */
body.ct-login #page-login,
body.ct-login .page-content-wrapper,
body.ct-login main.container,
body.ct-login .container,
body.ct-login .page_content,
body.ct-login .page_content > div {
	max-width: 100% !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	min-height: 100vh !important;
	box-sizing: border-box !important;
}

.ct-login-shell {
	display: grid;
	grid-template-columns: 1fr;
	min-height: 100vh;
	height: 100vh;
	width: 100vw;
	max-width: 100vw;
	margin: 0 !important;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.ct-login-shell.is-ready {
	opacity: 1;
	transform: none;
}

/* ===== LEFT: Synergy theme (full half screen) ===== */
.ct-login-brand {
	display: none !important;
	position: relative;
	overflow: hidden;
	color: #e8eef8;
	background: var(--ct-sidebar-bg);
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	padding: 0;
	width: 100%;
	height: 100%;
	min-height: 100vh;
}

.ct-login-brand-bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(900px 520px at 15% 20%, rgba(var(--ct-brand-rgb), 0.35), transparent 60%),
		radial-gradient(700px 480px at 90% 80%, rgba(var(--ct-brand-rgb), 0.18), transparent 55%),
		linear-gradient(155deg, #041D37 0%, #0E3D69 45%, var(--ct-sidebar-bg) 100%);
}

.ct-synergy-rings {
	position: absolute;
	right: -12%;
	top: 50%;
	width: min(640px, 90%);
	height: min(640px, 90%);
	transform: translateY(-50%);
	pointer-events: none;
}

.ct-ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.ct-ring-1 {
	inset: 8%;
	animation: ct-spin 28s linear infinite;
	border-color: rgba(var(--ct-brand-rgb), 0.28);
}

.ct-ring-2 {
	inset: 22%;
	animation: ct-spin 40s linear infinite reverse;
	border-style: dashed;
	border-color: rgba(var(--ct-brand-rgb), 0.2);
}

.ct-ring-3 {
	inset: 36%;
	animation: ct-spin 22s linear infinite;
	border-color: rgba(255, 255, 255, 0.12);
	box-shadow: inset 0 0 40px rgba(var(--ct-brand-rgb), 0.12);
}

@keyframes ct-spin {
	to {
		transform: rotate(360deg);
	}
}

.ct-synergy-nodes {
	position: absolute;
	inset: 8% 4% 10% 8%;
	width: auto;
	height: auto;
	pointer-events: none;
	opacity: 0.35;
}

.ct-synergy-lines {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.ct-synergy-lines path {
	fill: none;
	stroke: rgba(var(--ct-brand-rgb), 0.35);
	stroke-width: 1.5;
	stroke-linecap: round;
}

.ct-node {
	position: absolute;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--ct-brand);
	box-shadow: 0 0 0 6px rgba(var(--ct-brand-rgb), 0.2), 0 0 24px rgba(var(--ct-brand-rgb), 0.55);
}

.ct-node.n1 { top: 18%; left: 16%; }
.ct-node.n2 { top: 10%; right: 18%; }
.ct-node.n3 { top: 42%; left: 46%; width: 16px; height: 16px; }
.ct-node.n4 { bottom: 22%; left: 24%; }
.ct-node.n5 { bottom: 18%; right: 22%; background: #FFD28A; }

.ct-login-brand-inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: none;
	height: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 3.5vw, 2.75rem);
	box-sizing: border-box;
}

.ct-login-brand-mark {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1.1rem;
	font-family: "Sora", sans-serif;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.82rem;
	color: #d5e4f7;
}

.ct-login-brand-mark .ct-mark-text {
	max-width: min(52vw, 42rem);
	font-size: clamp(1rem, 1.5vw, 1.45rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-transform: none;
	overflow-wrap: anywhere;
}

.ct-company-logo {
	width: clamp(96px, 10vw, 136px);
	height: auto;
	aspect-ratio: 724 / 581;
	padding: 4px;
	box-sizing: border-box;
	object-fit: contain;
	flex-shrink: 0;
	background: transparent;
}

.ct-synergy-logo {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: linear-gradient(145deg, var(--ct-brand-hover), var(--ct-brand));
	display: grid;
	place-items: center;
	grid-template-columns: repeat(3, 6px);
	gap: 3px;
	padding: 0 6px;
	box-shadow: 0 8px 20px rgba(var(--ct-brand-rgb), 0.35);
}

.ct-synergy-logo span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
	opacity: 0.95;
}

.ct-synergy-logo span:nth-child(2) {
	background: var(--ct-brand-ink);
}

.ct-login-headline {
	font-family: "Sora", sans-serif;
	font-size: clamp(1.9rem, 3.3vw, 2.8rem);
	line-height: 1.08;
	font-weight: 700;
	letter-spacing: -0.035em;
	color: #f5f8fc;
	margin: 0 0 1.1rem;
}

.ct-login-headline em {
	font-style: normal;
	background: linear-gradient(90deg, var(--ct-brand), #FFD28A);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.ct-login-headline .ct-login-company-name {
	overflow-wrap: anywhere;
}

.ct-login-lead {
	font-size: 0.98rem;
	line-height: 1.5;
	color: #9eb0c8;
	max-width: 42ch;
	margin: 0;
}

.ct-login-lead strong,
.ct-login-lead span {
	display: block;
}

.ct-login-lead strong {
	color: #f5f8fc;
	font-weight: 700;
}

.ct-login-lead span {
	margin-top: 0.65rem;
}

.ct-login-brand-copy {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	flex: 1;
	justify-content: center;
	padding: 0.85rem 0;
}

.ct-synergy-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0;
	width: 100%;
	max-width: none;
}

.ct-synergy-stats > div {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	padding: 0.85rem 0.75rem;
	backdrop-filter: blur(8px);
}

.ct-synergy-stats strong {
	display: block;
	font-family: "Sora", sans-serif;
	font-size: 1.25rem;
	color: #fff;
	margin-bottom: 0.2rem;
}

.ct-synergy-stats span {
	font-size: 0.72rem;
	color: #9eb0c8;
	letter-spacing: 0.02em;
}

.ct-login-brand-foot {
	font-size: 0.8rem;
	color: #7f93ad;
	letter-spacing: 0.02em;
	margin-top: 1rem;
}

.ct-login-brand-email-link {
	display: block !important;
	margin-top: 0.55rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: #9eb0c8 !important;
	letter-spacing: 0.02em;
	line-height: 1.45;
	position: relative;
	z-index: 3;
	text-transform: none;
}

.ct-login-brand-bottom {
	width: 100%;
}

/* ===== RIGHT: Sign In card (match screenshot) ===== */
.ct-login-form-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1.5rem, 4vw, 3rem);
	height: 100%;
	min-height: 100vh;
	background:
		radial-gradient(900px 620px at 12% 10%, rgba(6, 49, 93, 0.08), transparent 62%),
		radial-gradient(760px 560px at 90% 90%, rgba(6, 49, 93, 0.06), transparent 60%),
		#EAF2FA;
}

.ct-login-panel {
	position: relative;
	top: 16px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	width: 100%;
	max-width: 440px;
	margin: 0 auto;
}

.ct-login-form-brand {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 0 auto 6px;
	flex: 0 0 auto;
}

.ct-login-form-logo {
	display: block;
	width: 120px;
	height: 96px;
	padding: 0;
	box-sizing: border-box;
	object-fit: contain;
	background: transparent;
	border-radius: 0;
	box-shadow: none;
}

body.ct-login .for-login,
body.ct-login .for-signup,
body.ct-login .for-forgot,
body.ct-login .for-login-with-email-link,
body.ct-login .for-email-login,
body.ct-login .for-reset-password {
	width: 100%;
	max-width: 440px;
	margin: 0 auto;
	background: transparent !important;
}

body.ct-login .login-content.page-card,
body.ct-login .page-card {
	max-width: 440px !important;
	width: 100% !important;
	margin: 0 auto !important;
	padding: 30px 30px 26px !important;
	background: #ffffff !important;
	border: 1px solid rgba(15, 35, 65, 0.06) !important;
	border-radius: 16px !important;
	box-shadow: 0 18px 50px rgba(15, 40, 80, 0.1) !important;
	gap: 18px !important;
	animation: ct-card-in 0.6s ease both;
}

@keyframes ct-card-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

body.ct-login .page-card-head {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	gap: 14px !important;
	text-align: left !important;
}

/* Remove ERPNext / app logo from Sign In card */
body.ct-login .page-card-head .app-logo {
	display: none !important;
}

body.ct-login .page-card-head-text {
	width: 100%;
}

body.ct-login .page-card-head-text h4 {
	font-family: "Sora", sans-serif !important;
	font-size: 1.55rem !important;
	font-weight: 700 !important;
	letter-spacing: -0.02em !important;
	color: #111827 !important;
	margin: 0 0 0.3rem !important;
	text-align: left !important;
}

body.ct-login .for-login .page-card-head,
body.ct-login .for-login .page-card-head-text,
body.ct-login .for-login .page-card-head-text h4 {
	text-align: center !important;
}

body.ct-login .for-login .page-card-head {
	align-items: center !important;
}

body.ct-login .page-card-subtitle {
	color: #6b7280 !important;
	font-size: 0.92rem !important;
	line-height: 1.45 !important;
	margin: 0 !important;
	text-align: left !important;
	font-weight: 500 !important;
}

body.ct-login .page-card-body {
	gap: 14px !important;
}

body.ct-login .form-label {
	font-weight: 600 !important;
	color: #374151 !important;
	font-size: 0.84rem !important;
	margin-bottom: 0 !important;
}

body.ct-login .email-field,
body.ct-login .password-field {
	position: relative !important;
	width: 100%;
	display: block;
}

/* Keep field box height = input only so icons can vertically center */
body.ct-login .email-field .form-control,
body.ct-login .password-field .form-control,
body.ct-login .page-card-body input[type="text"],
body.ct-login .page-card-body input[type="email"],
body.ct-login .page-card-body input[type="password"] {
	margin-bottom: 0 !important;
}

body.ct-login .form-control {
	min-height: 44px !important;
	height: 44px !important;
	border-radius: 10px !important;
	border: 1px solid #d1d5db !important;
	background: #ffffff !important;
	padding: 10px 44px 10px 42px !important;
	font-size: 0.95rem !important;
	color: #111827 !important;
	box-shadow: none !important;
	transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

body.ct-login .form-control::placeholder {
	color: #9ca3af !important;
}

body.ct-login .form-control:hover {
	border-color: #9ca3af !important;
}

body.ct-login .form-control:focus {
	border-color: var(--ct-brand) !important;
	box-shadow: 0 0 0 3px rgba(var(--ct-brand-rgb), 0.15) !important;
	background: #fff !important;
}

/*
 * login.bundle.css loads AFTER theme CSS and sets top: 5px on .field-icon.
 * Beat that with higher specificity + !important so icons sit mid-field.
 */
body.ct-login .for-login .page-card .page-card-body .field-icon,
body.ct-login .for-forgot .page-card .page-card-body .field-icon,
body.ct-login .for-signup .page-card .page-card-body .field-icon,
body.ct-login .for-login-with-email-link .page-card .page-card-body .field-icon,
body.ct-login .email-field .field-icon,
body.ct-login .password-field .field-icon {
	position: absolute !important;
	left: 14px !important;
	top: 50% !important;
	right: auto !important;
	bottom: auto !important;
	transform: translateY(-50%) !important;
	width: 16px !important;
	height: 16px !important;
	opacity: 0.55;
	pointer-events: none;
	z-index: 2;
	display: block !important;
	margin: 0 !important;
}

body.ct-login .for-login .page-card .page-card-body .toggle-password,
body.ct-login .password-field .toggle-password {
	position: absolute !important;
	right: 14px !important;
	top: 50% !important;
	left: auto !important;
	bottom: auto !important;
	transform: translateY(-50%) !important;
	opacity: 0.7;
	cursor: pointer;
	z-index: 2;
	font-size: 12px !important;
	line-height: 1 !important;
	margin: 0 !important;
}

body.ct-login .forgot-password-message {
	text-align: right !important;
	margin-top: 6px !important;
}

body.ct-login .forgot-password-message a {
	color: #6b7280 !important;
	font-weight: 500 !important;
	font-size: 0.85rem !important;
	text-decoration: none !important;
}

body.ct-login .forgot-password-message a:hover {
	color: var(--ct-brand-ink) !important;
}

body.ct-login .page-card-actions {
	display: flex !important;
	flex-direction: column !important;
	gap: 10px !important;
	width: 100% !important;
	margin-top: 2px !important;
}

body.ct-login .btn-login,
body.ct-login .page-card-actions .btn-login {
	min-height: 44px !important;
	height: 44px !important;
	border-radius: 10px !important;
	background: var(--ct-brand) !important;
	border: none !important;
	color: var(--ct-brand-ink) !important;
	font-family: "Manrope", sans-serif !important;
	font-weight: 700 !important;
	font-size: 0.95rem !important;
	box-shadow: none !important;
	letter-spacing: 0 !important;
}

body.ct-login .btn-login:hover,
body.ct-login .btn-login:focus,
body.ct-login .btn-login:active {
	background: #FFF2DA !important;
	color: var(--ct-brand-ink) !important;
	transform: none;
	box-shadow: none !important;
}

/* Hide "Login with Email Link" — never show on Synergy login */
html.ct-login .btn-login-option,
html.ct-login .btn-login-with-email-link,
html.ct-login a[href="#login-with-email-link"],
body.ct-login .btn-login-option,
body.ct-login .btn-login-with-email-link,
body.ct-login a[href="#login-with-email-link"],
.ct-login-shell .btn-login-option,
.ct-login-shell .btn-login-with-email-link,
.ct-login-shell a[href="#login-with-email-link"],
.ct-login-shell .for-login-with-email-link {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
}

body.ct-login .sign-up-message {
	color: #6b7280 !important;
	font-size: 0.88rem !important;
}

body.ct-login .sign-up-message a {
	color: var(--ct-brand-ink) !important;
	font-weight: 600 !important;
}

/* Responsive */
@media (max-width: 960px) {
	.ct-login-shell {
		grid-template-columns: 1fr;
		height: auto;
		min-height: 100vh;
		width: 100%;
		max-width: 100%;
	}

	.ct-login-brand {
		min-height: auto;
		height: auto;
	}

	.ct-synergy-nodes {
		opacity: 0.18;
	}

	.ct-login-brand-inner {
		min-height: auto;
		padding: 1.5rem 1.25rem;
	}

	.ct-login-brand-mark {
		margin-bottom: 0.75rem;
	}

	.ct-company-logo {
		width: clamp(76px, 18vw, 108px);
	}

	.ct-login-headline {
		font-size: clamp(1.7rem, 7vw, 2.2rem);
		margin-bottom: 0.35rem;
	}

	.ct-login-brand-copy {
		flex: initial;
		gap: 0.5rem;
		padding: 0.4rem 0 0.8rem;
	}

	.ct-login-lead {
		font-size: 0.9rem;
		line-height: 1.45;
		max-width: none;
	}

	.ct-synergy-stats,
	.ct-login-brand-foot {
		display: none;
	}

	.ct-login-form-wrap {
		align-items: center;
		justify-content: center;
		padding: 1.1rem 1rem 2rem;
		min-height: 100vh;
		width: 100%;
	}

	/* Keep the complete logo and sign-in card visible on short phone screens. */
	.ct-login-panel {
		top: clamp(-26px, calc(28vh - 164px), 16px);
	}
}

/* ===== Website (portal / web pages) ===== */
.navbar-light,
.web-navbar,
.website-header {
	border-bottom: 1px solid var(--subtle-fg);
}

.web-footer,
.website-footer,
footer.web-footer {
	background: var(--ct-sidebar-bg) !important;
	color: var(--ct-sidebar-text) !important;
}

/* ===== Scrollbar (subtle polish) ===== */
*::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
*::-webkit-scrollbar-thumb {
	background: color-mix(in srgb, var(--ct-brand) 35%, #9aa8bc);
	border-radius: 8px;
}
*::-webkit-scrollbar-track {
	background: transparent;
}

/* ===== Utility: branded page title underline ===== */
.page-title .title-text {
	letter-spacing: -0.01em;
}


/* ===== FINAL: remove ALL white/light borders from workspace side menu ===== */
body.ct-workspace .layout-side-section,
body.ct-workspace .layout-side-section:has(.desk-sidebar),
body.ct-workspace .desk-sidebar,
body.ct-workspace .desk-sidebar .standard-sidebar-section,
body.ct-workspace .desk-sidebar .sidebar-item-container,
body.ct-workspace .desk-sidebar .nested-container,
body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section,
body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section:has(.desk-sidebar),
body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar,
body:not(.ct-login) .layout-side-section:has(.desk-sidebar) {
	border: 0 !important;
	border-top: 0 !important;
	border-right: 0 !important;
	border-bottom: 0 !important;
	border-left: 0 !important;
	border-color: transparent !important;
	border-width: 0 !important;
	border-style: none !important;
	border-radius: 0 !important;
	outline: 0 !important;
	outline-offset: 0 !important;
	box-shadow: none !important;
	background-clip: border-box !important;
	-webkit-box-shadow: none !important;
}

/* Frappe adds padding-right:15px on workspace side section = light strip (looks like white border) */
body.ct-workspace .layout-side-section,
body.ct-workspace .layout-side-section:has(.desk-sidebar),
body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section,
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main .layout-side-section,
body:not(.ct-login) .layout-side-section:has(.desk-sidebar) {
	padding-right: 8px !important;
	padding-left: 8px !important;
	margin: 0 !important;
	background: var(--ct-sidebar-bg) !important;
	background-color: var(--ct-sidebar-bg) !important;
}

/* No white frame around menu items either (except selected/hover fills) */
body.ct-workspace .desk-sidebar .standard-sidebar-item,
body.ct-workspace .desk-sidebar .desk-sidebar-item,
body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

body.ct-workspace .desk-sidebar .standard-sidebar-item.selected,
body.ct-workspace .desk-sidebar .desk-sidebar-item.selected,
body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item.selected {
	box-shadow: none !important;
	border: 0 !important;
}

/* Content card should not create a white line against the menu */
body.ct-workspace .layout-main-section-wrapper,
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main-section-wrapper {
	border: 0 !important;
	border-left: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}

body.ct-workspace .layout-main-section-wrapper > .layout-main-section,
body:not(.ct-login) [data-page-route="Workspaces"] .layout-main-section-wrapper > .layout-main-section {
	border-left: 0 !important;
}


/* ===== ULTIMATE: kill white box inside side menu ===== */
html body.ct-workspace .layout-side-section,
html body.ct-workspace .layout-side-section:has(.desk-sidebar),
html body.ct-workspace [data-page-route="Workspaces"] .layout-side-section,
html body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar),
html body.ct-workspace .desk-sidebar,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .desk-sidebar {
	background: var(--ct-sidebar-bg) !important;
	background-color: var(--ct-sidebar-bg) !important;
	background-image: none !important;
	border: 0 !important;
	border-width: 0 !important;
	border-style: none !important;
	border-color: transparent !important;
	border-radius: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	-webkit-box-shadow: none !important;
	padding: 10px 6px !important;
	margin: 0 !important;
}

/* Every wrapper inside the menu — no white card layer */
html body.ct-workspace .layout-side-section:has(.desk-sidebar) > *,
html body.ct-workspace .desk-sidebar,
html body.ct-workspace .desk-sidebar > *,
html body.ct-workspace .desk-sidebar .standard-sidebar-section,
html body.ct-workspace .desk-sidebar .nested-container,
html body.ct-workspace .desk-sidebar .sidebar-item-container,
html body.ct-workspace .desk-sidebar .sidebar-menu,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) > *,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .desk-sidebar,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .desk-sidebar > *,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .standard-sidebar-section,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .nested-container,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .sidebar-item-container,
html body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section > *,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar > *,
html body:not(.ct-login) [data-page-route="Workspaces"] .standard-sidebar-section,
html body:not(.ct-login) [data-page-route="Workspaces"] .nested-container,
html body:not(.ct-login) [data-page-route="Workspaces"] .sidebar-item-container {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

/* Item rows stay transparent until hover/selected */
html body.ct-workspace .desk-sidebar .standard-sidebar-item:not(.selected):not(:hover),
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item:not(.selected):not(:hover),
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .standard-sidebar-item:not(.selected):not(:hover) {
	background: transparent !important;
	background-color: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* Text + icons stay light on dark */
html body.ct-workspace .desk-sidebar .sidebar-item-label,
html body.ct-workspace .desk-sidebar .item-anchor,
html body.ct-workspace .desk-sidebar a,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .sidebar-item-label,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .item-anchor,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .sidebar-item-label,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .item-anchor {
	color: #ffffff !important;
	background: transparent !important;
}

/* Selected orange row uses the navy brand ink for readable contrast. */
html body.ct-workspace .desk-sidebar .standard-sidebar-item.selected,
html body.ct-workspace .desk-sidebar .standard-sidebar-item.selected *,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item.selected,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item.selected *,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .standard-sidebar-item.selected,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .standard-sidebar-item.selected * {
	color: var(--ct-brand-ink) !important;
}

html body.ct-workspace .desk-sidebar .standard-sidebar-item.selected svg,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item.selected svg,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .standard-sidebar-item.selected svg {
	--icon-stroke: var(--ct-brand-ink) !important;
	stroke: var(--ct-brand-ink) !important;
	color: var(--ct-brand-ink) !important;
}

/* Safety: if list page somehow still has ct-workspace, hide dark rail + undo fixed dark side */
html body.ct-workspace:has(.list-sidebar)::before,
html body.ct-workspace:has(.form-sidebar)::before {
	display: none !important;
	width: 0 !important;
	content: none !important;
}
html body.ct-workspace:has(.list-sidebar) .page-head,
html body.ct-workspace:has(.form-sidebar) .page-head,
html body.ct-workspace:has(.list-sidebar) .container.page-body,
html body.ct-workspace:has(.form-sidebar) .container.page-body {
	margin-left: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
}

/* Enforce in-flow sidebar — content must never sit under the menu */
html body.ct-workspace .layout-side-section:has(.desk-sidebar),
html body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section:has(.desk-sidebar) {
	position: relative !important;
	left: auto !important;
	top: auto !important;
	bottom: auto !important;
	z-index: 1 !important;
}
html body.ct-workspace .layout-main > .layout-main-section-wrapper,
html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main > .layout-main-section-wrapper {
	margin-left: 0 !important;
	width: auto !important;
	flex: 1 1 auto !important;
	min-width: 0 !important;
}

/* Final hover override after workspace sidebar base-color rules. */
html body.ct-workspace .desk-sidebar .standard-sidebar-item:hover,
html body.ct-workspace .desk-sidebar .standard-sidebar-item:focus-within,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item:hover,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .standard-sidebar-item:hover {
	background: #FFF2DA !important;
	background-color: #FFF2DA !important;
}

html body.ct-workspace .desk-sidebar .standard-sidebar-item:hover *,
html body.ct-workspace .desk-sidebar .standard-sidebar-item:focus-within *,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item:hover *,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .standard-sidebar-item:hover * {
	color: var(--ct-brand-ink) !important;
}

html body.ct-workspace .desk-sidebar .standard-sidebar-item:hover svg,
html body.ct-workspace .desk-sidebar .standard-sidebar-item:focus-within svg,
html body:not(.ct-login) [data-page-route="Workspaces"] .desk-sidebar .standard-sidebar-item:hover svg,
html body:not(.ct-login) .layout-side-section:has(.desk-sidebar) .standard-sidebar-item:hover svg {
	--icon-stroke: var(--ct-brand-ink) !important;
	stroke: var(--ct-brand-ink) !important;
	color: var(--ct-brand-ink) !important;
}

/* ===== Phone and tablet layout =====
   Keep the workspace menu available through Frappe's hamburger toggle, but
   take it out of the content row so cards and charts get the full viewport. */
@media (max-width: 991px) {
	html body.ct-workspace:not(.ct-login),
	html body:not(.ct-login):has([data-page-route="Workspaces"] .desk-sidebar) {
		--ct-desk-sidebar-width: 0px;
	}

	html body.ct-workspace:not(.ct-login) .layout-main.row,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main.row {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		flex-wrap: nowrap !important;
		overflow-x: hidden !important;
	}

	html body.ct-workspace:not(.ct-login) .layout-main > .layout-side-section:has(.desk-sidebar),
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main > .layout-side-section:has(.desk-sidebar),
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section:has(.desk-sidebar) {
		/* Own a top-level stacking layer so dashboard widgets cannot paint over the drawer. */
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		bottom: auto !important;
		flex: 0 0 0 !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		min-height: 0 !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		border: 0 !important;
		z-index: 12000 !important;
		pointer-events: none !important;
	}

	/* Frappe adds .opened when the page-head hamburger is tapped. */
	html body.ct-workspace .layout-side-section .overlay-sidebar,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section .overlay-sidebar {
		display: block !important;
		position: fixed !important;
		top: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		width: min(82vw, 300px) !important;
		max-width: 300px !important;
		height: 100vh !important;
		height: 100dvh !important;
		margin: 0 !important;
		padding: 14px 10px 24px !important;
		background: var(--ct-sidebar-bg) !important;
		transform: translateX(-110%) !important;
		transition: transform 200ms ease-in-out !important;
		z-index: 12002 !important;
		pointer-events: none !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		box-shadow: 0 12px 36px rgba(4, 29, 55, 0.28) !important;
	}

	html body.ct-workspace .layout-side-section .overlay-sidebar.opened,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section .overlay-sidebar.opened {
		transform: translateX(0) !important;
		pointer-events: auto !important;
	}

	html body.ct-workspace .layout-side-section .close-sidebar,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-side-section .close-sidebar {
		position: fixed !important;
		inset: 0 !important;
		width: 100vw !important;
		height: 100vh !important;
		height: 100dvh !important;
		z-index: 12001 !important;
		background: rgba(4, 19, 35, 0.42) !important;
		opacity: 1 !important;
		pointer-events: auto !important;
	}

	html body.ct-workspace .layout-main > .layout-main-section-wrapper,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main > .layout-main-section-wrapper,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main-section-wrapper {
		flex: 1 1 100% !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		margin: 0 !important;
		padding: 10px 12px 20px !important;
		overflow-x: hidden !important;
	}

	html body.ct-workspace .layout-main-section,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main-section {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		padding: 14px 12px 20px !important;
		border-radius: 14px !important;
		box-sizing: border-box !important;
	}

	html body.ct-workspace .workspace-container,
	html body:not(.ct-login) [data-page-route="Workspaces"] .workspace-container,
	html body.ct-workspace .codex-editor,
	html body:not(.ct-login) [data-page-route="Workspaces"] .codex-editor {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box !important;
	}

	html body.ct-workspace .page-head > .container,
	html body:not(.ct-login) [data-page-route="Workspaces"] .page-head > .container {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}
}

@media (max-width: 575px) {
	html body.ct-workspace .layout-main > .layout-main-section-wrapper,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main > .layout-main-section-wrapper,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main-section-wrapper {
		padding: 8px !important;
	}

	html body.ct-workspace .layout-main-section,
	html body:not(.ct-login) [data-page-route="Workspaces"] .layout-main-section {
		padding: 12px 10px 18px !important;
	}

	html body.ct-workspace .widget-group,
	html body:not(.ct-login) [data-page-route="Workspaces"] .widget-group {
		max-width: 100% !important;
		min-width: 0 !important;
	}

	html body.ct-workspace .widget-group [class*="grid-col-"],
	html body:not(.ct-login) [data-page-route="Workspaces"] .widget-group [class*="grid-col-"] {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
	}

	html body.ct-workspace .widget-group .widget,
	html body:not(.ct-login) [data-page-route="Workspaces"] .widget-group .widget {
		min-width: 0 !important;
		max-width: 100% !important;
	}
}
