/* Mezan ERP / Unisoft — global theme
   Ink #112E81 · Indigo #4647AE · Azure #4382DF · Mist #AACCD6
*/

:root,
[data-theme="light"] {
	--mezan-navy: #112e81;
	--mezan-indigo: #4647ae;
	--mezan-blue: #4382df;
	--mezan-sky: #aaccd6;
	--mezan-ice: #e8f3f6;

	--primary: #4382df;
	--primary-color: #112e81;
	--brand-color: #112e81;
	--dt-primary-color: #4382df;

	--btn-primary: #112e81;
	--border-primary: #112e81;
	--checkbox-color: #112e81;
	--checkbox-gradient: linear-gradient(180deg, #4382df -124.51%, #112e81 100%);
	--checkbox-focus-shadow: 0 0 0 2px rgba(67, 130, 223, 0.35);

	--blue-50: #f0f7fa;
	--blue-100: #e8f3f6;
	--blue-200: #aaccd6;
	--blue-300: #5c8fe6;
	--blue-400: #4382df;
	--blue-500: #4382df;
	--blue-600: #3a3c96;
	--blue-700: #112e81;
	--blue-800: #0d2266;
	--blue-900: #1a1f42;

	--bg-blue: #e8f3f6;
	--bg-light-blue: #f0f7fa;
	--bg-dark-blue: #aaccd6;
	--text-on-blue: #112e81;
	--text-on-light-blue: #112e81;
	--text-on-dark-blue: #0d2266;

	--alert-text-info: #112e81;
	--alert-bg-info: #e8f3f6;

	--bg-color: #f5fafc;
	--subtle-accent: #f0f7fa;
	--subtle-fg: #e8f3f6;
	--navbar-bg: #ffffff;
	--fg-hover-color: #f0f7fa;
	--control-bg: #f0f7fa;
	--sidebar-select-color: #e8f3f6;
	--highlight-color: #f0f7fa;
	--highlight-shadow: 1px 1px 10px var(--blue-100), 0 0 4px var(--blue-500);
	--diff-changed: #aaccd6;
	--progress-bar-bg: #4382df;
}

[data-theme="dark"] {
	--mezan-navy: #112e81;
	--mezan-indigo: #4647ae;
	--mezan-blue: #4382df;
	--mezan-sky: #aaccd6;
	--mezan-ice: #e8f3f6;

	--primary: #4382df;
	--primary-color: #aaccd6;
	--brand-color: #aaccd6;
	--dt-primary-color: #4382df;

	--btn-primary: #4382df;
	--border-primary: #4382df;
	--checkbox-color: #4382df;
	--checkbox-gradient: linear-gradient(180deg, #aaccd6 -124.51%, #4382df 100%);

	--blue-50: #1a2448;
	--blue-100: #0d2266;
	--blue-200: #112e81;
	--blue-300: #3a3c96;
	--blue-400: #4382df;
	--blue-500: #5c8fe6;
	--blue-600: #aaccd6;
	--blue-700: #e8f3f6;
	--blue-800: #f0f7fa;
	--blue-900: #ffffff;

	--sidebar-select-color: rgba(67, 130, 223, 0.28);
	--progress-bar-bg: #4382df;
}

/* -------- Desk: buttons & links -------- */
.btn-primary,
.btn-primary:not(:disabled):not(.disabled),
button.btn-primary,
.page-actions .btn-primary,
.standard-actions .btn-primary,
.modal-footer .btn-primary {
	background-color: var(--mezan-navy) !important;
	border-color: var(--mezan-navy) !important;
	color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):hover {
	background-color: var(--mezan-blue) !important;
	border-color: var(--mezan-blue) !important;
	color: #fff !important;
}

.btn-primary-light,
.btn-secondary-dark {
	color: var(--mezan-navy) !important;
}

a,
.btn-link,
.text-primary,
.indicator-pill.blue,
.indicator.blue {
	--text-color: var(--mezan-blue);
}

a:hover,
.btn-link:hover {
	color: var(--mezan-navy);
}

/* -------- Desk: navbar / sidebar / workspace -------- */
.navbar {
	border-bottom: 1px solid rgba(17, 46, 129, 0.12) !important;
}

.navbar .navbar-brand img,
.navbar .app-logo {
	max-height: 28px;
}

body[data-route] .layout-side-section .sidebar-menu li a.active,
body[data-route] .desk-sidebar .standard-sidebar-item.selected,
.desk-sidebar .standard-sidebar-item.selected,
.standard-sidebar-item.selected,
.list-sidebar .list-sidebar-item.active,
.workspace-sidebar .item.selected,
.sidebar-item-container .selected {
	background-color: rgba(67, 130, 223, 0.14) !important;
	color: var(--mezan-navy) !important;
}

.desk-sidebar .standard-sidebar-item:hover,
.standard-sidebar-item:hover {
	background-color: rgba(232, 243, 246, 0.7) !important;
}

/* Workspace / module cards */
.widget,
.codex-editor,
.workspace .widget {
	border-color: rgba(17, 46, 129, 0.1);
}

.widget .widget-head .widget-title,
.page-title .title-text,
.breadcrumb a {
	color: var(--mezan-navy);
}

/* Form focus rings */
.form-control:focus,
.input-with-feedback:focus,
.like-disabled-input:focus,
select.form-control:focus,
.awesomplete > ul > li:hover,
.awesomplete > ul > li[aria-selected="true"] {
	border-color: var(--mezan-blue) !important;
	box-shadow: 0 0 0 2px rgba(67, 130, 223, 0.2) !important;
}

input[type="checkbox"]:checked,
.checkbox input:checked + .label-area::before,
input[type="checkbox"]:checked::before {
	accent-color: var(--mezan-navy);
}

/* List / filters / tags */
.frappe-list .list-row:hover,
.list-row-container .level:hover {
	background-color: rgba(232, 243, 246, 0.45);
}

.tag,
.indicator-pill.blue,
.filter-tag {
	background-color: rgba(170, 204, 214, 0.35) !important;
	color: var(--mezan-navy) !important;
}

/* Onboarding / progress / charts accents */
.progress-bar,
.progress .progress-bar {
	background-color: var(--mezan-blue) !important;
}

/* Apps switcher / avatar accents */
.avatar .standard-image,
.avatar-frame.standard-image {
	background-color: var(--mezan-navy) !important;
	color: #fff !important;
}

/* -------- Website pages -------- */
.web-footer,
.navbar-light {
	border-color: rgba(17, 46, 129, 0.1);
}

.page-card .btn-primary,
.website .btn-primary {
	background-color: var(--mezan-navy) !important;
	border-color: var(--mezan-navy) !important;
}

.website .btn-primary:hover {
	background-color: var(--mezan-blue) !important;
	border-color: var(--mezan-blue) !important;
}

/* Soft app canvas */
body.full-width,
body[data-path],
#body,
.main-section {
	--bg-color: #f5fafc;
}

/* =========================================================
   Desk workspace — premium Mezan experience
   ========================================================= */

@keyframes mezan-banner-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes mezan-float {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}
	50% {
		transform: translate(3%, -4%) scale(1.08);
	}
}

@keyframes mezan-pulse {
	0%,
	100% {
		opacity: 1;
		box-shadow: 0 0 0 0 rgba(170, 204, 214, 0.7);
	}
	50% {
		opacity: 0.7;
		box-shadow: 0 0 0 8px rgba(170, 204, 214, 0);
	}
}

@keyframes mezan-widget-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes mezan-shine {
	0% {
		background-position: -120% 0;
	}
	100% {
		background-position: 220% 0;
	}
}

body.mezan-desk,
body[data-route^="Workspaces"],
body[data-route^="workspaces"] {
	background:
		radial-gradient(900px 420px at 10% -10%, rgba(170, 204, 214, 0.35), transparent 60%),
		radial-gradient(700px 380px at 100% 0%, rgba(67, 130, 223, 0.12), transparent 55%),
		linear-gradient(180deg, #f0f7fa 0%, #f5fafc 32%, #f5fafc 100%) !important;
}

/* Full-screen ERP background on /desk — stays behind content (50% opacity) */
body.mezan-desk.mezan-desk-home,
body.mezan-desk-home {
	background-color: #d8e4f0 !important;
	background-image: none !important;
}

/* Prefer real element; ::before is fallback */
body.mezan-desk-home::before {
	content: none;
}

#mezan-desk-bg {
	display: none;
}

body.mezan-desk-home #mezan-desk-bg {
	display: block;
	position: fixed !important;
	inset: 0 !important;
	z-index: 0 !important;
	pointer-events: none !important;
	background-color: #d8e4f0;
	background-image: url("/assets/erpnext/images/mezan/desk-bg.jpg");
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 0.2;
}

