/* —— Mercury auth (Ion Auth login / forgot / reset) —— */
html.mercury-auth {
	--mm-accent: #f973ff;
	--mm-accent-soft: rgba(249, 115, 255, 0.38);
	--mm-surface: #f3f3f5;
	--mm-surface-deep: #e8e8ec;
	--mm-card: #ffffff;
	--mm-ink: #121212;
	--mm-muted: #6b6b75;
	--mm-radius: 0.55rem;
	--mm-radius-sm: 0.4rem;
	--mm-radius-pill: 0.45rem;
}

html.mercury-auth body.bg-login {
	background: var(--mm-surface) !important;
	background-image: none !important;
	color: var(--mm-ink);
}

.section-authentication-signin {
	height: auto !important;
	min-height: 100vh;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: 1.5rem 0;
}

html.mercury-auth .section-authentication-signin .card {
	border: 0;
	border-radius: var(--mm-radius);
	background: var(--mm-card);
	box-shadow: 0 0.45rem 1.4rem rgba(18, 18, 24, 0.08);
}

html.mercury-auth .section-authentication-signin .card-body {
	color: var(--mm-ink);
}

html.mercury-auth .section-authentication-signin h5 {
	font-weight: 700;
	color: var(--mm-ink);
}

html.mercury-auth .section-authentication-signin p {
	color: var(--mm-muted);
}

html.mercury-auth .section-authentication-signin .form-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--mm-ink);
}

html.mercury-auth .section-authentication-signin .form-control {
	border-color: rgba(18, 18, 24, 0.14);
	border-radius: var(--mm-radius-sm);
	color: var(--mm-ink);
	background: #fff;
	min-height: calc(1.5em + 0.85rem + 2px);
}

