/**
 * VP ERP — bottom tab bar shell (black dock, white icons, edge-to-edge).
 */

:root {
	--vpm-tabbar-h: 62px;
	--vpm-tabbar-bg-top: #1a1a1a;
	--vpm-tabbar-bg-bottom: #000000;
	--vpm-tabbar-active: #2072b9;
}

.vpm-tabbar--mobile,
.vpm-gate__dock {
	position: fixed;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	max-width: none !important;
	transform: none !important;
	margin: 0 !important;
	border-radius: 0 !important;
	border: none !important;
	padding: 4px 0 calc(4px + var(--vpm-safe-bottom, 0px)) !important;
	background: linear-gradient(180deg, var(--vpm-tabbar-bg-top) 0%, var(--vpm-tabbar-bg-bottom) 100%) !important;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.08),
		0 -10px 28px rgba(0, 0, 0, 0.35) !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	box-sizing: border-box;
	z-index: 99999;
	align-items: stretch !important;
}

/* Icon row + label row — shared baseline across tabs */
.vpm-tabbar--mobile .vpm-tab,
.vpm-tabbar__lang-wrap .vpm-tab,
.vpm-gate__dock .vpm-tab {
	border-radius: 0 !important;
	background: transparent !important;
	color: rgba(255, 255, 255, 0.58);
	min-height: var(--vpm-tabbar-h);
	padding: 6px 2px 4px;
	display: grid;
	grid-template-rows: 22px 11px;
	align-content: end;
	justify-items: center;
	row-gap: 4px;
	gap: 4px;
}

.vpm-tabbar--mobile .vpm-tab__label,
.vpm-gate__dock .vpm-tab__label {
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.48rem;
	font-weight: 700;
	line-height: 11px;
	height: 11px;
	width: 100%;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: center;
}

.vpm-tabbar--mobile .vpm-tab__icon,
.vpm-gate__dock .vpm-tab__icon {
	width: 22px;
	height: 22px;
	background-color: #ffffff !important;
	filter:
		drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35))
		drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
	opacity: 0.92;
	transition: background-color 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

/* Hover + active tab: icon only → VP blue */
.vpm-tabbar--mobile .vpm-tab:hover .vpm-tab__icon,
.vpm-tabbar--mobile .vpm-tab--active .vpm-tab__icon,
.vpm-tabbar--mobile .vpm-tab[aria-expanded="true"] .vpm-tab__icon,
.vpm-gate__dock .vpm-tab:hover .vpm-tab__icon,
.vpm-gate__dock .vpm-tab[aria-expanded="true"] .vpm-tab__icon {
	background-color: var(--vpm-tabbar-active) !important;
	opacity: 1;
	filter:
		drop-shadow(0 1px 0 rgba(255, 255, 255, 0.25))
		drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.vpm-tabbar--mobile .vpm-tab--active,
.vpm-tabbar--mobile .vpm-tab:hover,
.vpm-gate__dock .vpm-tab[aria-expanded="true"] {
	background: transparent !important;
}

.vpm-tabbar--mobile .vpm-tab--active .vpm-tab__label {
	color: rgba(255, 255, 255, 0.72);
}

.vpm-tabbar--erp .vpm-tab--accent {
	position: static !important;
	top: auto !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: var(--vpm-tabbar-h) !important;
	margin: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: rgba(255, 255, 255, 0.58) !important;
}

.vpm-tabbar--erp .vpm-tab--accent .vpm-tab__icon {
	width: 22px !important;
	height: 22px !important;
}

.vpm-tabbar--erp .vpm-tab--accent .vpm-tab__label {
	color: rgba(255, 255, 255, 0.55) !important;
	font-weight: 700 !important;
	line-height: 11px !important;
	height: 11px !important;
}

.vpm-tabbar--erp {
	grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
	align-items: stretch !important;
	min-height: var(--vpm-tabbar-h) !important;
	padding-inline: 0 !important;
	gap: 0 !important;
}

.vpm-tabbar__lang-wrap {
	position: static;
	display: grid;
	align-items: stretch;
	justify-items: stretch;
}

.vpm-tab--utility .vpm-notify-badge {
	background: #e94f1d;
	color: #fff;
	border: 1px solid #000;
	top: 4px;
}

/* ── Glass center modals (lang, notify) ── */
body.vpm-overlay-lang-open::before,
body.vpm-overlay-notify-open::before {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(13, 17, 23, 0.48);
	z-index: 100000;
}

.vpm-tabbar__lang-popover:not([hidden]) {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	bottom: auto;
	min-width: min(280px, calc(100vw - 32px));
	padding: 16px;
	z-index: 100001;
	background: rgba(255, 255, 255, 0.72);
	-webkit-backdrop-filter: blur(24px) saturate(1.35);
	backdrop-filter: blur(24px) saturate(1.35);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 20px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
	color: #111111;
}

.vpm-tabbar__lang-popover .vpm-form-langs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 0;
}