/* Page chrome must be transparent so the fixed bg shows through */
body.mezan-desk-home html,
body.mezan-desk-home,
body.mezan-desk-home #body,
body.mezan-desk-home .main-section,
body.mezan-desk-home .layout-main,
body.mezan-desk-home .layout-main-section,
body.mezan-desk-home .layout-main-section-wrapper,
body.mezan-desk-home .page-container,
body.mezan-desk-home .content.page-container,
body.mezan-desk-home #page-desktop,
body.mezan-desk-home .desktop-wrapper,
body.mezan-desk-home .desktop-container,
body.mezan-desk-home .row.layout-main,
body.mezan-desk-home .container,
body.mezan-desk-home .container.page-body,
body.mezan-desk-home .page-body,
body.mezan-desk-home .body-sidebar-container {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
}

/* Keep sidebar readable but not a solid wall over the photo */
body.mezan-desk-home .body-sidebar {
	background: rgba(255, 255, 255, 0.82) !important;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

body.mezan-desk-home #body,
body.mezan-desk-home .main-section,
body.mezan-desk-home .page-container,
body.mezan-desk-home .desktop-wrapper,
body.mezan-desk-home .desktop-container {
	position: relative;
	z-index: 1;
}

body.mezan-desk-home #mezan-desk-banner {
	position: relative;
	z-index: 40;
}

/* Navbar — light Mezan glass on app screens (Mezan topbar handles branding there) */
.navbar {
	background: rgba(255, 255, 255, 0.86) !important;
	backdrop-filter: blur(14px) saturate(1.2);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	border-bottom: 1px solid rgba(17, 46, 129, 0.1) !important;
	box-shadow: 0 8px 28px rgba(17, 46, 129, 0.06);
}

.navbar .search-bar {
	border-radius: 999px !important;
	overflow: hidden;
	border: 1px solid rgba(17, 46, 129, 0.12);
	background: rgba(240, 247, 250, 0.65) !important;
}

.navbar .search-bar input {
	background: transparent !important;
	color: inherit !important;
}

.navbar .search-bar .search-icon,
.navbar .nav-link {
	color: var(--mezan-navy) !important;
	stroke: var(--mezan-navy) !important;
}

.navbar .search-bar input:focus {
	border-color: transparent !important;
	box-shadow: none !important;
}

.navbar .search-bar:focus-within {
	border-color: var(--mezan-blue) !important;
	box-shadow: 0 0 0 3px rgba(67, 130, 223, 0.18) !important;
}

/* Page title bar — light on app screens */
.page-head {
	background: var(--bg-color, #fff) !important;
	border-bottom: 1px solid var(--border-color, rgba(17, 46, 129, 0.1)) !important;
	box-shadow: none !important;
	color: inherit !important;
}

.page-head .page-title,
.page-head .title-text,
.page-head .title-area,
.page-head .sub-heading,
.page-head .sidebar-toggle-btn,
.page-head .breadcrumb,
.page-head .breadcrumb a,
.page-head .breadcrumb-item,
.page-head .breadcrumb-item a {
	color: var(--mezan-navy) !important;
}

.page-head .sidebar-toggle-btn {
	--icon-stroke: var(--mezan-navy) !important;
}

.page-head .page-actions .btn-default,
.page-head .page-actions .btn-secondary,
.page-head .page-actions .btn-modal-secondary,
.page-head .menu-btn-group .btn,
.page-head .page-icon-group .btn,
.page-head .actions-btn-group .btn,
.page-head .custom-btn-group .btn {
	background: initial;
	border-color: initial;
	color: initial;
	border-radius: var(--border-radius, 8px);
}

.page-head .page-actions .btn-primary {
	/* keep Mezan primary button theme from global btn rules */
}

.page-head svg,
.page-head .icon,
.page-head use {
	stroke: currentColor;
	color: inherit;
}

/* Desk home — hide only the native page toolbar (not the Mezan banner) */
body.mezan-desk-home .page-head,
body.mezan-desk-home #page-Workspaces .page-head,
body.mezan-desk-home .page-container .page-head,
body.mezan-desk-home .layout-main-section > .page-head,
body.mezan-desk-home .layout-main-section-wrapper > .page-head,
body.mezan-desk-home .page-head.flex,
body.mezan-desk-home .page-head .page-head-content,
body.mezan-desk-home .page-head .standard-items-section,
body.mezan-desk-home .desktop-navbar,
body.mezan-desk-home header.desktop-navbar,
body.mezan-desk-home .desktop-wrapper > .desktop-navbar,
body.mezan-desk-home .navbar.desktop-navbar,
body.mezan-desk-home .navbar-container.desktop-navbar,
body.mezan-desk-home .sticky-top > .navbar {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
	box-shadow: none !important;
	pointer-events: none !important;
	visibility: hidden !important;
}

/* Native desktop notif/avatar after moving into Mezan banner */
body.mezan-desk-home #mezan-desk-banner .desktop-notifications,
body.mezan-desk-home #mezan-desk-banner .desktop-avatar,
body.mezan-desk-home #mezan-desk-banner .mezan-banner-notif,
body.mezan-desk-home #mezan-desk-banner .mezan-banner-avatar,
body.mezan-desk-home #mezan-desk-banner .desktop-notifications .dropdown {
	display: inline-flex !important;
	align-items: center !important;
	visibility: visible !important;
	pointer-events: auto !important;
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
	position: relative !important;
}

body.mezan-desk-home #mezan-desk-banner .desktop-notifications .nav-link,
body.mezan-desk-home #mezan-desk-banner .desktop-avatar {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	border: 1px solid rgba(170, 204, 214, 0.35);
	background: rgba(255, 255, 255, 0.12);
	color: #fff !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

body.mezan-desk-home #mezan-desk-banner .desktop-notifications .icon,
body.mezan-desk-home #mezan-desk-banner .desktop-notifications svg {
	stroke: #fff !important;
	color: #fff !important;
}

body.mezan-desk-home #mezan-desk-banner .desktop-avatar .avatar,
body.mezan-desk-home #mezan-desk-banner .desktop-avatar .avatar-frame {
	width: 24px !important;
	height: 24px !important;
}

/* Override Frappe sidebar-style panel (100vh / top:0) — anchor under the bell */
body.mezan-desk-home #mezan-desk-banner .mezan-desk-banner__meta,
body.mezan-desk-home #mezan-desk-banner .mezan-screenbar,
body.mezan-desk-home #mezan-desk-banner .desktop-notifications,
body.mezan-desk-home #mezan-desk-banner .dropdown-notifications,
body.mezan-desk-home #mezan-desk-banner .desktop-notifications .dropdown {
	position: relative !important;
	z-index: 50 !important;
	overflow: visible !important;
}