html.mercury-auth .section-authentication-signin .form-control:focus {
	border-color: #111;
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

html.mercury-auth .section-authentication-signin .input-group-text {
	border-color: rgba(18, 18, 24, 0.14);
	color: var(--mm-muted);
}

html.mercury-auth .section-authentication-signin .form-check-input:checked {
	background-color: #111;
	border-color: #111;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.7em 0.7em;
	box-shadow: none;
}

html.mercury-auth .section-authentication-signin .form-check-input:focus {
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

html.mercury-auth .section-authentication-signin a:not(.btn) {
	color: var(--mm-accent);
	text-decoration: none;
	font-weight: 600;
}

html.mercury-auth .section-authentication-signin a:not(.btn):hover {
	text-decoration: underline;
	color: #e85ff0;
}

/* keep btn-success class (Ion Auth views) — restyle to Mercury black + purple */
html.mercury-auth .section-authentication-signin .btn-success,
html.mercury-auth .section-authentication-signin .btn-primary {
	border: 0;
	border-radius: var(--mm-radius-pill);
	background: #111;
	color: #fff;
	font-weight: 700;
	padding: 0.7rem 1.25rem;
}

html.mercury-auth .section-authentication-signin .btn-success:hover,
html.mercury-auth .section-authentication-signin .btn-success:focus,
html.mercury-auth .section-authentication-signin .btn-primary:hover,
html.mercury-auth .section-authentication-signin .btn-primary:focus {
	background: #000;
	color: #fff;
}

html.mercury-auth .section-authentication-signin .alert-danger {
	--bs-alert-color: #ffb4b4;
	--bs-alert-bg: #3a3a42;
	--bs-alert-border-color: #3a3a42;
	background-color: #3a3a42 !important;
	border-color: #3a3a42 !important;
	color: #ffb4b4 !important;
	border-radius: var(--mm-radius-sm);
}

.auth-brand {
	margin-bottom: 1rem;
}

.auth-brand-logo {
	display: inline-block;
	height: 36px;
	width: auto;
	max-width: 180px;
	vertical-align: middle;
}

html.mercury-auth .auth-brand-logo[src*="logo-main.svg"],
html.mercury-auth .auth-brand-logo[src*="logo-add.svg"] {
	filter: invert(1);
}

/* —— Mercury tokens (shell + content) —— */
html.mercury-admin {
	/* Silvermercury front brand purple (assets/front .button--young / accents) */
	--mm-accent: #f973ff;
	--mm-accent-soft: rgba(249, 115, 255, 0.38);
	--mm-surface: #f3f3f5;
	--mm-surface-deep: #e8e8ec;
	--mm-sidebar: #efeff2;
	--mm-card: #ffffff;
	--mm-ink: #121212;
	--mm-muted: #6b6b75;
	--mm-radius: 0.55rem;
	--mm-radius-sm: 0.4rem;
	--mm-radius-pill: 0.45rem;
	--mm-sidebar-w: 268px;
	--mm-sidebar-collapsed: 72px;
	/* aliases — older Mercury admin names map onto new palette */
	--mm-beige: var(--mm-surface);
	--mm-beige-deep: var(--mm-surface-deep);
	--mm-lime: var(--mm-accent);
	--mm-terra: var(--mm-accent);
}

html.mercury-admin,
html.mercury-admin body {
	height: auto;
	min-height: 100%;
	overflow-x: hidden;
}

html.mercury-admin body {
	background: var(--mm-surface);
	color: var(--mm-ink);
}

/* Dashkote leaves height:100% on page-wrapper — never make shell a second scroller */
html.mercury-admin .wrapper {
	overflow: visible;
	min-height: 100vh;
	height: auto;
}

html.mercury-admin .page-wrapper {
	background: var(--mm-surface);
	margin-top: 0 !important;
	margin-left: var(--mm-sidebar-w);
	margin-bottom: 0 !important;
	height: auto !important;
	min-height: 100vh;
	min-width: 0;
	max-width: 100%;
	overflow-x: hidden !important;
	overflow-y: visible !important;
}

html.mercury-admin .page-content {
	background: transparent;
	padding: 1.75rem 1.85rem 2.5rem;
	min-width: 0;
	max-width: 100%;
	overflow-x: hidden !important;
	overflow-y: visible !important;
	min-height: 0;
}

html.mercury-admin .page-footer {
	display: none;
}

/* —— sidebar shell —— */
html.mercury-admin .sidebar-wrapper.admin-sidebar {
	width: var(--mm-sidebar-w);
	display: flex;
	flex-direction: column;
	background: var(--mm-sidebar);
	border-right: 1px solid rgba(30, 24, 16, 0.08);
	box-shadow: none !important;
	overflow: hidden;
}

html.mercury-admin .sidebar-wrapper .sidebar-header {
	width: var(--mm-sidebar-w);
	height: 64px;
	position: relative;
	flex: 0 0 auto;
	background: transparent;
	border-bottom: 1px solid rgba(30, 24, 16, 0.08);
	padding: 0 1rem;
}

/* stock logos are white (for dark Dashkote); invert on light gray shell */
html.mercury-admin .sidebar-wrapper .sidebar-header img,
html.mercury-admin .admin-mobile-brand img {
	filter: invert(1);
}

html.mercury-admin .sidebar-wrapper .sidebar-header .logo-text {
	color: var(--mm-ink);
}

html.mercury-admin .sidebar-wrapper .sidebar-header .toggle-icon {
	color: var(--mm-ink);
	opacity: 0.7;
	transition: opacity 0.15s ease, color 0.15s ease;
}

html.mercury-admin .sidebar-wrapper .sidebar-header .toggle-icon:hover {
	opacity: 1;
	color: #000;
}

html.mercury-admin .sidebar-wrapper .sidebar-nav {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	padding: 0.65rem 0.55rem 0.35rem;
}

/* Dashkote left a 60px metismenu offset for fixed sidebar-header — drop it */
html.mercury-admin .sidebar-wrapper .metismenu {
	margin-top: 0;
	padding: 0;
}

html.mercury-admin .sidebar-wrapper .metismenu {
	padding: 0;
}

html.mercury-admin .sidebar-wrapper .metismenu a {
	color: var(--mm-ink);
	border-radius: 0.75rem;
	margin: 0.1rem 0;
	padding: 0.55rem 0.75rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: background 0.14s ease, color 0.14s ease;
}

html.mercury-admin .sidebar-wrapper .metismenu a.has-arrow {
	padding-right: 2.15rem;
	position: relative;
}

html.mercury-admin .sidebar-wrapper .metismenu a.has-arrow .menu-title {
	padding-right: 0.25rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

html.mercury-admin .sidebar-wrapper .metismenu a .parent-icon {
	font-size: 1.15rem;
	line-height: 1;
	width: 1.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--mm-muted);
}

html.mercury-admin .sidebar-wrapper .metismenu a:hover,
html.mercury-admin .sidebar-wrapper .metismenu a:focus {
	color: var(--mm-ink);
	background: rgba(30, 24, 16, 0.06);
	text-decoration: none;
}

html.mercury-admin .sidebar-wrapper .metismenu a:hover .parent-icon,
html.mercury-admin .sidebar-wrapper .metismenu a:focus .parent-icon {
	color: var(--mm-ink);
}

/* Top-level active only — nested mm-active stays black (not white-on-gray). */
html.mercury-admin .sidebar-wrapper .metismenu > li.mm-active > a,
html.mercury-admin .sidebar-wrapper .metismenu > li > a:active {
	color: #fff;
	background: #111;
	text-decoration: none;
	box-shadow: inset 3px 0 0 var(--mm-accent);
}

html.mercury-admin .sidebar-wrapper .metismenu > li.mm-active > a .parent-icon,
html.mercury-admin .sidebar-wrapper .metismenu > li > a:active .parent-icon {
	color: #fff;
}

html.mercury-admin .sidebar-wrapper .metismenu ul {
	background: transparent;
	border: 0;
	padding: 0.15rem 0 0.35rem 0.35rem;
}

html.mercury-admin .sidebar-wrapper .metismenu ul a {
	padding: 0.4rem 0.75rem 0.4rem 2.1rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #000 !important;
	border-radius: 0.6rem;
}

html.mercury-admin .sidebar-wrapper .metismenu ul a i {
	margin-right: 0.35rem;
	color: #000 !important;
}

html.mercury-admin .sidebar-wrapper .metismenu ul .mm-active > a,
html.mercury-admin .sidebar-wrapper .metismenu ul a:hover,
html.mercury-admin .sidebar-wrapper .metismenu ul a:focus {
	color: #000 !important;
	background: rgba(30, 24, 16, 0.07);
	box-shadow: inset 3px 0 0 var(--mm-accent);
}

html.mercury-admin .sidebar-wrapper .metismenu ul .mm-active > a i,
html.mercury-admin .sidebar-wrapper .metismenu ul a:hover i,
html.mercury-admin .sidebar-wrapper .metismenu ul a:focus i {
	color: #000 !important;
}

html.mercury-admin .sidebar-wrapper .metismenu .has-arrow:after {
	border-color: var(--mm-muted);
	right: 0.85rem !important;
	top: 50% !important;
	transform: rotate(-45deg) translateY(-50%) !important;
	transform-origin: top;
	width: 0.45rem;
	height: 0.45rem;
	transition: transform 0.3s ease-out, border-color 0.14s ease;
}

/* Closed: chevron down (−45°). Open: chevron up (−135°). */
html.mercury-admin .sidebar-wrapper .metismenu .has-arrow[aria-expanded="true"]:after {
	transform: rotate(-135deg) translateY(-50%) !important;
}

html.mercury-admin .sidebar-wrapper .metismenu > li.mm-active > a.has-arrow:after {
	border-color: #fff;
}

/* —— sidebar user (au3-editor-like bottom card) —— */
html.mercury-admin .admin-sidebar-user {
	flex: 0 0 auto;
	padding: 0.65rem 0.7rem 0.85rem;
	border-top: 1px solid rgba(30, 24, 16, 0.08);
	background: linear-gradient(180deg, transparent, rgba(30, 24, 16, 0.03));
}

html.mercury-admin .admin-sidebar-user-card {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0.7rem 0.75rem;
	border-radius: 0.9rem;
	background: var(--mm-card);
	border: 1px solid rgba(30, 24, 16, 0.08);
	box-shadow: 0 0.2rem 0.6rem rgba(30, 24, 16, 0.05);
}

html.mercury-admin .admin-sidebar-user-card {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"avatar meta"
		"logout logout";
	align-items: center;
	column-gap: 0.65rem;
	row-gap: 0.55rem;
}

html.mercury-admin .admin-sidebar-user-avatar {
	grid-area: avatar;
	width: 2.35rem;
	height: 2.35rem;
	border-radius: 0.7rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #111;
	color: #fff;
	font-weight: 800;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
}

html.mercury-admin .admin-sidebar-user-meta {
	grid-area: meta;
	min-width: 0;
}

html.mercury-admin .admin-sidebar-user-name {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--mm-ink);
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

html.mercury-admin .admin-sidebar-user-email {
	font-size: 0.72rem;
	color: var(--mm-muted);
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

html.mercury-admin .admin-sidebar-user-tenant {
	font-size: 0.68rem;
	color: var(--mm-muted);
	margin-top: 0.12rem;
	line-height: 1.3;
}

html.mercury-admin .admin-sidebar-user-logout {
	grid-area: logout;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.4rem 0.65rem;
	border-radius: var(--mm-radius-pill);
	background: var(--mm-surface);
	color: var(--mm-ink);
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid rgba(30, 24, 16, 0.08);
	transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

html.mercury-admin .admin-sidebar-user-logout:hover {
	background: #111;
	border-color: #111;
	color: #fff;
}

html.mercury-admin .admin-sidebar-user-logout i {
	font-size: 1rem;
	line-height: 1;
}

/* collapsed rail */
@media screen and (min-width: 1025px) {
	html.mercury-admin .wrapper.toggled .page-wrapper {
		margin-left: var(--mm-sidebar-collapsed);
	}

	html.mercury-admin .wrapper.toggled:not(.sidebar-hovered) .sidebar-wrapper.admin-sidebar,
	html.mercury-admin .wrapper.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-header {
		width: var(--mm-sidebar-collapsed);
	}

	html.mercury-admin .wrapper.toggled:not(.sidebar-hovered) .admin-sidebar-user-meta,
	html.mercury-admin .wrapper.toggled:not(.sidebar-hovered) .admin-sidebar-user-logout span {
		display: none;
	}

	html.mercury-admin .wrapper.toggled:not(.sidebar-hovered) .admin-sidebar-user-card {
		grid-template-columns: 1fr;
		grid-template-areas:
			"avatar"
			"logout";
		justify-items: center;
		padding: 0.55rem 0.4rem;
	}

	html.mercury-admin .wrapper.toggled:not(.sidebar-hovered) .admin-sidebar-user-logout {
		width: 2.35rem;
		height: 2.35rem;
		padding: 0;
		border-radius: 0.7rem;
	}
}

/* —— mobile top strip (hamburger only; desktop hidden) —— */
html.mercury-admin .admin-mobile-bar {
	display: contents;
}

html.mercury-admin .admin-mobile-bar .topbar {
	display: none !important;
}

html.mercury-admin .admin-mobile-bar .mobile-toggle-menu {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border: 0;
	border-radius: 0.65rem;
	background: transparent;
	color: var(--mm-ink);
	font-size: 1.45rem;
	padding: 0;
	cursor: pointer;
}

html.mercury-admin .admin-mobile-brand img {
	height: 28px;
	width: auto;
}

@media screen and (max-width: 1024px) {
	html.mercury-admin .admin-mobile-bar {
		display: block;
	}

	html.mercury-admin .admin-mobile-bar .topbar {
		display: flex !important;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		height: 56px;
		background: var(--mm-sidebar);
		border-bottom: 1px solid rgba(30, 24, 16, 0.08);
		box-shadow: none !important;
		z-index: 12;
	}

	html.mercury-admin .admin-mobile-bar .topbar .navbar {
		height: 56px;
		padding-left: 0.75rem;
		padding-right: 0.75rem;
		width: 100%;
	}

	html.mercury-admin .page-wrapper {
		margin-top: 56px !important;
		margin-left: 0;
	}

	html.mercury-admin .page-content {
		padding: 1.1rem 0.9rem 2rem;
	}
}

/* —— dashboard shortcut tiles —— */
.page-content .admin-dash-grid {
	--bs-gutter-y: 0.85rem;
}

.page-content a.admin-dash-tile {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	min-height: 5.25rem;
	height: 100%;
	padding: 1rem 1.05rem;
	border-radius: var(--mm-radius, 1rem);
	background: var(--mm-card, #fff);
	border: 1px solid rgba(30, 24, 16, 0.08);
	box-shadow: 0 0.25rem 0.85rem rgba(30, 24, 16, 0.05);
	color: var(--mm-ink, #121212);
	text-decoration: none;
	transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.page-content a.admin-dash-tile:hover,
.page-content a.admin-dash-tile:focus {
	transform: translateY(-2px);
	border-color: rgba(30, 24, 16, 0.18);
	box-shadow: 0 0.55rem 1.35rem rgba(30, 24, 16, 0.1);
	background: #111;
	color: #fff;
	outline: 0;
}

.page-content .admin-dash-tile-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.65rem;
	height: 2.65rem;
	border-radius: 0.8rem;
	background: #111;
	color: #fff;
	font-size: 1.25rem;
	line-height: 1;
	transition: background 0.14s ease, color 0.14s ease;
}

.page-content a.admin-dash-tile:hover .admin-dash-tile-icon,
.page-content a.admin-dash-tile:focus .admin-dash-tile-icon {
	background: #fff;
	color: #111;
}

.page-content .admin-dash-tile-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.page-content .admin-dash-tile-title {
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.01em;
}

.page-content .admin-dash-tile-meta {
	font-size: 0.72rem;
	font-weight: 500;
	color: var(--mm-muted, #6b6560);
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.page-content a.admin-dash-tile:hover .admin-dash-tile-meta,
.page-content a.admin-dash-tile:focus .admin-dash-tile-meta {
	color: rgba(255, 255, 255, 0.65);
}

.page-content .admin-dash-tile-arrow {
	flex: 0 0 auto;
	opacity: 0.35;
	font-size: 1.25rem;
	line-height: 1;
	transition: opacity 0.14s ease, transform 0.14s ease, color 0.14s ease;
}

.page-content a.admin-dash-tile:hover .admin-dash-tile-arrow,
.page-content a.admin-dash-tile:focus .admin-dash-tile-arrow {
	opacity: 1;
	color: #fff;
	transform: translateX(2px);
}

/* fallback tokens when markup lacks mercury-admin (legacy) */
.page-wrapper {
	--mm-accent: #f973ff;
	--mm-accent-soft: rgba(249, 115, 255, 0.38);
	--mm-surface: #f3f3f5;
	--mm-surface-deep: #e8e8ec;
	--mm-sidebar: #efeff2;
	--mm-card: #ffffff;
	--mm-ink: #121212;
	--mm-muted: #6b6b75;
	--mm-radius: 0.55rem;
	--mm-radius-sm: 0.4rem;
	--mm-radius-pill: 0.45rem;
	--mm-beige: var(--mm-surface);
	--mm-beige-deep: var(--mm-surface-deep);
	--mm-lime: var(--mm-accent);
	--mm-terra: var(--mm-accent);
	background: var(--mm-surface);
}

.page-content {
	background: transparent;
}

/* —— page chrome —— */
.page-content .page-breadcrumb {
	gap: 0.5rem;
}

.page-content .breadcrumb-title {
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--mm-ink);
	font-size: 1.15rem;
}

.page-content .breadcrumb-item a:not(.btn) {
	color: var(--mm-ink);
	text-decoration: none;
}

.page-content .breadcrumb-item a:not(.btn):hover {
	color: var(--mm-accent);
	text-decoration: underline;
}

.page-content .ms-auto .btn + .btn,
.page-content .ms-auto .admin-inline-form + .btn,
.page-content .ms-auto .btn + .admin-inline-form {
	margin-left: 0;
}

.page-content .card {
	background: var(--mm-card);
	border: 1px solid rgba(30, 24, 16, 0.1);
	border-radius: var(--mm-radius);
	box-shadow: none;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}

.page-content .card > .card-body {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}

.page-content .card-header {
	background: transparent;
	border-bottom: 1px solid rgba(30, 24, 16, 0.06);
	border-radius: var(--mm-radius) var(--mm-radius) 0 0;
	font-weight: 600;
}

.page-content .card-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--mm-ink);
}

.page-content .admin-form-card .card-body {
	padding: 1.35rem 1.5rem 1.5rem;
}

.page-content h6.text-uppercase {
	letter-spacing: 0.04em;
	color: var(--mm-muted);
}

/* —— forms / buttons —— */
.page-content .form-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--mm-ink);
	margin-bottom: 0.4rem;
}

.page-content .form-control,
.page-content .form-select {
	border-color: rgba(30, 24, 16, 0.14);
	border-radius: var(--mm-radius-sm);
	font-size: 0.9rem;
	min-height: calc(1.5em + 0.85rem + 2px);
	background: #fff;
	color: var(--mm-ink);
}

.page-content .form-control:focus,
.page-content .form-select:focus {
	border-color: #111;
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

.page-content .form-control-sm,
.page-content .form-select-sm {
	min-height: calc(1.5em + 0.5rem + 2px);
	font-size: 0.8125rem;
	border-radius: 0.5rem;
}

.page-content textarea.form-control {
	min-height: 6.5rem;
}

.page-content .form-check-input {
	border-radius: 0.3rem;
	border-color: rgba(30, 24, 16, 0.25);
	width: 1.1em;
	height: 1.1em;
	background-color: #fff;
}

.page-content .form-check-input:checked {
	background-color: #111;
	border-color: #111;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.7em 0.7em;
	box-shadow: none;
}

.page-content .form-check-input:focus {
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

.page-content .form-check-label {
	color: var(--mm-ink);
	font-size: 0.875rem;
}

.page-content .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2;
	vertical-align: middle;
}

.page-content .btn-sm {
	padding: 0.42rem 0.85rem;
	font-size: 0.8125rem;
	border-radius: var(--mm-radius-pill);
	min-height: 2.125rem;
}

/* «назад» keeps btn-warning class (SM habit / tests) — accent fill, white text */
.page-content .btn-warning {
	background: var(--mm-accent);
	border-color: var(--mm-accent);
	color: #fff !important;
}

.page-content .btn-warning:hover,
.page-content .btn-warning:focus {
	background: #e85ff0;
	border-color: #e85ff0;
	color: #fff !important;
}

.page-content .btn-outline-primary {
	border-color: rgba(18, 18, 24, 0.28);
	color: var(--mm-ink);
	border-radius: var(--mm-radius-pill);
}

.page-content .btn-outline-primary:hover {
	background: #111;
	border-color: #111;
	color: #fff;
}

.page-content .btn-primary {
	border-radius: var(--mm-radius-pill);
	background: #111;
	border-color: #111;
	color: #fff;
}

.page-content .btn-primary:hover {
	background: #000;
	border-color: #000;
	color: #fff;
}

/* neutralize Bootstrap green/blue button accents */
.page-content .btn-success {
	border-radius: var(--mm-radius-pill);
	background: #111;
	border-color: #111;
	color: #fff;
}

.page-content .btn-success:hover {
	background: #000;
	border-color: #000;
	color: #fff;
}

.page-content .btn-info {
	border-radius: var(--mm-radius-pill);
	background: var(--mm-accent);
	border-color: var(--mm-accent);
	color: #111;
}

.page-content .btn-info:hover {
	background: #e85ff0;
	border-color: #e85ff0;
	color: #111;
}

.page-content .btn-danger {
	border-radius: var(--mm-radius-pill);
	background: #3a3a42;
	border-color: #3a3a42;
	color: #fff;
}

.page-content .btn-danger:hover {
	background: #2a2a30;
	border-color: #2a2a30;
	color: #ffb4b4;
}

.page-content .btn-outline-danger {
	border-radius: var(--mm-radius-pill);
	border-color: rgba(18, 18, 24, 0.35);
	color: var(--mm-ink);
}

.page-content .btn-outline-danger:hover {
	background: #3a3a42;
	border-color: #3a3a42;
	color: #fff;
}

.page-content .btn-mercury {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.7rem 1.45rem;
	border: 0;
	border-radius: var(--mm-radius-pill);
	background: #111;
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	line-height: 1.2;
	text-decoration: none;
	transition: transform 0.12s ease, background 0.12s ease;
}

.page-content .btn-mercury:hover,
.page-content .btn-mercury:focus {
	background: #000;
	color: #fff;
	transform: translateY(-1px);
}

.page-content .admin-section-heading {
	display: block;
	margin-bottom: 1.15rem;
}

.page-content .admin-section-badge {
	display: none !important;
}

.page-content .admin-section-title {
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--mm-ink);
}

/* Project / application show field text — wrap, never scroll inside the card */
.page-content .admin-form-card pre,
.page-content .admin-form-card .admin-field-text,
.page-content .app-view pre,
.page-content .app-view dd {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	word-break: break-word;
	overflow: visible;
	max-height: none;
	margin: 0 0 1rem;
	padding: 0;
	background: transparent;
	border: 0;
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--mm-ink);
}

.page-content .admin-form-actions {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(30, 24, 16, 0.06);
}

.page-content .admin-form-meta {
	color: var(--mm-muted);
	font-size: 0.8125rem;
}

.page-content a.admin-link-accent {
	color: var(--mm-ink);
	text-decoration: none;
	font-weight: 600;
}

.page-content a.admin-link-accent:hover {
	color: var(--mm-accent);
	text-decoration: underline;
}

.page-content .admin-check-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 0.35rem 1rem;
	max-height: 16rem;
	overflow: auto;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(30, 24, 16, 0.08);
	border-radius: var(--mm-radius-sm);
	background: var(--mm-surface);
}

.page-content .app-view dl {
	margin-bottom: 0.85rem;
}

.page-content .app-view dt {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--mm-muted);
	margin-bottom: 0.2rem;
}