.vpm-tabbar__lang-popover .vpm-lang-item {
	border-color: rgba(17, 17, 17, 0.15);
	color: #111111;
	background: rgba(255, 255, 255, 0.65);
}

.vpm-tabbar__lang-popover .vpm-lang-item.is-active,
.vpm-tabbar__lang-popover .vpm-lang-item:hover {
	background: #111111;
	color: #ffffff;
	border-color: #111111;
}

#vpm-notify-panel:not([hidden]) {
	position: fixed;
	left: 50% !important;
	top: 50% !important;
	right: auto !important;
	bottom: auto !important;
	transform: translate(-50%, -50%);
	width: min(92vw, 360px) !important;
	max-height: min(70dvh, 420px) !important;
	z-index: 100001;
	border-radius: 20px !important;
	border: 1px solid rgba(255, 255, 255, 0.55) !important;
	background: rgba(255, 255, 255, 0.72) !important;
	-webkit-backdrop-filter: blur(24px) saturate(1.35);
	backdrop-filter: blur(24px) saturate(1.35);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
	color: #111111;
}

.vpm-notify-head,
.vpm-notify-item__title,
.vpm-notify-item__meta {
	color: #111111;
}

/* ── Glass center modals (operations, other) ── */
.vpm-erp-menu__panel,
.vpm-erp-fab-sheet__dialog {
	background: rgba(255, 255, 255, 0.72) !important;
	-webkit-backdrop-filter: blur(24px) saturate(1.35);
	backdrop-filter: blur(24px) saturate(1.35);
	border: 1px solid rgba(255, 255, 255, 0.55) !important;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
	color: #111111;
}

.vpm-erp-menu__head h2,
.vpm-erp-fab-sheet__head h2,
.vpm-erp-fab-section h3,
.vpm-erp-menu__item,
.vpm-erp-fab-sheet .vpm-dash-action-btn__label {
	color: #111111 !important;
}

.vpm-erp-menu__item-icon {
	filter: brightness(0);
	background-color: transparent !important;
}

.vpm-erp-fab-sheet .vpm-dash-action-btn__icon {
	background-color: #111111 !important;
	background-image: none !important;
}

.vpm-erp-fab-sheet [data-quick-action="proforma"] .vpm-dash-action-btn__icon,
.vpm-erp-fab-sheet [data-quick-action="reports"] .vpm-dash-action-btn__icon,
.vpm-erp-fab-sheet [data-quick-action="live"] .vpm-dash-action-btn__icon,
.vpm-erp-fab-sheet [data-quick-action="team-plan"] .vpm-dash-action-btn__icon,
.vpm-erp-fab-sheet [data-quick-action="assign-task"] .vpm-dash-action-btn__icon,
.vpm-erp-fab-sheet [data-quick-action="coaching-note"] .vpm-dash-action-btn__icon {
	background-color: #111111 !important;
}

.vpm-erp-menu__nav {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	justify-content: center;
	margin: 0 auto;
}

.vpm-erp-fab-section .vpm-dash-action-bar {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	justify-content: center;
	margin: 0 auto;
}

@media (min-width: 960px) {
	.vpm-tabbar--mobile {
		display: none;
	}

	#vpm-notify-panel:not([hidden]) {
		left: auto !important;
		right: 24px !important;
		top: auto !important;
		bottom: 24px !important;
		transform: none;
	}

	.vpm-sidebar__nav .vpm-tab__icon {
		background-color: #111111 !important;
		filter: none;
		opacity: 1;
	}

	.vpm-sidebar__nav .vpm-tab--active .vpm-tab__icon,
	.vpm-sidebar__nav .vpm-tab:hover .vpm-tab__icon {
		background-color: var(--vpm-tabbar-active) !important;
	}

	.vpm-sidebar__utilities .vpm-tab__icon {
		background-color: #111111 !important;
		filter: none;
	}
}