body.mezan-desk-home #mezan-desk-banner .desktop-notifications .dropdown-menu,
body.mezan-desk-home #mezan-desk-banner .desktop-notifications .notifications-list,
body.mezan-desk-home #mezan-desk-banner .dropdown-notifications .dropdown-menu,
body.mezan-desk-home #mezan-desk-banner .dropdown-notifications .notifications-list {
	display: none;
	position: absolute !important;
	top: calc(100% + 8px) !important;
	right: 0 !important;
	left: auto !important;
	bottom: auto !important;
	inset: auto 0 auto auto !important;
	transform: none !important;
	translate: none !important;
	z-index: 2000 !important;
	width: min(360px, 92vw) !important;
	min-width: 280px !important;
	max-width: min(360px, 92vw) !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: min(70vh, 520px) !important;
	overflow: auto !important;
	border-radius: 12px !important;
	box-shadow: 0 18px 40px rgba(17, 46, 129, 0.28) !important;
	background-color: var(--bg-color, #fff) !important;
}

body.mezan-desk-home #mezan-desk-banner .desktop-notifications .dropdown-menu.show,
body.mezan-desk-home #mezan-desk-banner .desktop-notifications .dropdown.show .dropdown-menu,
body.mezan-desk-home #mezan-desk-banner .dropdown-notifications.show .dropdown-menu,
body.mezan-desk-home #mezan-desk-banner .dropdown-notifications .notifications-list.show,
body.mezan-desk-home #mezan-desk-banner .desktop-notifications .notifications-list.show {
	display: block !important;
}

/* Desk screen bar lives inside the hero banner */
.mezan-screenbar {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	position: relative;
	z-index: 2;
}