.page-content .app-view dd {
	margin-bottom: 0;
	color: var(--mm-ink);
	font-size: 0.95rem;
}

.page-content .table thead th,
.page-content table.table thead th {
	font-size: 0.72rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--mm-muted);
	border-bottom-color: rgba(30, 24, 16, 0.08);
	background: var(--mm-surface-deep) !important;
	font-weight: 700;
	white-space: nowrap;
}

.page-content .table > :not(caption) > * > * {
	padding: 0.85rem 0.75rem;
}

.page-content table.table.table-hover > tbody > tr:hover > * {
	--bs-table-accent-bg: rgba(249, 115, 255, 0.12);
}

.page-content table.table.table-striped > tbody > tr:nth-of-type(odd) > * {
	--bs-table-accent-bg: rgba(30, 24, 16, 0.025);
}

/* —— jury list status (stage 1 / affiliated) —— */
.page-content .jury-status {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	line-height: 1.2;
	font-size: 0.875rem;
	vertical-align: middle;
}

.page-content .jury-status i {
	font-size: 1rem;
	line-height: 1;
}

/* —— jury score pills (stage 1 / level 2) —— */
.page-content .jury-score-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1.1rem;
	font-size: 0.78rem;
	color: var(--mm-muted);
}

.page-content .jury-score-legend span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.page-content .jury-dot {
	display: inline-block;
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
}