.mezan-screenbar--banner {
	margin: 0;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.mezan-screenbar__search {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 200px;
	height: 34px;
	padding: 0 10px 0 12px;
	border-radius: 999px;
	border: 1px solid rgba(170, 204, 214, 0.4);
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.mezan-screenbar__search:hover {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(170, 204, 214, 0.7);
}

.mezan-screenbar__search-label {
	font-size: 13px;
	font-weight: 600;
	opacity: 0.95;
}

.mezan-screenbar__search-key {
	margin-left: auto;
	font-size: 11px;
	font-weight: 650;
	letter-spacing: 0.02em;
	padding: 2px 7px;
	border-radius: 6px;
	background: rgba(17, 46, 129, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.18);
	opacity: 0.9;
}

.mezan-screenbar__icon-btn {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	border: 1px solid rgba(170, 204, 214, 0.35);
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.mezan-screenbar__icon-btn:hover {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(170, 204, 214, 0.6);
}

.mezan-screenbar .mezan-topbar__btn {
	min-height: 34px;
	height: 34px;
	padding: 2px 8px 2px 6px;
	border-radius: 10px;
}

.mezan-screenbar .mezan-topbar__avatar .avatar,
.mezan-screenbar .mezan-topbar__avatar .avatar-frame {
	width: 24px !important;
	height: 24px !important;
}

.mezan-screenbar .mezan-topbar__profile-email {
	display: none;
}

.mezan-screenbar .mezan-topbar__profile-name {
	font-size: 12px;
	max-width: 110px;
}

.mezan-screenbar .mezan-topbar__menu {
	right: 0;
	left: auto;
}

body.mezan-desk-home .body-sidebar .mezan-desk-moved,
body.mezan-desk-home .body-sidebar .navbar-search-bar,
body.mezan-desk-home .body-sidebar #navbar-modal-search,
body.mezan-desk-home .body-sidebar .sidebar-notification,
body.mezan-desk-home .body-sidebar .dropdown-navbar-user,
body.mezan-desk-home .body-sidebar .sidebar-user-button,
body.mezan-desk-home .body-sidebar .nav-item.dropdown-navbar-user {
	display: none !important;
}

/* Notifications panel near banner toolbar */
body.mezan-desk-home .body-sidebar .dropdown-notifications:not(.hidden) {
	display: block !important;
	position: fixed !important;
	top: 72px !important;
	right: 24px !important;
	left: auto !important;
	z-index: 1040 !important;
	width: min(380px, calc(100vw - 24px)) !important;
}

body.mezan-desk-home .body-sidebar .dropdown-notifications .notifications-list {
	position: static !important;
	left: auto !important;
	width: 100% !important;
	max-height: min(70vh, 520px) !important;
	overflow: auto !important;
	border-radius: 12px !important;
	box-shadow: 0 18px 40px rgba(17, 46, 129, 0.28) !important;
	border: 1px solid rgba(170, 204, 214, 0.35) !important;
	background: #fff !important;
}

.form-inner-toolbar {
	background: transparent !important;
	border-bottom: 1px solid rgba(17, 46, 129, 0.06);
}

/* =========================================================
   Application side menu (body-sidebar)
   ========================================================= */

:root,
[data-theme="light"] {
	--sidebar-hover-color: rgba(170, 204, 214, 0.55);
	--sidebar-active-color: rgba(67, 130, 223, 0.16);
	--sidebar-border-color: rgba(70, 71, 174, 0.18);
	--surface-menu-bar: linear-gradient(180deg, #3d3ea0 0%, #4647ae 48%, #5a6bc8 100%);
}

.body-sidebar-container {
	--mezan-sidebar-ink: #112e81;
	--mezan-sidebar-indigo: #4647ae;
	--mezan-sidebar-azure: #4382df;
	--mezan-sidebar-mist: #aaccd6;
}

/* Indigo rail (#4647AE) — alternate palette color from ink navy */
.body-sidebar {
	background: linear-gradient(185deg, #3d3ea0 0%, #4647ae 46%, #5456b8 100%) !important;
	border-right: 1px solid rgba(170, 204, 214, 0.22) !important;
	box-shadow: 8px 0 28px rgba(70, 71, 174, 0.22);
	padding: 8px 4px 10px !important;
	gap: 8px !important;
}

.body-sidebar-container.expanded .body-sidebar {
	background:
		radial-gradient(460px 240px at 0% 0%, rgba(67, 130, 223, 0.42), transparent 58%),
		radial-gradient(380px 200px at 100% 100%, rgba(170, 204, 214, 0.18), transparent 50%),
		linear-gradient(185deg, #3d3ea0 0%, #4647ae 48%, #5456b8 100%) !important;
}

.body-sidebar .sidebar-header {
	color: #e8f3f6 !important;
	width: 100% !important;
	border-radius: 12px !important;
	padding: 6px 6px 6px 4px !important;
	height: auto !important;
	min-height: 44px;
	gap: 6px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(170, 204, 214, 0.22);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.body-sidebar .sidebar-header:hover,
.body-sidebar .sidebar-header.hover,
.body-sidebar .sidebar-header.active-sidebar {
	background: rgba(67, 130, 223, 0.28) !important;
	border-color: rgba(170, 204, 214, 0.4);
	box-shadow:
		0 8px 18px rgba(17, 46, 129, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.12);
	text-decoration: none !important;
}

.body-sidebar .sidebar-header .sidebar-item-icon {
	padding: 0 !important;
	flex: 0 0 auto;
}

.body-sidebar .header-logo-container,
.body-sidebar .title-container {
	color: #e8f3f6 !important;
}

.body-sidebar .header-logo {
	width: 30px !important;
	height: 30px !important;
	border-radius: 9px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(170, 204, 214, 0.28);
	box-shadow: 0 4px 10px rgba(17, 46, 129, 0.18);
}

.body-sidebar .header-title {
	color: #ffffff !important;
	font-weight: 700 !important;
	letter-spacing: -0.01em;
	font-size: 0.86rem !important;
	line-height: 1.15 !important;
}

.body-sidebar .header-subtitle {
	color: rgba(170, 204, 214, 0.95) !important;
	font-size: 0.68rem !important;
	margin-top: 1px !important;
}

.body-sidebar .title-container {
	margin-left: 4px !important;
	min-width: 0;
}

.body-sidebar .sidebar-header .drop-icon {
	width: 24px;
	height: 24px;
	margin-left: auto !important;
	border-radius: 8px;
	color: #aaccd6 !important;
	background: rgba(255, 255, 255, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	transition: background 0.18s ease, transform 0.18s ease;
}

.body-sidebar .sidebar-header:hover .drop-icon,
.body-sidebar .sidebar-header.active-sidebar .drop-icon {
	background: rgba(67, 130, 223, 0.45);
	color: #fff !important;
	transform: rotate(180deg);
}

.body-sidebar .header-logo img {
	border-radius: 8px;
}

/* App / workspace switcher dropdown (above nav) */
.frappe-menu.context-menu,
.frappe-menu {
	--menu-width: 228px;
	padding: 8px !important;
	border-radius: 14px !important;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f4fafc 100%) !important;
	border: 1px solid rgba(17, 46, 129, 0.1) !important;
	box-shadow:
		0 18px 40px rgba(17, 46, 129, 0.18),
		0 4px 12px rgba(70, 71, 174, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
	backdrop-filter: blur(10px);
	overflow: hidden;
}

.frappe-menu::before {
	content: "";
	display: block;
	height: 3px;
	margin: -8px -8px 8px;
	background: linear-gradient(90deg, #112e81 0%, #4647ae 45%, #4382df 100%);
}

.frappe-menu .dropdown-menu-item {
	border-radius: 9px !important;
	margin: 1px 0;
	overflow: hidden;
}

.frappe-menu .dropdown-menu-item:hover:has(a),
.frappe-menu .dropdown-menu-item:focus-within {
	background: rgba(170, 204, 214, 0.35) !important;
}

.frappe-menu .dropdown-menu-item a {
	height: 32px !important;
	padding: 6px 10px !important;
	gap: 10px !important;
	color: #112e81 !important;
	border-radius: 9px;
	transition: background 0.15s ease, color 0.15s ease;
}

.frappe-menu .dropdown-menu-item .menu-item-title {
	color: #112e81 !important;
	font-weight: 560;
	font-size: 0.84rem;
}

.frappe-menu .dropdown-menu-item .menu-item-shortcut {
	color: rgba(70, 71, 174, 0.7) !important;
	background: rgba(170, 204, 214, 0.35);
	border-radius: 6px;
	padding: 2px 6px;
	font-size: 0.68rem !important;
	margin-left: 8px !important;
}

.frappe-menu .dropdown-menu-item .frappe-menu-item-icon,
.frappe-menu .dropdown-menu-item .frappe-menu-item-icon svg,
.frappe-menu .dropdown-menu-item .frappe-menu-item-icon use {
	color: #4647ae !important;
	stroke: #4647ae !important;
}

.frappe-menu .dropdown-menu-item:hover a,
.frappe-menu .dropdown-menu-item:hover .menu-item-title {
	color: #0f2772 !important;
}

.frappe-menu .dropdown-menu-item:hover .frappe-menu-item-icon,
.frappe-menu .dropdown-menu-item:hover .frappe-menu-item-icon svg {
	color: #4382df !important;
	stroke: #4382df !important;
}

.frappe-menu .dropdown-menu-item .dropdown-divider {
	border-top: 1px solid rgba(17, 46, 129, 0.1) !important;
	margin: 6px 4px !important;
	opacity: 1;
}

/* Nested submenu panels */
.frappe-menu .frappe-menu {
	border-radius: 12px !important;
}

.frappe-menu .frappe-menu::before {
	display: none;
}

.body-sidebar .body-sidebar-top {
	gap: 2px !important;
	scrollbar-width: thin;
	scrollbar-color: rgba(170, 204, 214, 0.5) transparent;
}

.body-sidebar .body-sidebar-top::-webkit-scrollbar {
	width: 6px;
}

.body-sidebar .body-sidebar-top::-webkit-scrollbar-thumb {
	background: rgba(170, 204, 214, 0.45);
	border-radius: 99px;
}

.body-sidebar .divider {
	border-top-color: rgba(170, 204, 214, 0.28) !important;
	opacity: 0.95;
}

.body-sidebar .section-break {
	color: rgba(170, 204, 214, 0.88) !important;
	font-size: 0.68rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 8px 2px 2px !important;
	padding-left: 4px !important;
}

.body-sidebar .standard-sidebar-item {
	position: relative;
	border-radius: 8px !important;
	margin: 0 !important;
	overflow: visible;
	transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.body-sidebar .standard-sidebar-item .item-anchor {
	color: rgba(232, 243, 246, 0.95) !important;
	height: 30px !important;
	padding: 0 4px 0 2px !important;
	border-radius: 8px;
	gap: 4px !important;
	min-width: 0;
}

.body-sidebar .standard-sidebar-item .sidebar-item-icon {
	padding: 2px 2px 2px 0 !important;
	flex: 0 0 auto;
	width: 22px !important;
	min-width: 22px !important;
	justify-content: center;
}

.body-sidebar .standard-sidebar-item .sidebar-item-label {
	color: rgba(232, 243, 246, 0.95) !important;
	font-weight: 520;
	font-size: 0.8rem !important;
	min-width: 0;
	padding-left: 0 !important;
	margin-left: 0 !important;
}

.body-sidebar .standard-sidebar-item .sidebar-item-icon,
.body-sidebar .standard-sidebar-item .sidebar-item-icon svg,
.body-sidebar .standard-sidebar-item .sidebar-item-icon use,
.body-sidebar .standard-sidebar-item .text-ink-gray-7 {
	color: #aaccd6 !important;
	stroke: #aaccd6 !important;
}

.body-sidebar .standard-sidebar-item .sidebar-item-icon svg {
	width: 14px !important;
	height: 14px !important;
}

.body-sidebar .standard-sidebar-item:not(.active-sidebar):has(a:not(.section-break)):hover,
.body-sidebar .standard-sidebar-item:not(.active-sidebar):hover {
	background: rgba(170, 204, 214, 0.22) !important;
	transform: none;
	border-radius: 8px !important;
}

.body-sidebar .standard-sidebar-item:not(.active-sidebar):hover .item-anchor,
.body-sidebar .standard-sidebar-item:not(.active-sidebar):hover .sidebar-item-label {
	color: #ffffff !important;
}

.body-sidebar .standard-sidebar-item:not(.active-sidebar):hover .sidebar-item-icon,
.body-sidebar .standard-sidebar-item:not(.active-sidebar):hover .sidebar-item-icon svg {
	color: #ffffff !important;
	stroke: #ffffff !important;
}

.body-sidebar .standard-sidebar-item.active-sidebar,
.body-sidebar .standard-sidebar-item.selected {
	background: linear-gradient(90deg, #4382df 0%, #5a92e4 100%) !important;
	box-shadow:
		0 8px 18px rgba(17, 46, 129, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.22);
	border-radius: 8px !important;
}

.body-sidebar .standard-sidebar-item.active-sidebar .item-anchor,
.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label,
.body-sidebar .standard-sidebar-item.selected .item-anchor,
.body-sidebar .standard-sidebar-item.selected .sidebar-item-label {
	color: #ffffff !important;
	font-weight: 650 !important;
}

.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-icon,
.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-icon svg,
.body-sidebar .standard-sidebar-item.active-sidebar .text-ink-gray-7 {
	color: #ffffff !important;
	stroke: #ffffff !important;
}

.body-sidebar .standard-sidebar-item.active-sidebar::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	bottom: 6px;
	width: 3px;
	border-radius: 0 4px 4px 0;
	background: #aaccd6;
}

.body-sidebar .drop-icon {
	color: rgba(170, 204, 214, 0.9) !important;
}

.body-sidebar .drop-icon:hover {
	background: rgba(170, 204, 214, 0.22) !important;
	border-radius: 8px;
}

.body-sidebar .sidebar-item-suffix .keyboard-shortcut {
	color: rgba(170, 204, 214, 0.7) !important;
}

.body-sidebar .body-sidebar-bottom {
	border-top: 1px solid rgba(170, 204, 214, 0.24);
	padding-top: 8px;
	margin-top: 4px;
}

.body-sidebar .onboarding-sidebar {
	display: flex !important;
	align-items: center;
	gap: 8px;
	color: rgba(232, 243, 246, 0.92) !important;
	border-radius: 10px;
	padding: 8px !important;
	transition: background 0.18s ease;
}

.body-sidebar .onboarding-sidebar:hover {
	background: rgba(170, 204, 214, 0.22);
	color: #fff !important;
	text-decoration: none !important;
}

/* Sidebar user/toggle: controlled by desk-home vs has-topbar rules below */
.body-sidebar .mezan-hidden-user {
	display: none !important;
}

.body-sidebar .sidebar-toggle-btn,
.body-sidebar .collapse-sidebar-link {
	background: rgba(67, 130, 223, 0.4) !important;
	border: 1px solid rgba(170, 204, 214, 0.35);
	color: #ffffff !important;
	border-radius: 999px !important;
	box-shadow: 0 4px 12px rgba(17, 46, 129, 0.2);
}

.body-sidebar .sidebar-toggle-btn:hover,
.body-sidebar .collapse-sidebar-link:hover {
	background: #4382df !important;
}

.body-sidebar .nested-container {
	border-left: 1px solid rgba(170, 204, 214, 0.28);
	margin-left: 8px;
	padding-left: 2px;
}

/* Legacy/workspace sidebar fallbacks */
.desk-sidebar,
.workspace-sidebar,
.layout-side-section {
	background: rgba(255, 255, 255, 0.92) !important;
	backdrop-filter: blur(10px);
	border-right: 1px solid rgba(17, 46, 129, 0.08) !important;
}

.desk-sidebar .standard-sidebar-label,
.workspace-sidebar .standard-sidebar-label {
	color: var(--mezan-navy) !important;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 0.7rem !important;
}

.desk-sidebar .standard-sidebar-item,
.workspace-sidebar .standard-sidebar-item {
	border-radius: 10px !important;
	margin: 2px 6px !important;
	transition: background 0.18s ease, transform 0.18s ease;
}

.desk-sidebar .standard-sidebar-item:hover,
.workspace-sidebar .standard-sidebar-item:hover {
	background: rgba(232, 243, 246, 0.75) !important;
	transform: translateX(2px);
}

.desk-sidebar .standard-sidebar-item.selected,
.desk-sidebar .standard-sidebar-item.active-sidebar,
.workspace-sidebar .standard-sidebar-item.selected {
	background: linear-gradient(90deg, rgba(67, 130, 223, 0.2), rgba(232, 243, 246, 0.65)) !important;
	border-left: 3px solid var(--mezan-blue) !important;
	box-shadow: inset 0 0 0 1px rgba(67, 130, 223, 0.12);
}

.page-head .title-text {
	color: var(--mezan-navy) !important;
	font-weight: 750 !important;
	letter-spacing: -0.02em;
}

body.mezan-desk-home .page-head .title-text {
	color: #ffffff !important;
}

.workspace-sidebar .workspace-title,
.layout-main-section .page-title h3 {
	color: var(--mezan-navy) !important;
	font-weight: 750 !important;
	letter-spacing: -0.02em;
}

/* -------- Hero banner -------- */
.mezan-desk-banner {
	position: relative;
	z-index: 40;
	overflow: visible;
	margin: 0.75rem 0 1.1rem;
	border-radius: 18px;
	min-height: 0;
	color: #fff;
	background: linear-gradient(135deg, #0d2266 0%, #112e81 32%, #4647ae 68%, #4382df 100%);
	box-shadow:
		0 16px 36px rgba(17, 46, 129, 0.24),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	opacity: 0;
}

.mezan-desk-banner.is-ready {
	animation: mezan-banner-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mezan-desk-banner__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(8px);
	pointer-events: none;
	animation: mezan-float 12s ease-in-out infinite;
}

.mezan-desk-banner__glow--a {
	width: 55%;
	height: 70%;
	top: -30%;
	right: -10%;
	background: radial-gradient(circle, rgba(170, 204, 214, 0.55), transparent 70%);
}

.mezan-desk-banner__glow--b {
	width: 40%;
	height: 55%;
	bottom: -25%;
	left: -5%;
	background: radial-gradient(circle, rgba(67, 130, 223, 0.55), transparent 70%);
	animation-delay: -4s;
}

.mezan-desk-banner__media {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	overflow: hidden;
	background: url("/assets/erpnext/images/mezan/login-hero.jpg") center/cover no-repeat;
	opacity: 0.22;
	mix-blend-mode: soft-light;
	transform: scale(1.06);
	pointer-events: none;
}

.mezan-desk-banner__grid {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	overflow: hidden;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.55), transparent 75%);
	pointer-events: none;
}

.mezan-desk-banner__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0.65rem 1rem 0.7rem;
}

.mezan-desk-banner__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.mezan-desk-banner__identity {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	min-width: 0;
}

.mezan-desk-banner__logo {
	width: 36px;
	height: 36px;
	border-radius: 12px;
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
	flex-shrink: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.mezan-desk-banner__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0 0 0.3rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(232, 243, 246, 0.95);
}

.mezan-desk-banner__pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #aaccd6;
	animation: mezan-pulse 2.2s ease-out infinite;
}

.mezan-desk-banner__title {
	margin: 0 0 0.1rem;
	font-size: clamp(1.05rem, 1.8vw, 1.4rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.12;
	color: #fff;
	text-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.mezan-desk-banner__subtitle {
	display: none;
}

.mezan-desk-banner__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.45rem;
	flex-shrink: 0;
}

.mezan-desk-banner__wordmark {
	display: none !important;
}

.mezan-desk-banner__datetime {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.1rem;
}

.mezan-desk-banner__date,
.mezan-desk-banner__clock {
	margin: 0;
	font-size: 0.75rem;
	color: rgba(232, 243, 246, 0.9);
}

.mezan-desk-banner__clock {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	color: #fff;
}

.mezan-desk-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.mezan-desk-banner__action {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(8px);
	color: #fff;
	border-radius: 999px;
	padding: 0.35rem 0.8rem;
	font-size: 0.78rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.mezan-desk-banner__action img {
	filter: brightness(0) invert(1);
	opacity: 0.95;
}

.mezan-desk-banner__action:hover {
	background: rgba(170, 204, 214, 0.28);
	border-color: rgba(232, 243, 246, 0.65);
	transform: translateY(-1px);
}

@media (max-width: 900px) {
	.mezan-desk-banner__meta {
		width: 100%;
		align-items: stretch;
	}

	.mezan-screenbar--banner {
		justify-content: flex-start;
	}

	.mezan-screenbar__search {
		flex: 1 1 auto;
		min-width: 0;
	}

	.mezan-desk-banner {
		min-height: 0;
		border-radius: 16px;
		overflow: hidden;
	}

	.mezan-desk-banner__content {
		padding: 0.9rem;
	}

	.mezan-desk-banner__title {
		font-size: 1.25rem;
	}
}

/* -------- Widgets -------- */
.mezan-widget-group .widget-group-title {
	position: relative;
	display: inline-block;
	padding-bottom: 0.35rem;
	margin-bottom: 0.85rem !important;
	color: var(--mezan-navy) !important;
	font-weight: 750 !important;
	letter-spacing: -0.01em;
}

.mezan-widget-group .widget-group-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 2.25rem;
	height: 3px;
	border-radius: 99px;
	background: linear-gradient(90deg, #112e81, #aaccd6);
}

.widget.shortcut-widget-box,
.widget.number-widget-box,
.widget.dashboard-widget-box,
.widget.links-widget-box,
.widget {
	position: relative;
	overflow: hidden;
	border: 1px solid rgba(17, 46, 129, 0.1) !important;
	border-radius: 16px !important;
	background: linear-gradient(180deg, #ffffff 0%, #f2f8fb 100%) !important;
	box-shadow: 0 6px 18px rgba(17, 46, 129, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mezan-widget-enter {
	animation: mezan-widget-in 0.45s ease backwards;
	animation-delay: var(--mezan-delay, 0ms);
}

.widget.shortcut-widget-box::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: linear-gradient(180deg, #4382df, #aaccd6);
}

.widget.shortcut-widget-box:hover,
.widget.number-widget-box:hover,
.widget.links-widget-box:hover,
.widget.widget-shadow:hover {
	transform: translateY(-3px);
	border-color: rgba(67, 130, 223, 0.4) !important;
	box-shadow: 0 16px 34px rgba(17, 46, 129, 0.14) !important;
}

.widget.shortcut-widget-box:hover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		110deg,
		transparent 30%,
		rgba(170, 204, 214, 0.18) 48%,
		transparent 65%
	);
	background-size: 200% 100%;
	animation: mezan-shine 0.9s ease;
	pointer-events: none;
}

.widget .widget-head .widget-title {
	color: var(--mezan-navy) !important;
	font-weight: 700 !important;
}

.widget.number-widget-box .widget-body .number {
	color: var(--mezan-navy) !important;
	font-weight: 800 !important;
	letter-spacing: -0.03em;
}

.widget.shortcut-widget-box .widget-head svg,
.widget.shortcut-widget-box .icon {
	color: var(--mezan-blue) !important;
}

.widget.onboarding-widget-box {
	background:
		radial-gradient(500px 180px at 100% 0%, rgba(170, 204, 214, 0.35), transparent 60%),
		linear-gradient(180deg, #ffffff 0%, #f0f7fa 100%) !important;
	border-color: rgba(67, 130, 223, 0.22) !important;
}

.widget.dashboard-widget-box {
	min-height: 240px;
}

/* Soft scrollbars in desk */
body.mezan-desk ::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

body.mezan-desk ::-webkit-scrollbar-thumb {
	background: rgba(17, 46, 129, 0.28);
	border-radius: 99px;
}

body.mezan-desk ::-webkit-scrollbar-track {
	background: rgba(232, 243, 246, 0.45);
}

/* =========================================================
   Mezan application topbar (full app width)
   ========================================================= */

:root {
	--mezan-topbar-height: 52px;
}

/* Topbar layout when active (admin screens, not /desk home) */
body.mezan-has-topbar {
	padding-top: var(--mezan-topbar-height) !important;
	box-sizing: border-box;
}

body.mezan-has-topbar .body-sidebar-container,
body.mezan-has-topbar .body-sidebar,
body.mezan-has-topbar .body-sidebar-placeholder,
body.mezan-has-topbar .main-section {
	height: calc(100vh - var(--mezan-topbar-height)) !important;
	max-height: calc(100vh - var(--mezan-topbar-height)) !important;
}

body.mezan-has-topbar .body-sidebar-container {
	align-self: flex-start;
}

#mezan-topbar-host,
.mezan-topbar-host {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	width: 100vw !important;
	max-width: 100% !important;
	z-index: 1030 !important;
	display: block !important;
	margin: 0 !important;
	pointer-events: auto;
}

/* /desk home — no Mezan admin topbar */
body.mezan-desk-home {
	padding-top: 0 !important;
}

body.mezan-desk-home #mezan-topbar-host,
body.mezan-desk-home .mezan-topbar-host,
body.mezan-desk-home #mezan-topbar,
body.mezan-desk-home .mezan-topbar {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	pointer-events: none !important;
}

body.mezan-desk-home .body-sidebar-container,
body.mezan-desk-home .body-sidebar,
body.mezan-desk-home .body-sidebar-placeholder,
body.mezan-desk-home .main-section {
	height: 100vh !important;
	max-height: 100vh !important;
}

/* With Mezan topbar (admin): hide native sidebar user + collapse */
body.mezan-has-topbar:not(.mezan-desk-home) .body-sidebar .dropdown-navbar-user,
body.mezan-has-topbar:not(.mezan-desk-home) .body-sidebar .nav-item.dropdown-navbar-user,
body.mezan-has-topbar:not(.mezan-desk-home) .body-sidebar .sidebar-user-button,
body.mezan-has-topbar:not(.mezan-desk-home) .body-sidebar .collapse-sidebar-link,
body.mezan-has-topbar:not(.mezan-desk-home) .body-sidebar .sidebar-toggle-btn,
body.mezan-has-topbar:not(.mezan-desk-home) .body-sidebar .sidebar-resize-handle {
	display: none !important;
}

/* Desk home: keep sidebar collapse; profile/search/notif moved to screen bar */
body.mezan-desk-home .body-sidebar .collapse-sidebar-link,
body.mezan-desk-home .body-sidebar .sidebar-toggle-btn {
	display: inline-flex !important;
}

body.mezan-desk-home .body-sidebar .sidebar-resize-handle {
	display: block !important;
}

/* Keep dialogs / confirmations above the Mezan topbar */
.modal-backdrop {
	z-index: 1130 !important;
	background: rgba(17, 46, 129, 0.42) !important;
}

.modal-backdrop.show {
	opacity: 1 !important;
}

.modal,
.msgprint-dialog,
.frappe-dialog,
div[id^="dialog-"] {
	z-index: 1140 !important;
}

.modal.show,
.modal.fade.show {
	z-index: 1140 !important;
}

/* =========================================================
   Confirmation / warning / message modals
   ========================================================= */

.modal-dialog {
	/* keep default sizes for form dialogs */
}

.msgprint-dialog .modal-dialog,
.mezan-confirm-dialog .modal-dialog,
.mezan-warn-dialog .modal-dialog,
.modal:has(.frappe-confirm-message) .modal-dialog {
	max-width: 440px;
}

.modal-content {
	border: 1px solid rgba(17, 46, 129, 0.1) !important;
	border-radius: 16px !important;
	overflow: hidden;
	box-shadow:
		0 24px 48px rgba(17, 46, 129, 0.22),
		0 6px 16px rgba(70, 71, 174, 0.12) !important;
	background: linear-gradient(180deg, #ffffff 0%, #f4fafc 100%) !important;
}

.modal-header {
	position: relative;
	padding: 18px 18px 16px !important;
	border-bottom: 1px solid rgba(17, 46, 129, 0.08) !important;
	background:
		radial-gradient(420px 120px at 0% 0%, rgba(67, 130, 223, 0.16), transparent 60%),
		linear-gradient(180deg, #ffffff 0%, #f0f7fa 100%) !important;
	align-items: center;
	gap: 12px;
	min-height: 72px;
}

.modal-header::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #112e81 0%, #4647ae 45%, #4382df 100%);
}

.modal-header .title-section,
.modal-header .fill-width {
	display: flex !important;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.modal-title {
	position: relative;
	color: #112e81 !important;
	font-weight: 800 !important;
	font-size: 1.28rem !important;
	letter-spacing: -0.03em;
	line-height: 1.15;
	margin: 0 !important;
	text-wrap: balance;
}

.mezan-modal-title-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
}

.mezan-modal-title-badge {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(145deg, #112e81 0%, #4647ae 55%, #4382df 100%);
	color: #fff;
	box-shadow:
		0 10px 18px rgba(17, 46, 129, 0.28),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
	font-size: 1.15rem;
	line-height: 1;
}

.mezan-modal-title-badge svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mezan-modal-title-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.mezan-modal-title-eyebrow {
	font-size: 0.66rem;
	font-weight: 750;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #4647ae;
	opacity: 0.9;
}

.mezan-modal-title-label {
	background: linear-gradient(90deg, #112e81 0%, #4647ae 50%, #4382df 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	font-weight: 800;
	font-size: 1.28rem;
	letter-spacing: -0.03em;
	line-height: 1.15;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.mezan-confirm-dialog .mezan-modal-title-badge {
	background: linear-gradient(145deg, #112e81 0%, #4382df 100%);
}

.mezan-warn-dialog .mezan-modal-title-badge,
.modal:has(.indicator.red) .mezan-modal-title-badge {
	background: linear-gradient(145deg, #c0392b 0%, #e67e22 100%);
	box-shadow:
		0 10px 18px rgba(192, 57, 43, 0.28),
		inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.mezan-warn-dialog .mezan-modal-title-eyebrow,
.modal:has(.indicator.red) .mezan-modal-title-eyebrow {
	color: #c0392b;
}

.mezan-warn-dialog .mezan-modal-title-label,
.modal:has(.indicator.red) .mezan-modal-title-label {
	background: linear-gradient(90deg, #9b1c1c 0%, #c0392b 55%, #e67e22 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
}

.modal:has(.indicator.orange) .mezan-modal-title-badge,
.modal:has(.indicator.yellow) .mezan-modal-title-badge {
	background: linear-gradient(145deg, #d68910 0%, #e2a93b 100%);
}

.modal:has(.indicator.orange) .mezan-modal-title-label,
.modal:has(.indicator.yellow) .mezan-modal-title-label {
	background: linear-gradient(90deg, #8a5a00 0%, #d68910 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
}

.modal:has(.indicator.green) .mezan-modal-title-badge {
	background: linear-gradient(145deg, #1e8449 0%, #2f9e6c 100%);
}

.modal:has(.indicator.green) .mezan-modal-title-label {
	background: linear-gradient(90deg, #1e5c40 0%, #2f9e6c 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
}

/* Fallback when JS title wrap is not applied yet */
.modal-title:not(:has(.mezan-modal-title-wrap)) {
	background: linear-gradient(90deg, #112e81 0%, #4647ae 55%, #4382df 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	font-size: 1.28rem !important;
	font-weight: 800 !important;
	letter-spacing: -0.03em;
}

.mezan-confirm-dialog .modal-header .indicator,
.mezan-warn-dialog .modal-header .indicator,
.mezan-msgprint-dialog .modal-header .indicator,
.modal:has(.frappe-confirm-message) .modal-header .indicator,
.modal:has(.mezan-modal-title-wrap) .modal-header .indicator {
	display: none !important; /* replaced by Mezan title badge */
}

.modal-header .btn-modal-close,
.modal-header .modal-actions .btn {
	border-radius: 10px !important;
	color: #4647ae !important;
	width: 34px;
	height: 34px;
}

.modal-header .btn-modal-close:hover {
	background: rgba(170, 204, 214, 0.35) !important;
}

.modal-body {
	padding: 16px 18px 8px !important;
	color: #1c2b5a !important;
}

.frappe-confirm-message,
.msgprint {
	margin: 0 !important;
	padding: 4px 2px 10px !important;
	font-size: 0.92rem !important;
	line-height: 1.55 !important;
	color: #243568 !important;
}

.frappe-confirm-message ul,
.msgprint ul {
	padding-left: 1.1rem;
	margin-bottom: 0;
}

.modal-footer {
	padding: 12px 18px 16px !important;
	border-top: 1px solid rgba(17, 46, 129, 0.08) !important;
	background: rgba(232, 243, 246, 0.45) !important;
	gap: 8px;
}

.modal-footer .btn {
	border-radius: 10px !important;
	min-height: 34px;
	padding: 6px 14px !important;
	font-weight: 600 !important;
}

.modal-footer .btn-modal-secondary,
.modal-footer .btn-secondary {
	background: #ffffff !important;
	border: 1px solid rgba(17, 46, 129, 0.16) !important;
	color: #112e81 !important;
}

.modal-footer .btn-modal-secondary:hover,
.modal-footer .btn-secondary:hover {
	background: rgba(170, 204, 214, 0.35) !important;
	border-color: rgba(70, 71, 174, 0.28) !important;
}

.modal-footer .btn-primary {
	background: linear-gradient(90deg, #112e81 0%, #4647ae 100%) !important;
	border-color: transparent !important;
	box-shadow: 0 8px 16px rgba(17, 46, 129, 0.22);
}

.modal-footer .btn-primary:hover {
	background: linear-gradient(90deg, #4382df 0%, #4647ae 100%) !important;
}

.modal-footer .btn-danger {
	background: linear-gradient(90deg, #c0392b 0%, #d64545 100%) !important;
	border-color: transparent !important;
	color: #fff !important;
	box-shadow: 0 8px 16px rgba(192, 57, 43, 0.22);
}

.modal-footer .btn-danger:hover {
	background: linear-gradient(90deg, #a93226 0%, #c0392b 100%) !important;
	color: #fff !important;
}

/* Confirm dialog accent */
.modal:has(.frappe-confirm-message) .modal-header::before,
.mezan-confirm-dialog .modal-header::before {
	background: linear-gradient(90deg, #112e81 0%, #4382df 100%);
}

/* Warning dialog (frappe.warn / red indicator) */
.modal:has(.indicator.red) .modal-header::before,
.mezan-warn-dialog .modal-header::before {
	background: linear-gradient(90deg, #c0392b 0%, #e67e22 100%);
}

.modal:has(.indicator.red) .modal-title,
.mezan-warn-dialog .modal-title {
	/* gradient handled by .mezan-modal-title-label */
	color: #9b1c1c;
}

.modal:has(.indicator.orange) .modal-title,
.modal:has(.indicator.yellow) .modal-title {
	color: #8a5a00;
}

.modal:has(.indicator.green) .modal-header::before {
	background: linear-gradient(90deg, #1e8449 0%, #2f9e6c 100%);
}

.msgprint-dialog .modal-content {
	min-height: 120px;
}

.msgprint a:not(.btn) {
	color: #4382df !important;
	font-weight: 600;
}

.msgprint a:not(.btn):hover {
	color: #112e81 !important;
}

/* Soften alert banners inside dialogs / pages */
.alert {
	border-radius: 12px !important;
	border: 1px solid transparent !important;
	box-shadow: 0 4px 12px rgba(17, 46, 129, 0.06);
}

.alert-warning {
	background: rgba(226, 169, 59, 0.14) !important;
	border-color: rgba(226, 169, 59, 0.35) !important;
	color: #8a5a00 !important;
}

.alert-danger {
	background: rgba(214, 69, 69, 0.12) !important;
	border-color: rgba(214, 69, 69, 0.3) !important;
	color: #9b1c1c !important;
}

.alert-info {
	background: rgba(67, 130, 223, 0.12) !important;
	border-color: rgba(67, 130, 223, 0.28) !important;
	color: #112e81 !important;
}

.alert-success {
	background: rgba(47, 158, 108, 0.12) !important;
	border-color: rgba(47, 158, 108, 0.28) !important;
	color: #1e5c40 !important;
}

/* Toast / desk alerts */
.alert.desk-alert,
.frappe-toast-message,
div[id^="alert-container"] .alert {
	border-radius: 12px !important;
	backdrop-filter: blur(8px);
}

/* Mezan application topbar */
.mezan-topbar {
	display: flex !important;
	align-items: center;
	gap: 10px;
	min-height: var(--mezan-topbar-height);
	height: var(--mezan-topbar-height);
	padding: 0 16px;
	background: linear-gradient(90deg, #112e81 0%, #4647ae 52%, #4382df 100%);
	border-bottom: 1px solid rgba(170, 204, 214, 0.28);
	box-shadow: 0 10px 28px rgba(17, 46, 129, 0.18);
	color: #fff;
	width: 100%;
	box-sizing: border-box;
	position: relative;
	--mezan-sidebar-edge: 220px;
	visibility: visible !important;
	pointer-events: auto !important;
}

.mezan-topbar__brand {
	position: relative;
	z-index: 1;
	max-width: calc(220px - 48px);
	overflow: hidden;
	opacity: 1;
	transform: none;
}

/* Sit on the open side-nav edge — stays fixed when nav collapses */
.mezan-topbar__sidebar-toggle {
	position: absolute !important;
	top: 50%;
	left: calc(220px - 16px);
	transform: translateY(-50%);
	z-index: 2;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	border: 1px solid rgba(170, 204, 214, 0.4);
	background: linear-gradient(145deg, #4647ae 0%, #4382df 100%);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
	box-shadow:
		0 6px 14px rgba(17, 46, 129, 0.28),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mezan-topbar__sidebar-toggle:hover {
	background: linear-gradient(145deg, #4382df 0%, #112e81 100%);
	border-color: rgba(170, 204, 214, 0.7);
	box-shadow: 0 8px 18px rgba(17, 46, 129, 0.35);
}

.mezan-topbar__sidebar-toggle:active {
	transform: translateY(-50%) scale(0.96);
}

.mezan-topbar__sidebar-toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.mezan-topbar__sidebar-toggle .icon-expand {
	display: none;
}

.mezan-topbar__sidebar-toggle.is-collapsed .icon-collapse {
	display: none;
}

.mezan-topbar__sidebar-toggle.is-collapsed .icon-expand {
	display: block;
}

.mezan-topbar__sidebar-toggle svg {
	display: block;
	width: 16px;
	height: 16px;
}

.mezan-topbar__spacer {
	margin-left: 160px;
}

.mezan-topbar__brand {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.mezan-topbar__logo {
	width: 24px;
	height: 24px;
	border-radius: 7px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(170, 204, 214, 0.3);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

.mezan-topbar__brand-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.1;
}

.mezan-topbar__product {
	font-weight: 700;
	font-size: 13px;
	letter-spacing: -0.01em;
}

.mezan-topbar__company {
	font-size: 10px;
	opacity: 0.8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 140px;
}

.mezan-topbar__actions {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.mezan-topbar__utilities {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-right: 2px;
}

.mezan-topbar__icon-btn {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	border: 1px solid rgba(170, 204, 214, 0.28);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.mezan-topbar__icon-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(170, 204, 214, 0.55);
}

.mezan-topbar__icon-btn:active {
	transform: scale(0.96);
}

.mezan-topbar__icon-btn svg {
	display: block;
}

.mezan-topbar__product {
	font-weight: 700;
	font-size: 13px;
	letter-spacing: -0.01em;
}

.mezan-topbar__company {
	font-size: 10px;
	color: rgba(170, 204, 214, 0.95);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 160px;
}

.mezan-topbar__spacer {
	flex: 1 1 auto;
	margin-left: 150px;
	min-width: 8px;
}

.mezan-topbar__actions {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.mezan-topbar__dropdown {
	position: relative;
}

.mezan-topbar__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	height: 32px;
	padding: 2px 8px 2px 6px;
	border-radius: 9px;
	border: 1px solid rgba(170, 204, 214, 0.28);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	cursor: pointer;
	transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.mezan-topbar__btn:hover,
.mezan-topbar__btn[aria-expanded="true"] {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(170, 204, 214, 0.45);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.mezan-topbar__btn-icon {
	display: inline-flex;
	color: #aaccd6;
}

.mezan-topbar__btn-label {
	font-size: 0.8rem;
	font-weight: 600;
	max-width: 110px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mezan-topbar__btn--profile {
	padding-right: 8px;
	max-width: 200px;
}

.mezan-topbar__avatar .avatar {
	width: 24px !important;
	height: 24px !important;
}

.mezan-topbar__avatar .avatar-frame {
	width: 24px !important;
	height: 24px !important;
}

.mezan-topbar__profile-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	line-height: 1.1;
	text-align: left;
}

.mezan-topbar__profile-name {
	font-size: 12px;
	font-weight: 650;
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mezan-topbar__profile-email {
	display: none;
}

.mezan-topbar__profile-email {
	font-size: 0.65rem;
	color: rgba(170, 204, 214, 0.92);
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mezan-topbar__chevron {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid rgba(170, 204, 214, 0.95);
	margin-left: 2px;
	transition: transform 0.16s ease;
}

.mezan-topbar__btn[aria-expanded="true"] .mezan-topbar__chevron {
	transform: rotate(180deg);
}

.mezan-topbar__menu {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 240px;
	max-width: min(320px, calc(100vw - 24px));
	padding: 8px;
	border-radius: 14px;
	background: linear-gradient(180deg, #ffffff 0%, #f4fafc 100%);
	border: 1px solid rgba(17, 46, 129, 0.1);
	box-shadow:
		0 18px 40px rgba(17, 46, 129, 0.18),
		0 4px 12px rgba(70, 71, 174, 0.1);
	z-index: 1040;
	overflow: hidden;
}

.mezan-topbar__menu.is-open {
	display: block;
	animation: mezan-topbar-in 0.16s ease-out;
}

.mezan-topbar__menu::before {
	content: "";
	display: block;
	height: 3px;
	margin: -8px -8px 8px;
	background: linear-gradient(90deg, #112e81 0%, #4647ae 45%, #4382df 100%);
}

.mezan-topbar__menu-head {
	padding: 4px 10px 8px;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(17, 46, 129, 0.65);
}

.mezan-topbar__menu-scroll {
	max-height: 280px;
	overflow: auto;
}

.mezan-topbar__item {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 34px;
	padding: 6px 10px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #112e81;
	font-size: 0.84rem;
	font-weight: 560;
	text-align: left;
	cursor: pointer;
	transition: background 0.14s ease;
}

.mezan-topbar__item:hover {
	background: rgba(170, 204, 214, 0.35);
}

.mezan-topbar__item.is-active {
	background: rgba(67, 130, 223, 0.16);
	box-shadow: inset 3px 0 0 #4382df;
}

.mezan-topbar__item-code {
	font-size: 0.68rem;
	font-weight: 600;
	color: rgba(70, 71, 174, 0.75);
	background: rgba(170, 204, 214, 0.35);
	border-radius: 6px;
	padding: 2px 6px;
}

.mezan-topbar__item--danger {
	color: #9b1c1c;
}

.mezan-topbar__divider {
	height: 1px;
	margin: 6px 4px;
	background: rgba(17, 46, 129, 0.1);
}

.mezan-topbar__profile-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px 12px;
	margin-bottom: 4px;
	border-bottom: 1px solid rgba(17, 46, 129, 0.08);
}

.mezan-topbar__profile-card-name {
	color: #112e81;
	font-weight: 700;
	font-size: 0.88rem;
	line-height: 1.2;
}

.mezan-topbar__profile-card-email {
	color: rgba(17, 46, 129, 0.65);
	font-size: 0.72rem;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@keyframes mezan-topbar-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 720px) {
	.mezan-topbar {
		padding: 8px 10px;
	}

	.mezan-topbar__company,
	.mezan-topbar__profile-text,
	.mezan-topbar__btn-label {
		display: none;
	}

	.mezan-topbar__btn--profile {
		padding: 4px 8px;
	}
}