/* score legend: grayscale + purple peak (no rainbow metals) */
.page-content .jury-dot-long { background: #c5c5cc; }
.page-content .jury-dot-short { background: #9a9aa3; }
.page-content .jury-dot-bronze { background: #6e6e78; }
.page-content .jury-dot-silver { background: #3f3f48; }
.page-content .jury-dot-gold { background: var(--mm-accent); }

.page-content .jury-score-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.page-content .jury-score-pill {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.page-content .jury-score-pill input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.page-content .jury-score-pill span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.45rem;
	height: 2.45rem;
	border-radius: 0.55rem;
	border: 1px solid rgba(30, 24, 16, 0.16);
	background: #fff;
	color: var(--mm-ink);
	font-weight: 700;
	font-size: 0.9rem;
	transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.page-content .jury-score-pill:hover span {
	border-color: #111;
}

.page-content .jury-score-pill input:checked + span {
	background: #111;
	border-color: #111;
	color: #fff;
	transform: translateY(-1px);
}

.page-content .jury-score-pill input:focus-visible + span {
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

.page-content .jury-mark-pills .jury-score-pill span {
	width: auto;
	min-width: 8.5rem;
	height: 2.75rem;
	padding: 0 1.1rem;
}

.page-content .project-apply .apply-dates {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
	margin-bottom: 1rem;
}

.page-content .project-apply .apply-dates > label {
	margin: 0;
}

.page-content .project-apply .apply-dates .form-check {
	margin: 0;
}

.page-content .project-apply .project-date {
	flex: 0 1 12rem;
	width: 12rem;
	min-width: 11rem;
	max-width: 14rem;
}

.page-content .project-apply .datepicker {
	padding-left: 0.45rem;
	padding-right: 0.45rem;
}

.page-content .project-apply .apply-budget,
.page-content .project-apply .apply-place,
.page-content .project-apply .apply-people {
	display: grid;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin-bottom: 1rem;
}

.page-content .project-apply .apply-choices {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
}

.page-content .project-apply .apply-choices--inline {
	flex-direction: row;
	flex-wrap: wrap;
	column-gap: 1.25rem;
}

.page-content .project-apply .apply-choices .form-check {
	margin: 0;
}

.page-content .project-apply .apply-budget {
	grid-template-columns: minmax(11rem, 1.15fr) minmax(12rem, 1fr);
}

.page-content .project-apply .apply-budget-hint {
	font-size: 0.875rem;
	line-height: 1.35;
	color: #6c757d;
}

.page-content .project-apply .apply-place {
	grid-template-columns: auto minmax(11rem, 1fr) auto minmax(11rem, 1fr);
}

.page-content .project-apply .apply-place > label {
	margin: 0;
	white-space: nowrap;
}

.page-content .project-apply .apply-people {
	grid-template-columns: minmax(7.25rem, 1.45fr) minmax(5.75rem, 1fr) minmax(5.5rem, 0.95fr) minmax(6.5rem, 1.15fr) minmax(9rem, 1.7fr);
	gap: 0.5rem;
	width: 100%;
	min-width: 0;
	margin-bottom: 0.75rem;
}

.page-content .project-apply .apply-person {
	grid-template-columns: minmax(7.25rem, 1.45fr) minmax(5.75rem, 1fr) minmax(5.5rem, 0.95fr) minmax(6.5rem, 1.15fr) minmax(8.5rem, 1.55fr) auto;
}

.page-content .project-apply .apply-tg {
	min-width: 0;
}

.page-content .project-apply .apply-tg .form-control {
	min-width: 0;
}

.page-content .project-apply .js-remove-person {
	width: 2.25rem;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	line-height: 1;
}

.page-content .project-apply .apply-file {
	width: min(100%, 28rem);
	min-width: min(100%, 16rem);
}

.page-content .project-apply .select2-container {
	width: 100% !important;
	max-width: 100%;
}

@media (max-width: 720px) {
	.page-content .project-apply .apply-budget,
	.page-content .project-apply .apply-place,
	.page-content .project-apply .apply-people,
	.page-content .project-apply .apply-person {
		grid-template-columns: 1fr;
	}
}

.project-view label {
	font-weight: 600;
	margin-bottom: 0.2rem;
}

.project-view .col-12 {
	line-height: 1.5;
}

html.mercury-admin .page-content .admin-project-media-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem;
}

html.mercury-admin .page-content .admin-project-media-thumb {
	display: block;
	overflow: hidden;
	border-radius: 0.65rem;
	border: 1px solid rgba(30, 24, 16, 0.1);
	background: #f6f3ee;
	aspect-ratio: 1 / 1;
}

html.mercury-admin .page-content .admin-project-media-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

html.mercury-admin .page-content .admin-project-media-embed {
	overflow: hidden;
	border-radius: 0.65rem;
	border: 1px solid rgba(30, 24, 16, 0.1);
	background: #111;
}

html.mercury-admin .page-content .admin-project-media-embed iframe {
	border: 0;
}

.project-status {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 1.25rem;
}

.project-status span {
	display: inline-flex;
	align-items: center;
	padding: 0.28rem 0.7rem;
	border-radius: 999px;
	background: #f6f3ee;
	border: 1px solid rgba(30, 24, 16, 0.1);
	font-size: 0.82rem;
}

.admin-inline-form .form-control {
	min-width: 12rem;
	width: auto;
	height: 2.125rem;
	min-height: 2.125rem;
	padding-top: 0.3rem;
	padding-bottom: 0.3rem;
	line-height: 1.25;
}

.admin-inline-form .btn {
	height: 2.125rem;
	min-height: 2.125rem;
	padding-top: 0;
	padding-bottom: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.admin-filter-bar > div {
	flex: 1 1 18rem;
	min-width: 16rem;
	max-width: 32rem;
}

.admin-filter-bar .form-select,
.admin-filter-bar .form-control,
.admin-filter-bar .select2-container {
	min-width: 16rem;
	width: 100% !important;
}

/* Filter row: same control height (select2 was taller than search) */
.admin-filter-bar .form-control,
.admin-filter-bar .form-control-sm,
.admin-filter-bar .form-select,
.admin-filter-bar .form-select-sm {
	height: 2.375rem;
	min-height: 2.375rem;
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
	line-height: 1.25;
	font-size: 0.875rem;
	border-radius: 0.35rem;
}

.admin-filter-bar .select2-container .select2-selection--single {
	height: 2.375rem !important;
	min-height: 2.375rem !important;
	display: flex !important;
	align-items: center !important;
	padding: 0 !important;
}

.admin-filter-bar .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 1.25 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 0.75rem !important;
	padding-right: 1.75rem !important;
	display: block;
	width: 100%;
}

.admin-filter-bar .select2-container .select2-selection--single .select2-selection__arrow {
	height: 2.375rem !important;
	top: 0 !important;
}

.admin-filter-bar > .btn,
.admin-filter-bar > button.btn {
	height: 2.375rem;
	min-height: 2.375rem;
	padding-top: 0;
	padding-bottom: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.page-content .nav-pills .nav-link {
	font-size: 0.875rem;
	padding: 0.4rem 0.85rem;
}

.page-content .nav-pills .nav-link.active {
	font-weight: 600;
}

/* —— tables —— */
.page-content table.table {
	font-size: 14px;
}

.page-content table.table > :not(caption) > * > * {
	padding: 0.45rem 0.7rem;
	vertical-align: middle;
}

.page-content table.table {
	border-color: rgba(30, 24, 16, 0.06);
}

div.dataTables_wrapper,
div.dt-container {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

/* scroll only the table, not the search/paging chrome */
div.dt-container div.dt-scroll,
div.dt-container div.dt-scroll-body,
div.dataTables_wrapper div.dataTables_scroll,
div.dataTables_wrapper div.dataTables_scrollBody {
	max-width: 100%;
}

div.dataTables_wrapper .row,
div.dt-container .row {
	--bs-gutter-x: 0;
	margin-left: 0;
	margin-right: 0;
}

div.dt-container .dt-layout-row {
	margin: 0 0 0.5rem;
}

div.dt-container .dt-search input,
div.dataTables_wrapper div.dataTables_filter input {
	display: inline-block;
	width: auto;
	min-width: 12rem;
	margin-left: 0.35rem;
	border: 1px solid rgba(30, 24, 16, 0.14);
	border-radius: 0.65rem;
	padding: 0.35rem 0.75rem;
	font-size: 0.875rem;
	background: #fff;
	color: var(--mm-ink, #121212);
}

div.dt-container .dt-search input:focus,
div.dataTables_wrapper div.dataTables_filter input:focus {
	outline: 0;
	border-color: #111;
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

div.dt-container .dt-length select,
div.dataTables_wrapper div.dataTables_length select {
	border: 1px solid rgba(30, 24, 16, 0.14);
	border-radius: 0.65rem;
	padding: 0.28rem 1.75rem 0.28rem 0.55rem;
	font-size: 0.875rem;
	display: inline-block;
	width: auto;
	background: #fff;
}

div.dt-container .dt-info,
div.dt-container .dt-paging,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate {
	padding-top: 0.5rem;
	font-size: 0.8125rem;
}

div.dt-container .pagination {
	margin-bottom: 0;
}

div.dataTables_wrapper div.dataTables_filter {
	text-align: right;
	padding: 0 0 0.75rem;
}

div.dataTables_wrapper div.dataTables_filter label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-weight: 400;
}

table.dataTable {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.page-content .table-responsive {
	overflow-x: auto;
	max-width: 100%;
	min-width: 0;
}

.page-content table.table.dataTable,
.page-content table.table.datatable {
	table-layout: auto;
	width: 100% !important;
	min-width: 100%;
}

.page-content table.table col.admin-col-id {
	width: 1%;
	white-space: nowrap;
}

.page-content table.table col.admin-col-actions {
	width: 1%;
	white-space: nowrap;
}

/* default: columns size to content; opt-in truncate with .admin-cell-ellipsis */
.page-content table.table td:not(.table-actions):not(.no-wrap-cell) {
	overflow: visible;
	text-overflow: clip;
	white-space: nowrap;
}

.page-content table.table td.admin-cell-ellipsis,
.page-content table.table td.admin-cell-ellipsis * {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 18rem;
}

.page-content table.table td.text-muted,
.page-content table.table .admin-empty {
	color: #adb5bd !important;
}

.table-actions,
td.table-actions,
td.text-nowrap {
	white-space: nowrap !important;
	overflow: visible !important;
	text-overflow: clip;
	width: 1%;
	text-align: left;
}

/* contest / projects: SM federal density */
.page-content table.admin-contest-table > :not(caption) > * > * {
	padding: 0.28rem 0.55rem;
}

.page-content table.admin-contest-table td a {
	color: var(--mm-ink) !important;
	text-decoration: none;
	font-weight: 600;
}

.page-content table.admin-contest-table td a:hover {
	color: var(--mm-accent) !important;
	text-decoration: underline;
}

.page-content table.admin-contest-table td .text-muted,
.page-content table.admin-contest-table td .text-muted a {
	color: var(--mm-muted) !important;
	font-weight: 500;
}

.page-content table.admin-contest-table td .text-muted a:hover {
	color: var(--mm-accent) !important;
}

.page-content table.admin-contest-table td.admin-contest-project {
	white-space: normal !important;
	overflow: visible !important;
}

.page-content table.admin-contest-table .form-check-input {
	margin-top: 0;
}

.table-action-form,
form.d-inline,
form.table-action-form {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 1px;
	padding: 0;
	vertical-align: middle;
}

.table-action,
td.text-nowrap > a,
td.table-actions > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	margin: 0 1px;
	padding: 0;
	line-height: 1;
	vertical-align: middle;
	text-decoration: none !important;
	border-radius: 0.25rem;
	transition: background-color 0.12s ease;
}

.table-action:hover,
td.table-actions > a:hover,
td.text-nowrap > a:hover {
	background: rgba(30, 24, 16, 0.07);
}

.table-action,
td.table-actions > a,
td.text-nowrap > a {
	border-radius: 0.45rem;
}

.table-action.btn-link {
	box-shadow: none;
	background: transparent;
}

.table-action i,
td.text-nowrap i.bx,
td.table-actions i.bx {
	display: block;
	font-size: 18px;
	line-height: 1;
	width: 18px;
	height: 18px;
}

/* text action (pin) next to icons */
.table-actions .btn-link.table-action-text {
	width: auto;
	height: auto;
	padding: 0 0.35rem;
	font-size: 0.75rem;
	line-height: 1.75rem;
	text-decoration: none !important;
}

/* jury assign progress */
.page-content .admin-jury-progress {
	height: 0.45rem;
	min-width: 3.5rem;
	max-width: 5rem;
	background: var(--mm-surface-deep);
	border-radius: 0.25rem;
}

.page-content .admin-jury-progress .progress-bar {
	border-radius: 0.25rem;
}

/* partner / gallery tiles */
/* partners / gallery tiles — same surface language as dashboard cards */
.page-content .admin-tile-grid {
	--bs-gutter-y: 0.85rem;
}

.page-content .admin-tile {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0.85rem;
	border-radius: var(--mm-radius, 1rem);
	background: var(--mm-card, #fff);
	border: 1px solid rgba(30, 24, 16, 0.08);
	box-shadow: 0 0.25rem 0.85rem rgba(30, 24, 16, 0.05);
	color: var(--mm-ink, #121212);
	transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.page-content .admin-tile:hover {
	transform: translateY(-2px);
	border-color: rgba(30, 24, 16, 0.18);
	box-shadow: 0 0.55rem 1.35rem rgba(30, 24, 16, 0.1);
}

.page-content .admin-tile-media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	margin-bottom: 0.75rem;
	border-radius: 0.8rem;
	background: var(--mm-surface-deep);
	overflow: hidden;
	border: 1px solid rgba(30, 24, 16, 0.06);
}

.page-content .admin-tile-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 0.65rem;
}

.page-content .admin-tile-media-empty {
	background: #111;
}

.page-content .admin-tile-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.65rem;
	height: 2.65rem;
	border-radius: 0.8rem;
	background: var(--mm-accent);
	color: #111;
	font-size: 1.25rem;
	line-height: 1;
}

.page-content .admin-tile-body {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	flex: 1 1 auto;
	min-width: 0;
}

.page-content .admin-tile-title {
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.01em;
	color: var(--mm-ink, #121212);
}

.page-content .admin-tile-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.55rem;
	border-top: 1px solid rgba(30, 24, 16, 0.06);
}

.page-content .admin-tile-check .form-check-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--mm-muted, #6b6560);
}

.page-content .page-breadcrumb {
	margin-bottom: 1.15rem;
	padding-bottom: 0.35rem;
}

.page-content .card {
	box-shadow: none;
}

html.mercury-admin .back-to-top {
	background: #111;
	color: #fff;
	border-radius: 0.45rem;
}

.modal table#results {
    max-height: 600px;
    display: block;
    overflow: auto;
    max-width: 100%;
    position: relative;
}

.modal #results thead {
    transform: translateZ(0);
    background: #fff;
}

.modal #results thead th {
    background: #fff;
    -webkit-box-shadow: inset 0px -1px 0px 0px #666;
    -moz-box-shadow: inset 0px -1px 0px 0px #666;
    box-shadow: inset 0px -1px 0px 0px #666;
}

.modal #results tbody th {
    transform: translateZ(0);
    background: #fff;
    -webkit-box-shadow: inset -1px 0px 0px 0px #666;
    -moz-box-shadow: inset -1px 0px 0px 0px #666;
    box-shadow: inset -1px 0px 0px 0px #666;
}


/* —— strip Bootstrap / Dashkote accents (except table action icons) —— */

/* Dashkote chrome blues outside page-content */
html.mercury-admin .toggle-icon,
html.mercury-admin .sidebar-wrapper .metismenu a:hover,
html.mercury-admin .sidebar-wrapper .metismenu a:focus {
	color: var(--mm-ink);
}

html.mercury-admin .sidebar-wrapper .metismenu > li.mm-active > a,
html.mercury-admin .sidebar-wrapper .metismenu > li > a:active {
	color: #fff;
	background: #111;
	box-shadow: inset 3px 0 0 var(--mm-accent);
}

html.mercury-admin .back-to-top {
	background: #111 !important;
	color: #fff !important;
}

html.mercury-admin .page-content a:not(.btn):not(.table-action):not(.nav-link):not(.page-link):not(.dropdown-item) {
	color: var(--mm-ink);
}

html.mercury-admin .page-content a:not(.btn):not(.table-action):not(.nav-link):not(.page-link):not(.dropdown-item):hover {
	color: var(--mm-accent);
}

html.mercury-admin .page-content .text-primary {
	color: var(--mm-ink) !important;
}

/* contest matrix / non-action links using Bootstrap color utils */
html.mercury-admin .page-content a.text-success:not(.table-action),
html.mercury-admin .page-content a.text-primary:not(.table-action),
html.mercury-admin .page-content a.text-info:not(.table-action) {
	color: var(--mm-ink) !important;
}

html.mercury-admin .page-content a.text-success:not(.table-action):hover,
html.mercury-admin .page-content a.text-primary:not(.table-action):hover,
html.mercury-admin .page-content a.text-info:not(.table-action):hover {
	color: var(--mm-accent) !important;
}

html.mercury-admin .page-content a.text-success:not(.table-action) i,
html.mercury-admin .page-content a.text-primary:not(.table-action) i,
html.mercury-admin .page-content a.text-info:not(.table-action) i {
	color: inherit !important;
}

/* status labels + required-field asterisks — muted purple/neutral, not Bootstrap green/red */
html.mercury-admin .page-content span.text-success {
	color: var(--mm-ink) !important;
}

html.mercury-admin .page-content span.text-danger {
	color: #9a759f !important;
}

/* restore table-action icon utilities (scaffold_helper text-info/success/danger) */
html.mercury-admin .page-content .table-actions .text-info,
html.mercury-admin .page-content .table-action .text-info,
html.mercury-admin .page-content td.table-actions .text-info {
	color: var(--bs-info) !important;
}

html.mercury-admin .page-content .table-actions .text-success,
html.mercury-admin .page-content .table-action .text-success,
html.mercury-admin .page-content td.table-actions .text-success {
	color: var(--bs-success) !important;
}

html.mercury-admin .page-content .table-actions .text-danger,
html.mercury-admin .page-content .table-action .text-danger,
html.mercury-admin .page-content td.table-actions .text-danger {
	color: var(--bs-danger) !important;
}

html.mercury-admin .page-content .link-primary {
	color: var(--mm-accent) !important;
}

html.mercury-admin .page-content .bg-primary,
html.mercury-admin .page-content .bg-info,
html.mercury-admin .page-content .bg-success {
	background-color: var(--mm-accent) !important;
}

html.mercury-admin .page-content .border-primary,
html.mercury-admin .page-content .border-info,
html.mercury-admin .page-content .border-success {
	border-color: var(--mm-accent) !important;
}

html.mercury-admin .page-content .nav-pills .nav-link.active,
html.mercury-admin .page-content .nav-pills .show > .nav-link,
html.mercury-admin .page-content .nav-tabs .nav-link.active,
html.mercury-admin .page-content .nav-primary.nav-tabs .nav-link.active {
	background-color: #111;
	border-color: #111 #111 transparent;
	color: #fff !important;
}

html.mercury-admin .page-content .page-link {
	color: var(--mm-ink);
	border-color: rgba(18, 18, 24, 0.12);
}

html.mercury-admin .page-content .page-item.active .page-link {
	background-color: #111;
	border-color: #111;
	color: #fff;
}

html.mercury-admin .page-content .page-link:hover {
	color: var(--mm-ink);
	background-color: var(--mm-surface-deep);
	border-color: rgba(18, 18, 24, 0.12);
}

html.mercury-admin .page-content .page-item.disabled .page-link {
	color: var(--mm-muted);
}

html.mercury-admin .page-content .form-check-input:checked {
	background-color: #111;
	border-color: #111;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.7em 0.7em;
	box-shadow: none;
}

/* flash / validation alerts → purple / neutral (no Bootstrap blue/green/yellow) */
html.mercury-admin .page-content .alert,
html.mercury-admin .page-content .alert-primary,
html.mercury-admin .page-content .alert-info,
html.mercury-admin .page-content .alert-success,
html.mercury-admin .page-content .alert-warning,
html.mercury-admin .page-content .alert-secondary {
	--bs-alert-color: var(--mm-accent);
	--bs-alert-bg: #111;
	--bs-alert-border-color: #111;
	--bs-alert-link-color: var(--mm-accent);
	background-color: #111 !important;
	border-color: #111 !important;
	color: var(--mm-accent) !important;
}

html.mercury-admin .page-content .alert-danger {
	--bs-alert-color: #ffb4b4;
	--bs-alert-bg: #3a3a42;
	--bs-alert-border-color: #3a3a42;
	--bs-alert-link-color: #ffb4b4;
	background-color: #3a3a42 !important;
	border-color: #3a3a42 !important;
	color: #ffb4b4 !important;
}

html.mercury-admin .page-content .alert .btn-close {
	filter: invert(1) grayscale(1);
	opacity: 0.7;
}

html.mercury-admin .page-content .badge.bg-primary,
html.mercury-admin .page-content .badge.bg-info,
html.mercury-admin .page-content .badge.bg-success,
html.mercury-admin .page-content .badge.bg-warning {
	background-color: var(--mm-accent) !important;
	color: #111 !important;
}

html.mercury-admin .page-content .progress-bar,
html.mercury-admin .page-content .progress-bar.bg-primary,
html.mercury-admin .page-content .progress-bar.bg-info,
html.mercury-admin .page-content .progress-bar.bg-success {
	background-color: var(--mm-accent) !important;
}

html.mercury-admin .page-content .list-group-item.active {
	background-color: #111;
	border-color: #111;
	color: #fff;
}

html.mercury-admin .page-content .accordion-button:not(.collapsed) {
	background-color: var(--mm-surface-deep);
	color: var(--mm-ink);
	box-shadow: none;
}

html.mercury-admin .page-content .accordion-button:focus {
	border-color: #111;
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

/* DataTables / Select2 focus leftovers */
html.mercury-admin .page-content div.dt-container .dt-paging .page-item.active .page-link,
html.mercury-admin .page-content div.dataTables_wrapper .page-item.active .page-link {
	background-color: #111;
	border-color: #111;
	color: #fff;
}

html.mercury-admin .page-content .select2-container--bootstrap-5 .select2-selection,
html.mercury-admin .page-content .select2-container--bootstrap-5 .select2-selection--multiple {
	border-color: rgba(30, 24, 16, 0.14);
	border-radius: 0.35rem;
	min-height: 2.375rem;
	background: #fff;
	color: var(--mm-ink);
}

html.mercury-admin .page-content .select2-container--bootstrap-5 .select2-selection--single:focus,
html.mercury-admin .page-content .select2-container--bootstrap-5.select2-container--focus .select2-selection,
html.mercury-admin .page-content .select2-container--bootstrap-5.select2-container--open .select2-selection {
	border-color: #111;
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple {
	height: 2.75rem !important;
	min-height: 2.75rem !important;
	max-height: 2.75rem !important;
	padding: 0.25rem 0.4rem;
	overflow: hidden;
	background: #fff;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	gap: 0.3rem;
	overflow: hidden;
	padding: 0 !important;
	margin: 0 !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
	display: inline-flex !important;
	flex: 0 0 auto;
	align-items: center;
	max-width: 100%;
	border-radius: 0.35rem;
	background: #111 !important;
	border: 0 !important;
	color: #fff !important;
	font-size: 0.75rem;
	padding: 0.15rem 0.5rem 0.15rem 0.3rem !important;
	margin: 0 !important;
	line-height: 1.2;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice.is-overflow-hidden {
	display: none !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__display {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #fff;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice .select2-selection__choice__remove {
	position: static !important;
	display: inline-block !important;
	flex: 0 0 auto;
	width: 0.65rem !important;
	height: 0.65rem !important;
	margin: 0 0.45rem 0 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	overflow: hidden;
	text-indent: 100%;
	white-space: nowrap;
	background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center / 0.65rem auto no-repeat !important;
	opacity: 1 !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice .select2-selection__choice__remove > span {
	display: none !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice .select2-selection__choice__remove:hover {
	opacity: 0.85 !important;
	background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center / 0.65rem auto no-repeat !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice-overflow {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 0.15rem 0.4rem;
	border-radius: 0.35rem;
	background: rgba(30, 24, 16, 0.1);
	color: var(--mm-ink, #121212);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	list-style: none;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-search {
	flex: 1 1 auto;
	min-width: 4rem;
	margin: 0 !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-selection--multiple .select2-search .select2-search__field {
	height: 1.6rem !important;
	margin: 0 !important;
}

/* Select2 dropdown — body-mounted; never inherit page overflow / 100% width hacks */
html.mercury-admin .select2-container--bootstrap-5 .select2-dropdown {
	border: 1px solid rgba(30, 24, 16, 0.14);
	border-radius: 0.35rem;
	background: #fff;
	box-shadow: 0 0.55rem 1.4rem rgba(18, 18, 24, 0.14);
	overflow: hidden;
	z-index: 2050;
	box-sizing: border-box;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-search--dropdown {
	padding: 0.3rem 0.4rem 0.15rem;
	display: block;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
	border: 1px solid rgba(30, 24, 16, 0.14) !important;
	border-radius: 0.35rem !important;
	color: var(--mm-ink, #121212);
	min-height: 1.75rem !important;
	height: 1.75rem !important;
	padding: 0.15rem 0.45rem !important;
	font-size: 0.78rem !important;
	margin: 0 !important;
	background: #fff !important;
	background-image: none !important;
	box-shadow: none !important;
	width: 100% !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
	border-color: #111 !important;
	outline: 0;
	box-shadow: 0 0 0 0.14rem var(--mm-accent-soft) !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-results {
	padding: 0.1rem 0 0.2rem;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-results__options {
	max-height: 18rem;
	overflow-y: auto;
	overflow-x: hidden;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-results__option {
	padding: 0.22rem 0.55rem;
	font-size: 0.78rem;
	line-height: 1.2;
	color: #111 !important;
	white-space: normal;
	word-break: break-word;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-results__option--selected {
	background: var(--mm-surface-deep, #e8e8ec) !important;
	color: #111 !important;
}

html.mercury-admin .select2-container--bootstrap-5 .select2-results__option--highlighted,
html.mercury-admin .select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selected {
	background: rgba(30, 24, 16, 0.08) !important;
	color: #111 !important;
}

html.mercury-admin .page-content select.form-select,
html.mercury-admin .page-content select.form-control,
html.mercury-admin div.dt-container .dt-length select,
html.mercury-admin div.dataTables_wrapper div.dataTables_length select {
	appearance: none;
	-webkit-appearance: none;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23121212' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.7rem center;
	background-size: 12px 8px;
	padding-right: 2rem;
	color: var(--mm-ink, #121212);
}

html.mercury-admin div.dt-container .dt-length select:focus,
html.mercury-admin div.dataTables_wrapper div.dataTables_length select:focus {
	outline: 0;
	border-color: #111;
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft);
}

/* Pace: purple top bar, hide right spinner */
html.mercury-admin .pace .pace-progress,
html.mercury-auth .pace .pace-progress {
	background: #f973ff !important;
}

html.mercury-admin .pace .pace-progress-inner,
html.mercury-auth .pace .pace-progress-inner {
	box-shadow: 0 0 10px #f973ff, 0 0 5px #f973ff !important;
}

html.mercury-admin .pace .pace-activity,
html.mercury-auth .pace .pace-activity {
	display: none !important;
}

/* Floating toasts (au3.0-like) */
.mm-toasts {
	position: fixed;
	top: 0.85rem;
	right: 0.85rem;
	z-index: 2100;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.6rem;
	pointer-events: none;
}

.mm-toast {
	pointer-events: auto;
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	width: 340px;
	max-width: calc(100vw - 24px);
	padding: 0.85rem 0.85rem 0.95rem;
	border-radius: 0.85rem;
	border: 1px solid rgba(30, 24, 16, 0.1);
	background: #fff;
	color: #121212;
	box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.12);
	opacity: 0;
	transform: translateX(24px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	overflow: hidden;
}

.mm-toast.is-in {
	opacity: 1;
	transform: translateX(0);
}

.mm-toast.is-out {
	opacity: 0;
	transform: translateX(24px);
}

.mm-toast__text {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding-top: 0.1rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.35;
}

.mm-toast__close {
	flex: 0 0 auto;
	width: 1.5rem;
	height: 1.5rem;
	border: 0;
	border-radius: 0.4rem;
	background: transparent;
	color: #6b6b75;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
}

.mm-toast__close:hover {
	background: rgba(30, 24, 16, 0.06);
	color: #121212;
}

.mm-toast__bar {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 100%;
	transform-origin: left center;
	opacity: 0.85;
	background: #111;
}

.mm-toast--success .mm-toast__bar {
	background: #f973ff;
}

.mm-toast--warning .mm-toast__bar {
	background: #F54562;
}

/* table action icons keep Bootstrap text-info / text-success / text-danger (scaffold_helper) */


/* —— force: never accent text on black CTAs —— */
html.mercury-admin .btn-mercury,
html.mercury-admin .btn-mercury:hover,
html.mercury-admin .btn-mercury:focus,
html.mercury-admin .btn-primary,
html.mercury-admin .btn-primary:hover,
html.mercury-admin .btn-primary:focus,
html.mercury-admin .btn-success,
html.mercury-admin .btn-success:hover,
html.mercury-admin .btn-success:focus,
html.mercury-admin .page-content .btn-mercury,
html.mercury-admin .page-content .btn-mercury:hover,
html.mercury-admin .page-content .btn-mercury:focus,
html.mercury-admin .page-content .btn-primary,
html.mercury-admin .page-content .btn-primary:hover,
html.mercury-admin .page-content .btn-primary:focus,
html.mercury-admin .page-content .btn-success,
html.mercury-admin .page-content .btn-success:hover,
html.mercury-admin .page-content .btn-success:focus,
html.mercury-admin .page-content .btn-warning,
html.mercury-admin .page-content .btn-warning:hover,
html.mercury-admin .page-content .btn-warning:focus,
html.mercury-admin .page-content .btn-outline-primary:hover,
html.mercury-admin .page-content .btn-outline-primary:focus,
html.mercury-admin .page-content .nav-pills .nav-link.active,
html.mercury-admin .page-content .list-group-item.active,
html.mercury-admin .page-content .page-item.active .page-link,
html.mercury-admin .back-to-top,
html.mercury-admin .sidebar-wrapper .metismenu > li.mm-active > a,
html.mercury-admin .sidebar-wrapper .metismenu > li.mm-active > a .parent-icon,
html.mercury-admin .admin-sidebar-user-avatar,
html.mercury-admin .admin-sidebar-user-logout:hover,
html.mercury-auth .section-authentication-signin .btn-success,
html.mercury-auth .section-authentication-signin .btn-success:hover,
html.mercury-auth .section-authentication-signin .btn-success:focus,
html.mercury-auth .section-authentication-signin .btn-primary,
html.mercury-auth .section-authentication-signin .btn-primary:hover,
html.mercury-auth .section-authentication-signin .btn-primary:focus {
	color: #fff !important;
}

/* contest row status: neutral stripes (not Bootstrap green/pink) */
html.mercury-admin .page-content table.admin-contest-table > tbody > tr.table-success > *,
html.mercury-admin .page-content .table > tbody > tr.table-success > * {
	--bs-table-bg: #f7f7f8;
	--bs-table-accent-bg: #f7f7f8;
	--bs-table-color: var(--mm-ink);
	--bs-table-striped-bg: #f7f7f8;
	background-color: #f7f7f8 !important;
	color: var(--mm-ink) !important;
	box-shadow: none !important;
}

html.mercury-admin .page-content table.admin-contest-table > tbody > tr.table-danger > *,
html.mercury-admin .page-content .table > tbody > tr.table-danger > * {
	--bs-table-bg: #efeff1;
	--bs-table-accent-bg: #efeff1;
	--bs-table-color: var(--mm-ink);
	background-color: #efeff1 !important;
	color: var(--mm-ink) !important;
	box-shadow: none !important;
}

html.mercury-admin .page-content .table > tbody > tr.table-success:hover > *,
html.mercury-admin .page-content .table > tbody > tr.table-danger:hover > * {
	--bs-table-accent-bg: rgba(249, 115, 255, 0.08);
	background-color: rgba(249, 115, 255, 0.08) !important;
}

/* selects: less round, solid Mercury */
html.mercury-admin .page-content .form-select,
html.mercury-admin .page-content .form-control,
html.mercury-admin .select2-container--bootstrap-5 .select2-selection,
html.mercury-admin .select2-container--bootstrap-5 .select2-dropdown {
	border-radius: 0.35rem !important;
}

html.mercury-admin .page-content .card,
html.mercury-admin .page-content .admin-form-card,
html.mercury-admin .admin-sidebar-user-card {
	border-radius: var(--mm-radius) !important;
	box-shadow: none !important;
	overflow: visible;
}

html.mercury-admin .page-content .btn,
html.mercury-admin .page-content .btn-mercury,
html.mercury-admin .page-content .nav-pills .nav-link {
	border-radius: var(--mm-radius-pill) !important;
}

html.mercury-admin .page-content .nav-pills .nav-link {
	color: var(--mm-muted);
	font-weight: 600;
	padding: 0.4rem 0.85rem;
}

html.mercury-admin .page-content .nav-pills .nav-link:hover {
	color: var(--mm-ink);
	background: rgba(30, 24, 16, 0.06);
}

html.mercury-admin .page-content .link-primary {
	color: var(--mm-ink) !important;
}

html.mercury-admin .page-content .link-primary:hover {
	color: var(--mm-accent) !important;
}


/* —— unify admin tables with users chrome —— */
html.mercury-admin .page-content table.admin-contest-table {
	table-layout: auto;
	width: 100%;
}

html.mercury-admin .page-content table.admin-contest-table thead th,
html.mercury-admin .page-content table.table.datatable thead th,
html.mercury-admin .page-content table.table.dataTable thead th {
	font-size: 0.72rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--mm-muted);
	border-bottom-color: rgba(30, 24, 16, 0.08);
	background: var(--mm-surface-deep) !important;
	font-weight: 700;
	white-space: nowrap;
	vertical-align: middle;
	width: auto;
}

html.mercury-admin .page-content .card > .card-body > .table-responsive,
html.mercury-admin .page-content .admin-form-card > .card-body > .table-responsive {
	margin: 0;
}

html.mercury-admin .page-content h6.text-uppercase + hr {
	margin-top: 0.5rem;
	margin-bottom: 1rem;
	opacity: 0.12;
	border-color: var(--mm-ink);
}

/* Select2 trigger only (not the body-level dropdown container) */
html.mercury-admin .page-content .select2-container--bootstrap-5 {
	width: 100% !important;
	max-width: 100%;
}

html.mercury-admin .page-content .select2-container--bootstrap-5 .select2-selection {
	min-height: 2.375rem;
	height: auto;
	border: 1px solid rgba(30, 24, 16, 0.14) !important;
	border-radius: 0.35rem !important;
	background: #fff !important;
}

html.mercury-admin .page-content .select2-container--bootstrap-5 .select2-selection--single {
	display: flex !important;
	align-items: center !important;
	min-height: 2.375rem;
	height: 2.375rem;
	padding: 0 !important;
}

html.mercury-admin .page-content .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
	line-height: 1.25 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 0.75rem;
	padding-right: 1.75rem;
	color: #111;
	display: block;
	width: 100%;
}

html.mercury-admin .page-content .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
	height: 100%;
	top: 0 !important;
}

/* Native sm selects in tables (diplom) — center text, match search height */
html.mercury-admin .page-content .form-select-sm,
html.mercury-admin .page-content select.form-select.form-select-sm {
	height: 2.125rem;
	min-height: 2.125rem;
	padding-top: 0.3rem;
	padding-bottom: 0.3rem;
	line-height: 1.25;
	display: inline-block;
	vertical-align: middle;
}

/* Select + outline button rows (project show, diplom, status) */
html.mercury-admin .page-content .admin-select-action {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

html.mercury-admin .page-content .admin-select-action > select.form-select,
html.mercury-admin .page-content .admin-select-action > .select2-container {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
}

html.mercury-admin .page-content .admin-select-action > .btn {
	flex: 0 0 auto;
	align-self: center;
	height: 2.375rem;
	min-height: 2.375rem;
}

html.mercury-admin .page-content .admin-select-action .form-select-sm + .select2-container .select2-selection--single,
html.mercury-admin .page-content table .select2-container--bootstrap-5 .select2-selection--single {
	height: 2.125rem !important;
	min-height: 2.125rem !important;
}

html.mercury-admin .page-content .admin-select-action .form-select-sm ~ .btn,
html.mercury-admin .page-content table .admin-select-action > .btn {
	height: 2.125rem;
	min-height: 2.125rem;
}

/* Hide DataTables length / info leftovers if any plugin re-enables them */
html.mercury-admin .page-content .dt-length,
html.mercury-admin .page-content .dataTables_length,
html.mercury-admin .page-content .dt-info,
html.mercury-admin .page-content .dataTables_info {
	display: none !important;
}

html.mercury-admin .page-content .select2-container--bootstrap-5.select2-container--focus .select2-selection,
html.mercury-admin .page-content .select2-container--bootstrap-5.select2-container--open .select2-selection {
	border-color: #111 !important;
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft) !important;
}

/* Open select must not inflate page scroll / clip inside cards */
html.mercury-admin .page-content .admin-form-card:has(.select2-container--open),
html.mercury-admin .page-content .card:has(.select2-container--open),
html.mercury-admin .page-content .admin-filter-bar:has(.select2-container--open) {
	overflow: visible !important;
}

/* —— jury cards grid —— */
html.mercury-admin .page-content .admin-jury-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
	gap: 0.85rem;
	align-items: stretch;
}

html.mercury-admin .page-content .admin-jury-grid > .admin-form-card {
	margin-bottom: 0 !important;
	height: 100%;
}

html.mercury-admin .page-content .admin-jury-grid .card-body {
	display: flex;
	flex-direction: column;
	height: 100%;
}

html.mercury-admin .page-content .admin-jury-grid .admin-form-meta {
	margin-top: auto;
}

html.mercury-admin .page-content .admin-nom-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
	gap: 0.4rem;
}

html.mercury-admin .page-content .admin-nom-card {
	position: relative;
	margin: 0;
	border: 1px solid rgba(30, 24, 16, 0.12);
	border-radius: 0.35rem;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

html.mercury-admin .page-content .admin-nom-card:hover {
	border-color: rgba(18, 18, 24, 0.35);
}

html.mercury-admin .page-content .admin-nom-card.is-checked,
html.mercury-admin .page-content .admin-nom-card:has(input:checked) {
	border-color: #111;
	background: var(--mm-surface-deep, #f0f0f2);
	box-shadow: inset 3px 0 0 var(--mm-accent);
}

html.mercury-admin .page-content .admin-nom-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

html.mercury-admin .page-content .admin-nom-card-body {
	display: block;
	padding: 0.4rem 0.55rem 0.45rem;
}

html.mercury-admin .page-content .admin-nom-card-code {
	display: block;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--mm-muted);
	margin-bottom: 0.1rem;
}

html.mercury-admin .page-content .admin-nom-card-title {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: #111;
	line-height: 1.2;
}

html.mercury-admin .page-content .admin-nom-card-meta {
	display: block;
	margin-top: 0.18rem;
	font-size: 0.68rem;
	color: var(--mm-muted);
}

html.mercury-admin .page-content .admin-nom-block {
	margin-bottom: 0.75rem;
}

html.mercury-admin .page-content .admin-nom-block-title {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--mm-muted);
	margin: 0 0 0.35rem;
}

/* —— Admin CRUD modal (fetch form fragment; mounted on body) —— */
html.admin-modal-open,
html.admin-modal-open body,
body.admin-modal-open {
	overflow: hidden !important;
	overscroll-behavior: none;
}

.admin-modal {
	position: fixed;
	inset: 0;
	z-index: 1080;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	overscroll-behavior: contain;
}

.admin-modal.is-open {
	display: flex;
}

.admin-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 18, 24, 0.42);
	border: 0;
	padding: 0;
	cursor: pointer;
}

.admin-modal__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 28rem;
	max-height: min(92vh, 52rem);
	height: fit-content;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 0.65rem;
	box-shadow: 0 1rem 2.5rem rgba(18, 18, 24, 0.18);
	overflow: hidden;
}

.admin-modal__panel--wide {
	max-width: 52rem;
}

.admin-modal__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.9rem 1rem 0.75rem 1.15rem;
	border-bottom: 1px solid rgba(18, 18, 24, 0.08);
	flex-shrink: 0;
}

.admin-modal__title {
	margin: 0;
	flex: 1;
	font-size: 1rem;
	font-weight: 700;
	color: #121212;
	line-height: 1.3;
}

.admin-modal__close {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 0.4rem;
	background: transparent;
	color: #6b6b75;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
}

.admin-modal__close:hover {
	background: rgba(18, 18, 24, 0.06);
	color: #121212;
}

.admin-modal__body {
	padding: 1rem 1.15rem 1.25rem;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	color: var(--mm-ink, #121212);
}

.admin-modal__body.is-busy {
	opacity: 0.65;
	pointer-events: none;
}

.admin-modal__loading {
	padding: 1.5rem 0;
	text-align: center;
	color: #6b6b75;
	font-size: 0.875rem;
}

.admin-modal__body .page-breadcrumb {
	display: none !important;
}

.admin-modal__body .admin-form-card {
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	margin-bottom: 0.75rem;
	width: 100% !important;
	max-width: 100% !important;
	flex: none !important;
}

.admin-modal__body .admin-form-card:last-child {
	margin-bottom: 0;
}

.admin-modal__body .admin-form-card > .card-body {
	padding: 0 !important;
}

.admin-modal__body .admin-section-heading {
	display: block;
	margin-bottom: 0.85rem;
}

.admin-modal__body .admin-section-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #121212;
}

.admin-modal__body .col-lg-6,
.admin-modal__body .col-lg-6.admin-form-card {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
}

.admin-modal__body .admin-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-top: 1.1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(30, 24, 16, 0.06);
}

.admin-modal__body .row {
	margin-left: 0;
	margin-right: 0;
}

.admin-modal__body .row > [class*="col-"] {
	padding-left: 0;
	padding-right: 0;
	width: 100%;
	max-width: 100%;
}

.admin-modal__body .form-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #121212;
	margin-bottom: 0.4rem;
}

.admin-modal__body .form-control,
.admin-modal__body .form-select {
	border-color: rgba(30, 24, 16, 0.14);
	border-radius: 0.35rem;
	font-size: 0.9rem;
	min-height: calc(1.5em + 0.85rem + 2px);
	background: #fff;
	color: #121212;
}

.admin-modal__body .form-text,
.admin-modal__body .admin-form-meta {
	color: #6b6b75;
	font-size: 0.8125rem;
}

.admin-modal__body .btn-mercury {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.7rem 1.45rem;
	border: 0;
	border-radius: 0.45rem;
	background: #111;
	color: #fff !important;
	font-weight: 700;
	font-size: 0.9rem;
	line-height: 1.2;
	text-decoration: none;
}

.admin-modal__body .btn-mercury:hover,
.admin-modal__body .btn-mercury:focus {
	background: #000;
	color: #fff !important;
}

.admin-modal__body .btn-outline-primary,
.admin-modal__body .btn-outline-danger {
	border-radius: 0.45rem;
}

/* —— admin file uploader —— */
.admin-file {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin: 0;
	cursor: pointer;
}

.admin-file--fill {
	height: 100%;
	min-height: 100%;
	gap: 0;
}

.admin-file__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.admin-file__face {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	min-height: 4.5rem;
	padding: 0.85rem 1rem;
	border: 1.5px dashed rgba(30, 24, 16, 0.22);
	border-radius: var(--mm-radius, 0.55rem);
	background:
		linear-gradient(180deg, #fff 0%, #f7f7f9 100%);
	transition:
		border-color 0.15s ease,
		background 0.15s ease,
		box-shadow 0.15s ease;
}

.admin-file--fill .admin-file__face {
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 100%;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	text-align: center;
	gap: 0.65rem;
	padding: 1.1rem;
}

.admin-file__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.45rem;
	background: #111;
	color: #fff;
	font-size: 1.25rem;
	line-height: 1;
}

.admin-file__copy {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
	flex: 1 1 auto;
}

.admin-file__title {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--mm-ink, #121212);
	line-height: 1.25;
}

.admin-file__hint {
	font-size: 0.78rem;
	color: var(--mm-muted, #6b6b75);
	line-height: 1.3;
}

.admin-file__meta {
	display: none;
	max-width: 100%;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--mm-muted, #6b6b75);
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.admin-file.is-filled .admin-file__meta {
	display: block;
}

.admin-file.is-filled .admin-file__hint {
	display: none;
}

.admin-file--fill .admin-file__copy {
	flex: 0 1 auto;
	align-items: center;
}

.admin-file--fill .admin-file__meta {
	text-align: center;
}

.admin-file__preview {
	display: block;
	border-radius: var(--mm-radius-sm, 0.4rem);
	overflow: hidden;
	border: 1px solid rgba(30, 24, 16, 0.1);
	background: #efeff2;
	max-width: 12rem;
}

.admin-file__preview[hidden] {
	display: none !important;
}

.admin-file__thumb {
	display: block;
	width: 100%;
	height: auto;
	max-height: 8rem;
	object-fit: cover;
}

.admin-file:hover .admin-file__face,
.admin-file:focus-within .admin-file__face {
	border-color: #111;
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft, rgba(249, 115, 255, 0.38));
}

.admin-file.is-dragover .admin-file__face {
	border-color: var(--mm-accent, #f973ff);
	border-style: solid;
	background: rgba(249, 115, 255, 0.08);
	box-shadow: 0 0 0 0.18rem var(--mm-accent-soft, rgba(249, 115, 255, 0.38));
}

.admin-file.is-filled .admin-file__face {
	border-style: solid;
	border-color: rgba(30, 24, 16, 0.28);
	background: #fff;
}

.admin-file.is-filled .admin-file__icon {
	background: var(--mm-accent, #f973ff);
	color: #111;
}

.admin-modal__body .admin-file__face {
	border-radius: 0.45rem;
}

/* fallback for bare bootstrap file inputs still in forms */
.page-content input[type="file"].form-control,
.admin-modal__body input[type="file"].form-control {
	padding: 0.55rem 0.75rem;
	line-height: 1.3;
	cursor: pointer;
}

.page-content input[type="file"].form-control::file-selector-button,
.admin-modal__body input[type="file"].form-control::file-selector-button {
	margin-inline-end: 0.85rem;
	padding: 0.45rem 0.9rem;
	border: 0;
	border-radius: 0.4rem;
	background: #111;
	color: #fff;
	font-weight: 700;
	font-size: 0.8125rem;
	cursor: pointer;
}

.page-content input[type="file"].form-control:hover::file-selector-button,
.admin-modal__body input[type="file"].form-control:hover::file-selector-button {
	background: #000;
}

/* project apply help: question icon + popup */
html.mercury-admin .page-content .btn-tooltip,
.page-content .btn-tooltip {
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	margin-left: 0.5rem;
	border: 0;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	background: var(--mm-accent);
	color: #fff;
	line-height: 1;
	cursor: help;
	box-shadow: none;
}

html.mercury-admin .page-content .btn-tooltip:hover,
html.mercury-admin .page-content .btn-tooltip:focus,
.page-content .btn-tooltip:hover,
.page-content .btn-tooltip:focus {
	background: var(--mm-accent);
	color: #fff;
	opacity: 0.92;
}

html.mercury-admin .page-content .btn-tooltip i,
.page-content .btn-tooltip i {
	font-size: 1.05rem;
	line-height: 1;
	color: inherit;
}

.tooltip.apply-help-tooltip {
	opacity: 1;
}

.tooltip.apply-help-tooltip .tooltip-inner {
	background-color: var(--mm-accent) !important;
	color: #fff !important;
	box-shadow: 0 0.35rem 0.9rem var(--mm-accent-soft);
	border-radius: 0.5rem;
	font-size: 0.875rem;
	padding: 0.75rem 1rem;
	max-width: 26rem !important;
	width: max-content;
	text-align: left;
	white-space: normal;
	word-break: break-word;
}

.tooltip.apply-help-tooltip .tooltip-inner b,
.tooltip.apply-help-tooltip .tooltip-inner strong,
.tooltip.apply-help-tooltip .tooltip-inner .text-danger,
.tooltip.apply-help-tooltip .tooltip-inner span {
	color: #fff !important;
}

/* project apply: SM-style char counters */
.project-apply .maxlength-wrap {
	position: relative;
}

.project-apply .maxlength-badge {
	position: absolute;
	top: 0.35rem;
	right: 0.55rem;
	z-index: 2;
	pointer-events: none;
	font-size: 0.7rem;
	font-weight: 500;
	color: #6c6c76;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 999px;
	padding: 0.1rem 0.45rem;
	line-height: 1.3;
}

.project-apply .maxlength-badge.is-full {
	color: #fff;
	background: #111;
}

.project-apply .maxlength-wrap .form-control {
	padding-right: 4.25rem;
}

.tooltip.apply-help-tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before,
.tooltip.apply-help-tooltip.bs-tooltip-top .tooltip-arrow::before {
	border-top-color: var(--mm-accent) !important;
}

.tooltip.apply-help-tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before,
.tooltip.apply-help-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
	border-bottom-color: var(--mm-accent) !important;
}

.tooltip.apply-help-tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before,
.tooltip.apply-help-tooltip.bs-tooltip-start .tooltip-arrow::before {
	border-left-color: var(--mm-accent) !important;
}

.tooltip.apply-help-tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before,
.tooltip.apply-help-tooltip.bs-tooltip-end .tooltip-arrow::before {
	border-right-color: var(--mm-accent) !important;
}

/* project apply: collapsible instruction notice */
.page-content .admin-apply-notice {
	margin-bottom: 1.25rem;
	border: 1px solid rgba(18, 18, 24, 0.12);
	border-radius: 0.85rem;
	background: var(--mm-surface, #fff);
	overflow: hidden;
}

.page-content .admin-apply-notice__toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.95rem 1.1rem;
	border: 0;
	background: transparent;
	text-align: left;
	color: var(--mm-ink, #121218);
	font-weight: 700;
	line-height: 1.35;
	cursor: pointer;
}

.page-content .admin-apply-notice__toggle:hover,
.page-content .admin-apply-notice__toggle:focus {
	background: rgba(18, 18, 24, 0.03);
	outline: none;
}

.page-content .admin-apply-notice__toggle:not(.collapsed) {
	border-bottom: 1px solid rgba(18, 18, 24, 0.08);
	box-shadow: inset 3px 0 0 var(--mm-accent);
}

.page-content .admin-apply-notice__title {
	flex: 1 1 auto;
}

.page-content .admin-apply-notice__chevron {
	flex: 0 0 auto;
	width: 1.75rem;
	height: 1.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--mm-accent);
	color: #fff;
	transition: transform 0.2s ease;
}

.page-content .admin-apply-notice__chevron i {
	font-size: 1.15rem;
	line-height: 1;
}

.page-content .admin-apply-notice__toggle:not(.collapsed) .admin-apply-notice__chevron {
	transform: rotate(180deg);
}

.page-content .admin-apply-notice__body {
	padding: 1rem 1.15rem 1.2rem;
	color: var(--mm-ink, #121218);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.page-content .admin-apply-notice__body a {
	color: var(--mm-accent) !important;
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.page-content .admin-apply-notice__body strong,
.page-content .admin-apply-notice__body b {
	font-weight: 700;
}

/* print: sidebar is hidden, so its offset and the card padding must go too */
@media print {
	html.mercury-admin .sidebar-wrapper,
	html.mercury-admin .topbar,
	html.mercury-admin .page-footer,
	html.mercury-admin .no-print {
		display: none !important;
	}

	html.mercury-admin .page-wrapper,
	html.mercury-admin .wrapper.toggled .page-wrapper {
		margin: 0 !important;
		min-height: 0;
		background: #fff;
	}

	html.mercury-admin .page-content {
		padding: 0 !important;
		transform: none;
	}

	html.mercury-admin .page-content .card,
	html.mercury-admin .page-content .card-body {
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		box-shadow: none !important;
	}
}
