/* ==========================================================================
   BetterMantis — design layer for MantisBT 2.x
   Tokens first (Brad Frost, atomic design), then layout, components, pages.
   ========================================================================== */

:root {
	/* One declaration per token: light-dark() follows color-scheme, which the theme switch sets */
	color-scheme: light dark;
	--bm-accent: #4f46e5;
	--bm-accent-hover: color-mix(in srgb, var(--bm-accent) 85%, #000);
	--bm-accent-soft: light-dark(color-mix(in srgb, var(--bm-accent) 10%, #fff), color-mix(in srgb, var(--bm-accent) 22%, #161b26));
	--bm-accent-text: light-dark(color-mix(in srgb, var(--bm-accent) 80%, #000), color-mix(in srgb, var(--bm-accent) 55%, #fff));
	--bm-on-accent: #fff;

	--bm-bg: light-dark(#f5f6fa, #0c111d);
	--bm-surface: light-dark(#ffffff, #161b26);
	--bm-surface-2: light-dark(#f9fafb, #1b2130);
	--bm-surface-3: light-dark(#f1f3f7, #222938);
	--bm-border: light-dark(#e4e7ec, #2a3243);
	--bm-border-strong: light-dark(#d0d5dd, #384255);
	--bm-text: light-dark(#101828, #f5f5f6);
	--bm-text-2: light-dark(#344054, #cecfd2);
	--bm-muted: light-dark(#5d6679, #9aa1ad);
	--bm-focus: color-mix(in srgb, var(--bm-accent) 45%, transparent);

	--bm-font: 'Inter BM', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--bm-radius-lg: 14px;
	--bm-radius: 10px;
	--bm-radius-sm: 7px;
	--bm-shadow-sm: 0 1px 2px light-dark(rgba(16, 24, 40, .05), transparent);
	--bm-shadow: 0 1px 3px light-dark(rgba(16, 24, 40, .07), rgba(0, 0, 0, .4)), 0 1px 2px light-dark(rgba(16, 24, 40, .04), transparent);
	--bm-shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .25);
	--bm-navbar-h: 56px;
	--bm-sidebar-w: 236px;

	/* Status palette: tint background + dark text (>= 4.5:1), plus a dot */
	--bm-s10-bg: light-dark(#eef2ff, #1f235b); --bm-s10-fg: light-dark(#3538cd, #c7d7fe); --bm-s10-dot: #6172f3;   /* new */
	--bm-s20-bg: light-dark(#fff4e5, #4e1d09); --bm-s20-fg: light-dark(#93370d, #fedf89); --bm-s20-dot: #f79009;   /* waiting for the client */
	--bm-s30-bg: light-dark(#f4f3ff, #27115f); --bm-s30-fg: light-dark(#5925dc, #d9d6fe); --bm-s30-dot: #875bf7;   /* review */
	--bm-s40-bg: light-dark(#ecfdff, #0b4a6f); --bm-s40-fg: light-dark(#0e7090, #a5f0fc); --bm-s40-dot: #06aed4;   /* estimate */
	--bm-s50-bg: light-dark(#eff8ff, #102a56); --bm-s50-fg: light-dark(#175cd3, #b2ddff); --bm-s50-dot: #2e90fa;   /* in progress */
	--bm-s80-bg: light-dark(#ecfdf3, #053321); --bm-s80-fg: light-dark(#067647, #abefc6); --bm-s80-dot: #17b26a;   /* resolved */
	--bm-s90-bg: light-dark(#f2f4f7, #222938); --bm-s90-fg: light-dark(#475467, #cecfd2); --bm-s90-dot: #98a2b3;   /* closed */
	--bm-s95-bg: light-dark(#f0fdf9, #134e48); --bm-s95-fg: light-dark(#107569, #99f6e0); --bm-s95-dot: #15b79e;   /* estimated */

	--bm-warn-bg: light-dark(#fffaeb, #3a2408); --bm-warn-border: light-dark(#fedf89, #7a4a0b); --bm-warn-fg: light-dark(#93370d, #fedf89);
	/* Private notes (team only): a hue used nowhere else, so they never pass for a message the client reads */
	--bm-private-bg: light-dark(#fdf2fa, #3b0a26); --bm-private-border: light-dark(#c11574, #f670c7); --bm-private-fg: light-dark(#9e165f, #fcceee);
	--bm-ok-fg: light-dark(#067647, #75e0a7);
}
/* Explicit choice from the theme button; without it the OS preference applies */
:root[data-bm-theme="light"] { color-scheme: light; }
:root[data-bm-theme="dark"] { color-scheme: dark; }

/* ---------- Base typography ------------------------------------------------ */
* , h1, h2, h3, h4, h5, h6 { font-family: var(--bm-font); }
.fa, .ace-icon.fa, [class^="fa-"], [class*=" fa-"] { font-family: FontAwesome !important; }
html body { background: var(--bm-bg) !important; color: var(--bm-text); font-size: 14px; line-height: 1.55;
	-webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
h1, h2, h3, h4, h5 { color: var(--bm-text); letter-spacing: -0.01em; }
a { color: var(--bm-accent-text); }
a:hover, a:focus { color: var(--bm-accent-hover); }
.small, small { font-size: 12.5px; }
.lighter { font-weight: 500; }
.grey, .light-grey { color: var(--bm-muted) !important; }
::selection { background: color-mix(in srgb, var(--bm-accent) 25%, transparent); }

/* Visible focus for keyboard users (WCAG 2.4.7) */
:focus-visible, a:focus-visible, .btn:focus-visible {
	outline: 3px solid var(--bm-focus) !important; outline-offset: 2px; border-radius: 6px;
}
/* Links inside text are underlined (WCAG 1.4.1, axe link-in-text-block) */
td.bug-description a, .bm-note-body a, .bm-lead a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Layout shell --------------------------------------------------- */
body.skin-3 .main-container:before { display: none; }
body .main-container, body .main-content, body.skin-3 .page-content { background: transparent !important; }
body .page-content { padding: 20px 28px 40px !important; max-width: 1480px; }

/* Top bar */
body.skin-3 #navbar, body.skin-3 .navbar, body.skin-3 .navbar.navbar-collapse {
	background: var(--bm-surface) !important; border-bottom: 1px solid var(--bm-border); box-shadow: none;
	min-height: var(--bm-navbar-h);
}
body .navbar-fixed-top + .main-container { padding-top: var(--bm-navbar-h); }
body .navbar .navbar-brand { color: var(--bm-text) !important; font-weight: 650; font-size: 16px; height: var(--bm-navbar-h);
	line-height: calc(var(--bm-navbar-h) - 20px); display: flex; align-items: center; gap: 10px; padding-left: 20px; }
body .navbar .navbar-brand .smaller-75 { font-size: 16px; }
.bm-logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--bm-accent); color: var(--bm-on-accent);
	display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: 0; flex: none;
	box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
body .ace-nav > li { height: var(--bm-navbar-h); line-height: var(--bm-navbar-h); border-left: 0 !important; }
body .ace-nav > li > a { background: transparent !important; color: var(--bm-text-2) !important; font-weight: 500; padding: 0 12px;
	height: var(--bm-navbar-h); line-height: var(--bm-navbar-h); }
body .ace-nav > li > a:hover, body .ace-nav > li.open > a { background: var(--bm-surface-3) !important; color: var(--bm-text) !important; }
body.skin-3 .navbar .navbar-toggle { background: var(--bm-surface-3); }
body .navbar .navbar-toggle .icon-bar { background: var(--bm-text-2); }
body .navbar-buttons .ace-nav > li > a.btn, body .navbar .btn-primary.btn-sm { }
/* "Report issue" in the top bar becomes the primary call to action (Von Restorff) */
body .ace-nav > li.hidden-sm > .btn, body .ace-nav .btn-primary, body .navbar .nav .btn {
	background: var(--bm-accent) !important; border: 0 !important; color: var(--bm-on-accent) !important; border-radius: var(--bm-radius-sm) !important;
	height: 36px !important; line-height: 36px !important; padding: 0 14px !important; margin-top: 10px; font-weight: 600; box-shadow: var(--bm-shadow-sm);
}
body .ace-nav .btn-primary:hover { background: var(--bm-accent-hover) !important; }
body .ace-nav .dropdown-menu, body .dropdown-menu { border: 1px solid var(--bm-border); border-radius: var(--bm-radius); box-shadow: var(--bm-shadow-lg);
	padding: 6px; background: var(--bm-surface); }
body .dropdown-menu > li > a { border-radius: 6px; color: var(--bm-text-2); padding: 7px 12px; }
body .dropdown-menu > li > a:hover, body .dropdown-menu > li.active > a { background: var(--bm-accent-soft) !important; color: var(--bm-accent-text) !important; }
body .dropdown-menu .divider { background: var(--bm-border); }

.bm-searchbtn { display: inline-flex !important; align-items: center; gap: 8px; min-width: 260px; height: 36px; margin: 10px 12px 0 0;
	padding: 0 10px 0 12px; border: 1px solid var(--bm-border); border-radius: var(--bm-radius-sm); background: var(--bm-surface-2);
	color: var(--bm-muted); font-size: 13.5px; cursor: pointer; line-height: 1; vertical-align: top; }
.bm-searchbtn:hover { border-color: var(--bm-border-strong); color: var(--bm-text-2); }
.bm-searchbtn kbd, .bm-kbd { margin-left: auto; font: 600 11px/1 var(--bm-font); padding: 4px 6px; border-radius: 5px; background: var(--bm-surface);
	border: 1px solid var(--bm-border); color: var(--bm-muted); box-shadow: 0 1px 0 var(--bm-border); }
.bm-iconbtn { width: 36px; height: 36px; margin: 10px 8px 0 0; border-radius: var(--bm-radius-sm); border: 1px solid var(--bm-border);
	background: var(--bm-surface); color: var(--bm-text-2); display: inline-grid; place-items: center; cursor: pointer; vertical-align: top; }
.bm-iconbtn:hover { background: var(--bm-surface-3); }
.bm-navtools { float: right; display: flex; align-items: flex-start; }

/* Sidebar */
body.skin-3 .sidebar, body.skin-3 .sidebar:before { background: var(--bm-surface) !important; border-color: var(--bm-border) !important; }
body.skin-3 .sidebar { border-right: 1px solid var(--bm-border) !important; }
body.skin-3 .nav-list > li, body.skin-3 .nav-list > li:hover + li, body.skin-3 .nav-list > li.active + li { border: 0 !important; }
body.skin-3 .nav-list > li:before, body.skin-3 .nav-list li.active > a:before, body.skin-3 .nav-list li.active > a:after,
body.skin-3 .nav-list > li > .arrow, body .nav-list > li .arrow { display: none !important; }
body.skin-3 .nav-list { padding: 12px 10px; }
body.skin-3 .nav-list > li > a {
	background: transparent !important; color: var(--bm-text-2) !important; border-radius: 8px; margin: 2px 0;
	display: flex !important; align-items: center; gap: 12px; height: auto !important; min-height: 40px; line-height: 1.25 !important;
	padding: 8px 12px !important; text-align: left !important; font-weight: 500; font-size: 14px;
}
body.skin-3 .nav-list > li > a > .menu-icon { display: inline-block !important; flex: none; width: 20px; text-align: center; font-size: 16px !important;
	line-height: 1 !important; height: auto !important; margin: 0 !important; color: var(--bm-muted); }
body.skin-3 .nav-list > li:hover > a { background: var(--bm-surface-3) !important; color: var(--bm-text) !important; }
body.skin-3 .nav-list > li.active > a, body.skin-3 .nav-list > li.active.highlight > a {
	background: var(--bm-accent-soft) !important; color: var(--bm-accent-text) !important; font-weight: 600;
}
body.skin-3 .nav-list > li.active > a > .menu-icon { color: var(--bm-accent) !important; }
/* Long labels (e.g. without the client vocabulary) wrap instead of overflowing the sidebar */
body .sidebar .nav-list > li > a > .menu-text { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
body .sidebar-toggle { border: 0 !important; background: transparent !important; }
body .sidebar-toggle:before { border-color: var(--bm-border) !important; }
body .sidebar-toggle > .ace-icon { background: var(--bm-surface) !important; border-color: var(--bm-border) !important; color: var(--bm-muted) !important; }

@media (min-width: 992px) {
	body .sidebar.compact, body .sidebar.compact.navbar-collapse { width: var(--bm-sidebar-w) !important; }
	body .sidebar.compact + .main-content { margin-left: var(--bm-sidebar-w) !important; }
	body .sidebar.compact ~ .footer .footer-inner { left: var(--bm-sidebar-w); }
	body .sidebar.menu-min, body .sidebar.menu-min.compact { width: 68px !important; }
	body .sidebar.menu-min + .main-content { margin-left: 68px !important; }
	body .sidebar.menu-min .nav-list > li > a > .menu-text { display: none !important; }
	body .sidebar.menu-min .nav-list > li > a { justify-content: center; padding: 0 !important; }
	body .sidebar-fixed { top: var(--bm-navbar-h) !important; }
}
@media (max-width: 991px) {
	body .sidebar.responsive { top: var(--bm-navbar-h) !important; box-shadow: var(--bm-shadow-lg); }
	body .sidebar.responsive .nav-list > li > a { justify-content: flex-start; }
}

/* Breadcrumb bar (user badge + jump box): redundant with the top bar (Rams: less, but better) */
body .breadcrumbs { background: transparent !important; border: 0 !important; min-height: 0; padding: 0 28px; margin-top: 12px; line-height: 1; }
body .breadcrumbs .breadcrumb { display: none; }
body .breadcrumbs .nav-recent { font-size: 12.5px; color: var(--bm-muted); }
body .breadcrumbs .nav-search { top: 0; }
body .breadcrumbs .nav-search .nav-search-input { border-radius: var(--bm-radius-sm) !important; border-color: var(--bm-border) !important;
	background: var(--bm-surface) !important; height: 32px; width: 170px; color: var(--bm-text); }
html.bm-js body .breadcrumbs { display: none; }

/* Footer: quiet */
body .footer .footer-inner .footer-content { border-top: 1px solid var(--bm-border) !important; background: transparent !important; color: var(--bm-muted);
	font-size: 12.5px; padding: 16px 0; }
html.bm-hide-mantis .footer .footer-content img, html.bm-hide-mantis .footer .footer-content .pull-right { display: none; }
body .btn-scroll-up { background: var(--bm-surface) !important; border: 1px solid var(--bm-border) !important; color: var(--bm-text-2) !important;
	border-radius: 10px; box-shadow: var(--bm-shadow); }

/* ---------- Cards (widget boxes) ------------------------------------------ */
body .widget-box, body .widget-box.widget-color-blue2, body .widget-box.transparent {
	background: var(--bm-surface); border: 1px solid var(--bm-border) !important; border-radius: var(--bm-radius-lg);
	box-shadow: var(--bm-shadow); overflow: hidden; margin: 0 0 20px;
}
body .widget-box > .widget-header, body .widget-color-blue2 > .widget-header {
	background: var(--bm-surface) !important; color: var(--bm-text) !important; border: 0 !important;
	border-bottom: 1px solid var(--bm-border) !important; min-height: 52px; padding: 0 0 0 18px; display: flex; align-items: center;
}
body .widget-header > .widget-title { font-size: 15px !important; font-weight: 650 !important; color: var(--bm-text) !important; line-height: 52px;
	flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; }
body .widget-header > .widget-title > .ace-icon, body .widget-header > .widget-title > .fa { color: var(--bm-muted); font-size: 15px; }
body .widget-title .badge, body .widget-header .badge { background: var(--bm-surface-3) !important; color: var(--bm-muted) !important; font-weight: 600;
	border-radius: 999px; padding: 3px 9px; font-size: 12px; text-shadow: none; }
body .widget-toolbar { line-height: 52px; padding: 0 10px; }
body .widget-toolbar:before { display: none; }
body .widget-toolbar > a, body .widget-toolbar > .widget-menu > a { color: var(--bm-muted) !important; }
body .widget-toolbar .btn { margin-top: 0 !important; vertical-align: middle; }
body .widget-body { background: var(--bm-surface); border: 0 !important; }
body .widget-toolbox, body .widget-toolbox.padding-8 { background: var(--bm-surface-2) !important; border-color: var(--bm-border) !important; padding: 10px 14px !important; }
body .widget-main { padding: 14px 18px; }
body .widget-main.no-padding { padding: 0; }
body .space-10 { height: 4px; max-height: 4px; }

/* ---------- Tables --------------------------------------------------------- */
body .table { color: var(--bm-text); background: transparent; margin-bottom: 0; }
body .table > thead > tr > th, body .table > thead > tr > td, body .table > tbody > tr.row-category > th, body .table > tbody > tr.row-category > td,
body .table-bordered > thead > tr > th {
	background: var(--bm-surface-2) !important; color: var(--bm-muted) !important; font-size: 12px !important; font-weight: 600 !important;
	text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--bm-border) !important; border-top: 0 !important; padding: 10px 12px !important;
}
body .table > thead > tr > th a { color: var(--bm-muted) !important; }
body .table > tbody > tr > td, body .table > tbody > tr > th { padding: 11px 12px !important; border-color: var(--bm-border) !important;
	vertical-align: middle; }
body .table-bordered, body .table-bordered > tbody > tr > td, body .table-bordered > tbody > tr > th { border-left: 0 !important; border-right: 0 !important; }
body .table-bordered { border: 0 !important; }
body .table-striped > tbody > tr:nth-of-type(odd), body .table-striped > tbody > tr:nth-child(odd) > td,
body .table-striped > tbody > tr:nth-child(odd) > th { background: transparent !important; }
body .table-hover > tbody > tr:hover > td, body #buglist tbody tr:hover td { background: var(--bm-surface-2) !important; }
body .table > tbody > tr > th.category, body .table td.category, body th.category {
	background: transparent !important; color: var(--bm-muted) !important; font-weight: 500 !important; font-size: 13px;
	text-transform: none; letter-spacing: 0;
}
body #buglist td { font-size: 13.5px; }
body #buglist td.column-summary a, body #buglist td.column-summary { color: var(--bm-text); font-weight: 500; }
body #buglist td.column-id a { font-weight: 600; font-variant-numeric: tabular-nums; }
body #buglist td.column-project, body td .small { color: var(--bm-muted); }
body .table-condensed > tbody > tr > td { padding: 10px 12px; }
.spacer td, tr.spacer { display: none; }

/* ---------- Status pills ---------------------------------------------------- */
.bm-pill {
	display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12.5px;
	font-weight: 600; line-height: 20px; white-space: nowrap; background: var(--bm-s90-bg); color: var(--bm-s90-fg);
}
.bm-pill:before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; flex: none; }
.bm-pill.bm-s-10 { background: var(--bm-s10-bg); color: var(--bm-s10-fg); }
.bm-pill.bm-s-20 { background: var(--bm-s20-bg); color: var(--bm-s20-fg); }
.bm-pill.bm-s-30 { background: var(--bm-s30-bg); color: var(--bm-s30-fg); }
.bm-pill.bm-s-40 { background: var(--bm-s40-bg); color: var(--bm-s40-fg); }
.bm-pill.bm-s-50 { background: var(--bm-s50-bg); color: var(--bm-s50-fg); }
.bm-pill.bm-s-80 { background: var(--bm-s80-bg); color: var(--bm-s80-fg); }
.bm-pill.bm-s-90 { background: var(--bm-s90-bg); color: var(--bm-s90-fg); }

/* Server update mode of a project (InfluxDB): release green, rc amber, snapshot violet, any other value grey */
.bm-um-release { --bm-um-bg: var(--bm-s80-bg); --bm-um-fg: var(--bm-s80-fg); }
.bm-um-rc { --bm-um-bg: var(--bm-s20-bg); --bm-um-fg: var(--bm-s20-fg); }
.bm-um-snapshot { --bm-um-bg: var(--bm-s30-bg); --bm-um-fg: var(--bm-s30-fg); }
.bm-pill.bm-um { background: var(--bm-um-bg, var(--bm-s90-bg)); color: var(--bm-um-fg, var(--bm-s90-fg)); }
/* Project menu: the tag ends the row, beside the link (the menu's search reads only the link); the row lights up as one */
body #projects-list li.bm-um-item { display: flex; align-items: center; }
body #projects-list li.bm-um-item > a.project-link { flex: 1 1 auto; min-width: 0; }
body #projects-list li.bm-um-item:hover { background: var(--bm-accent-soft); }
body #projects-list li.bm-um-item:hover > a.project-link { background: transparent !important; color: var(--bm-accent-text) !important; }
#projects-list .bm-um-tag { flex: none; margin: 0 12px 0 6px; padding: 0 8px 0 7px; gap: 5px; font-size: 11.5px; line-height: 18px; cursor: pointer; }
.bm-config td > .bm-pill.bm-um, .bm-config td > .bm-um-none { display: inline-flex; margin-left: 8px; }
/* Pasted list: what was not recognised, and the current list to copy */
.bm-um-unknown { margin: 8px 0 0; padding: 8px 12px; font-size: 13px; }
.bm-um-unknown ul { margin: 4px 0 0 18px; }
.bm-um-current { margin-top: 8px; }
.bm-um-current summary { cursor: pointer; font-size: 13px; color: var(--bm-accent-text); }
.bm-um-current textarea { margin-top: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
/* Popup of a tag: next update, mode and calendar, version (on <body>, fixed: the menu would clip it) */
.bm-um-tip { position: fixed; z-index: 2000; max-width: 300px; padding: 8px 11px; border-radius: var(--bm-radius-sm); background: var(--bm-text); color: var(--bm-bg);
	font-size: 12.5px; line-height: 1.45; box-shadow: var(--bm-shadow-lg); pointer-events: none; }
.bm-um-tip[hidden] { display: none; }
.bm-um-tip strong, .bm-um-tip span { display: block; }
.bm-um-tip strong { font-weight: 650; }
.bm-um-tip span { opacity: .85; }
/* Manage → Projects: pill, version, then the next update on its own line */
.bm-um-version { margin-left: 4px; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--bm-text-2); white-space: nowrap; }
.bm-um-next { display: block; margin-top: 4px; font-size: 12px; color: var(--bm-muted); white-space: nowrap; }
.bm-um-cell { min-width: 190px; }
html.bm-js .fa-status-box { display: none !important; }
.bm-handler { color: var(--bm-muted); font-size: 12.5px; margin-left: 6px; }

/* ---------- Buttons -------------------------------------------------------- */
body .btn, body .btn-white, body .btn.btn-white, body .btn-primary.btn-white, body .btn-round {
	border-radius: var(--bm-radius-sm) !important; border: 1px solid var(--bm-border-strong) !important; background: var(--bm-surface) !important;
	color: var(--bm-text-2) !important; font-weight: 550; text-shadow: none !important; box-shadow: var(--bm-shadow-sm) !important;
	transition: background .12s, border-color .12s, color .12s;
}
body .btn:hover, body .btn-white:hover, body .btn.btn-white:hover { background: var(--bm-surface-3) !important; color: var(--bm-text) !important;
	border-color: var(--bm-border-strong) !important; }
body .btn-sm, body .btn-xs { padding: 5px 12px; font-size: 13px; line-height: 20px; }
body .btn-xs { padding: 3px 9px; }
body .btn-group > .btn { margin: 0 6px 6px 0 !important; }
body .btn-group > .btn + .btn { margin-left: 0 !important; }
/* Primary: one per screen, the action the user came for */
body .btn.bm-btn-primary, body input.bm-btn-primary, body .bm-btn-primary, body .login-box .btn-success, body .login-box input[type=submit] {
	background: var(--bm-accent) !important; border-color: var(--bm-accent) !important; color: var(--bm-on-accent) !important; font-weight: 600;
	box-shadow: 0 1px 2px rgba(16,24,40,.12), inset 0 -1px 0 rgba(0,0,0,.12) !important;
}
body .btn.bm-btn-primary:hover, body input.bm-btn-primary:hover, body .bm-btn-primary:hover { background: var(--bm-accent-hover) !important; color: var(--bm-on-accent) !important; }
.bm-btn-lg { height: 44px; padding: 0 20px !important; font-size: 15px !important; display: inline-flex !important; align-items: center; gap: 8px; }
body .btn-danger, body .btn.btn-danger { color: #b42318 !important; }

/* ---------- Forms ---------------------------------------------------------- */
body input[type=text], body input[type=password], body input[type=email], body input[type=search], body input[type=number], body input[type=url],
body select, body textarea, body .form-control, .bm-input {
	border: 1px solid var(--bm-border-strong) !important; border-radius: var(--bm-radius-sm) !important; background: var(--bm-surface) !important;
	color: var(--bm-text) !important; box-shadow: var(--bm-shadow-sm); font-size: 14px; padding: 7px 11px; min-height: 38px;
	transition: border-color .12s, box-shadow .12s;
}
body select { padding-right: 28px; }
body select.input-sm, body input.input-sm { min-height: 34px; height: 34px; font-size: 13.5px; padding: 5px 10px; }
body textarea { line-height: 1.55; padding: 10px 12px; }
body input:focus, body select:focus, body textarea:focus, .bm-input:focus {
	border-color: var(--bm-accent) !important; box-shadow: 0 0 0 4px var(--bm-focus) !important; outline: 0;
}
body ::placeholder { color: color-mix(in srgb, var(--bm-muted) 80%, transparent) !important; }
body .required { color: light-dark(#b42318, #fda29b); }
body label { font-weight: 500; }
input.ace[type=checkbox] + .lbl::before, input.ace[type=radio] + .lbl::before { border-radius: 5px; border-color: var(--bm-border-strong); background-color: var(--bm-surface); }
input.ace[type=radio] + .lbl::before { border-radius: 50%; }
body input.ace[type=checkbox]:checked + .lbl::before, body input.ace[type=radio]:checked + .lbl::before {
	background-color: var(--bm-accent-soft) !important; border-color: var(--bm-accent) !important; color: var(--bm-accent-text) !important; }
body .dropzone { border: 2px dashed var(--bm-border-strong) !important; border-radius: var(--bm-radius) !important; background: var(--bm-surface-2) !important;
	min-height: 0; padding: 18px; transition: border-color .15s, background .15s; }
body .dropzone:hover, body .dropzone.dz-drag-hover { border-color: var(--bm-accent) !important; background: var(--bm-accent-soft) !important; }
body .dropzone .dz-message { margin: 0; color: var(--bm-muted); font-size: 14px !important; }
body .dropzone .dz-message .ace-icon, body .dropzone .dz-message .fa { color: var(--bm-accent) !important; font-size: 26px !important; }
body .dropzone .dz-message span, body .dropzone .dz-message { font-size: 14px !important; line-height: 1.5; }
/* File cards: Mantis paints them white / pink but lets the text inherit, so in dark mode it went white on white */
body .dropzone .dz-preview, body .dropzone-previews .dz-preview { background: var(--bm-surface); color: var(--bm-text); border: 1px solid var(--bm-border-strong);
	border-radius: var(--bm-radius-sm); box-shadow: var(--bm-shadow); padding: 8px 10px; }
body .dropzone .dz-preview .dz-size { color: var(--bm-muted); font-size: 12.5px; }
body .dropzone .dz-preview.dz-error, body .dropzone-previews .dz-preview.dz-error { background: light-dark(#fef3f2, #2d1210); border-color: light-dark(#fecdca, #7a271a); }
body .dropzone .dz-preview.dz-error .dz-error-message, body .dropzone-previews .dz-preview.dz-error .dz-error-message {
	background: light-dark(rgba(255, 255, 255, .7), rgba(0, 0, 0, .25)); color: light-dark(#912018, #fda29b); border-radius: var(--bm-radius-sm); }
body .dropzone .dz-preview.dz-error .dz-error-mark, body .dropzone-previews .dz-preview.dz-error .dz-error-mark { color: light-dark(#d92d20, #f97066); }
body .dropzone .dz-preview .progress { background: var(--bm-surface-3); }

/* Labels, badges, tags */
body .label { border-radius: 6px; font-weight: 600; text-shadow: none; }
body .label:after, body .label:before, body .label.arrowed:before, body .label.arrowed-in-right:after, body .label.arrowed-right:after { display: none !important; }
body .label-default, body .label-grey, body .label.label-grey { background: var(--bm-surface-3) !important; color: var(--bm-text-2) !important; }
body .alert { border-radius: var(--bm-radius); border: 1px solid var(--bm-border); }
body .alert-danger { background: light-dark(#fef3f2, #2d1210); color: light-dark(#912018, #fda29b); border-color: light-dark(#fecdca, #7a271a); }
body .alert-success { background: light-dark(#ecfdf3, #053321); color: light-dark(#054f31, #abefc6); border-color: light-dark(#abefc6, #085d3a); }
body .alert-warning { background: var(--bm-warn-bg); color: var(--bm-warn-fg); border-color: var(--bm-warn-border); }
body .alert-info { background: light-dark(#eff8ff, #102a56); color: light-dark(#194185, #b2ddff); border-color: light-dark(#b2ddff, #1849a9); }

/* ---------- Issue view ---------------------------------------------------- */
.bm-issue-hero { padding: 22px 22px 6px; background: var(--bm-surface); }
.bm-issue-hero .bm-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--bm-muted); font-size: 13px; margin-bottom: 6px; }
.bm-issue-hero .bm-id { font-size: 13px; }
.bm-issue-hero h1 { font-size: 24px; line-height: 1.3; font-weight: 700; margin: 4px 0 12px; letter-spacing: -0.02em; }
.bm-hero-people { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--bm-text-2); margin-bottom: 8px; }
.bm-hero-people > span { display: inline-flex; align-items: center; gap: 8px; }
.bm-hero-people .bm-muted { margin-right: 2px; }
body #main-container .bug-header, body #main-container .bug-header-data { }
html.bm-js tr.bm-hide-row { display: none !important; }
body td.bug-description, body td.bug-steps-to-reproduce, body td.bug-additional-information { font-size: 14.5px; line-height: 1.65; color: var(--bm-text); }
body .top-buttons td { background: var(--bm-surface-2) !important; }
body .table-responsive { border: 0; }

.bm-stepper-row > td { padding: 4px 22px 16px !important; border-top: 0 !important; background: var(--bm-surface) !important; }
.bm-stepper { --bm-step: var(--bm-accent); --bm-step-soft: var(--bm-accent-soft);
	list-style: none; display: flex; margin: 8px 0 0; padding: 0; counter-reset: bm-step; }
/* Colour of the current step: deep enough in light mode, bright in dark mode, for the check mark */
.bm-phase-received { --bm-step: light-dark(#444ce7, #6172f3); --bm-step-soft: var(--bm-s10-bg); }
.bm-phase-review { --bm-step: light-dark(#6938ef, #875bf7); --bm-step-soft: var(--bm-s30-bg); }
.bm-phase-estimate { --bm-step: light-dark(#0e7090, #06aed4); --bm-step-soft: var(--bm-s40-bg); }
.bm-phase-progress { --bm-step: light-dark(#1570ef, #2e90fa); --bm-step-soft: var(--bm-s50-bg); }
.bm-phase-resolved { --bm-step: light-dark(#079455, #17b26a); --bm-step-soft: var(--bm-s80-bg); }
.bm-phase-closed { --bm-step: light-dark(#667085, #98a2b3); --bm-step-soft: var(--bm-s90-bg); }
.bm-phase-estimated { --bm-step: light-dark(#0e9384, #15b79e); --bm-step-soft: var(--bm-s95-bg); }
.bm-stepper li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px;
	color: var(--bm-muted); font-weight: 500; text-align: center; min-width: 0; }
.bm-stepper li:before { content: ''; position: absolute; top: 11px; left: -50%; right: 50%; height: 3px; background: var(--bm-border); border-radius: 3px; }
.bm-stepper li:first-child:before { display: none; }
.bm-stepper li.done:before, .bm-stepper li.current:before { background: var(--bm-step); }
.bm-step-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--bm-border-strong); background: var(--bm-surface);
	position: relative; z-index: 1; display: grid; place-items: center; }
.bm-stepper li.done .bm-step-dot { background: var(--bm-step); border-color: var(--bm-step); }
.bm-stepper li.done .bm-step-dot:after { content: ''; width: 6px; height: 11px; border: solid var(--bm-surface); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.bm-stepper li.current .bm-step-dot { border-color: var(--bm-step); box-shadow: 0 0 0 5px var(--bm-step-soft); }
.bm-stepper li.current .bm-step-dot:after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--bm-step); }
.bm-stepper li.current { color: var(--bm-text); font-weight: 650; }
.bm-stepper li.current.waiting .bm-step-dot { border-color: var(--bm-s20-dot); box-shadow: 0 0 0 5px var(--bm-s20-bg); }
.bm-stepper li.current.waiting .bm-step-dot:after { background: var(--bm-s20-dot); }
.bm-stepper-compact { margin: 0; }
.bm-stepper-compact li { gap: 0; }
.bm-stepper-compact .bm-step-label { display: none; }
.bm-stepper-compact .bm-step-dot { width: 12px; height: 12px; border-width: 2px; }
.bm-stepper-compact li:before { top: 4.5px; height: 3px; }
.bm-stepper-compact li.done .bm-step-dot:after, .bm-stepper-compact li.current .bm-step-dot:after { display: none; }
.bm-stepper-compact li.current .bm-step-dot { background: var(--bm-step); box-shadow: 0 0 0 3px var(--bm-step-soft); }
.bm-stepper-compact li.current.waiting .bm-step-dot { background: var(--bm-s20-dot); box-shadow: 0 0 0 3px var(--bm-s20-bg); }

.bm-callout { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; border-radius: var(--bm-radius);
	border: 1px solid var(--bm-border); background: var(--bm-surface-2); }
.bm-callout > div { flex: 1; color: var(--bm-text-2); font-size: 13.5px; }
.bm-callout strong { color: var(--bm-text); font-size: 14px; }
.bm-callout-warn { background: var(--bm-warn-bg); border-color: var(--bm-warn-border); }
.bm-callout-warn strong, .bm-callout-warn .bm-callout-icon { color: var(--bm-warn-fg); }
.bm-callout-icon { font-size: 22px !important; }

/* Conversation: notes as messages */
body #bugnotes .table > tbody > tr.bugnote > td { border: 0 !important; padding: 14px 18px !important; background: transparent !important; vertical-align: top; }
body #bugnotes tr.bugnote > td.category { width: 210px; }
body #bugnotes tr.bugnote > td.category .pull-left.padding-2 { float: none !important; }
body #bugnotes tr.bugnote > td:last-child { padding-left: 0 !important; }
body #bugnotes tr.bugnote > td:last-child > * { }
body #bugnotes tr.bugnote > td { background: transparent !important; }
body #bugnotes td.category .fa-user, body #bugnotes td.category .fa-clock-o, body #bugnotes td.category .fa-link { display: none; }
body #bugnotes td.category a[rel=bookmark] { color: var(--bm-muted) !important; font-size: 12px; text-decoration: none; }
body #bugnotes td.category p { margin: 0; }
body #bugnotes .bm-note-body { background: var(--bm-surface-2); border: 1px solid var(--bm-border); border-radius: 4px 14px 14px 14px; padding: 12px 16px;
	font-size: 14.5px; line-height: 1.6; color: var(--bm-text); }
body #bugnotes tr.bm-note-staff .bm-note-body { background: var(--bm-accent-soft); border-color: color-mix(in srgb, var(--bm-accent) 22%, var(--bm-border)); }
body #bugnotes tr.bugnote-private .bm-note-body, body #bugnotes .bugnote-private .bm-note-body { background: var(--bm-private-bg); border-color: var(--bm-private-border);
	border-left-width: 5px; }
body #bugnotes td.category a { font-weight: 600; color: var(--bm-text); }
body #bugnotes td.category .label { margin-top: 4px; }
body #bugnotes .bugnotes-empty td { color: var(--bm-muted); padding: 24px !important; }
.bm-avatar { --bm-hue: 230; width: 36px; height: 36px; flex: none; border-radius: 50%; display: inline-grid; place-items: center;
	font-weight: 650; font-size: 13px; letter-spacing: 0;
	color: light-dark(hsl(var(--bm-hue) 60% 25%), hsl(var(--bm-hue) 80% 88%)); background: light-dark(hsl(var(--bm-hue) 80% 92%), hsl(var(--bm-hue) 35% 28%)); }
.bm-avatar-xs { width: 22px; height: 22px; font-size: 10px; }
.bm-avatar-empty { background: var(--bm-surface-3); color: var(--bm-muted); }
.bm-note-head { display: flex; align-items: center; gap: 10px; }
.bm-note-head .bm-note-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.bm-note-head .bm-note-who small { color: var(--bm-muted); }

/* Add note: composer */
body #bugnote_add_open .table > tbody > tr > th.category, body #bugnote_add .table > tbody > tr > th.category { width: 210px; }
body #bugnote_text { min-height: 110px; }

/* ---------- Report form (progressive disclosure) --------------------------- */
html.bm-simple-report #report_bug_form .table > tbody > tr > th.category { width: 220px; padding-top: 18px !important; vertical-align: top; color: var(--bm-text-2) !important; font-weight: 600 !important; }
html.bm-simple-report #report_bug_form .table > tbody > tr > td { padding-top: 12px !important; padding-bottom: 12px !important; }
html.bm-simple-report #report_bug_form .table > tbody > tr { border-top: 0; }
html.bm-simple-report #report_bug_form .table > tbody > tr > * { border-top: 0 !important; }
html.bm-simple-report #report_bug_form #summary { width: 100% !important; font-size: 15px; height: 44px; }
html.bm-simple-report #report_bug_form #description { min-height: 160px; height: 160px; width: 100%; }
html.bm-simple-report #report_bug_form tr.bm-adv { display: none; }
html.bm-simple-report #report_bug_form.bm-adv-open tr.bm-adv { display: table-row; }
html.bm-simple-report #report_bug_form tr.bm-adv > th.category { color: var(--bm-muted) !important; font-weight: 500 !important; }
.bm-more-row > td { padding: 6px 12px 12px !important; }
.bm-more-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px dashed var(--bm-border-strong);
	border-radius: var(--bm-radius); background: transparent; color: var(--bm-text-2); font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; }
.bm-more-toggle:hover { background: var(--bm-surface-2); border-color: var(--bm-accent); color: var(--bm-accent-text); }
.bm-more-toggle .bm-more-hint { font-weight: 400; color: var(--bm-muted); font-size: 13px; }
.bm-more-toggle .fa { transition: transform .15s; color: var(--bm-muted); }
#report_bug_form.bm-adv-open .bm-more-toggle .fa-chevron-down { transform: rotate(180deg); }
.bm-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.bm-tile { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; min-height: 48px; border: 1px solid var(--bm-border-strong);
	border-radius: var(--bm-radius); background: var(--bm-surface); color: var(--bm-text-2); font-weight: 550; font-size: 14px; cursor: pointer;
	transition: border-color .12s, background .12s, box-shadow .12s; }
.bm-tile .fa { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--bm-surface-3); color: var(--bm-muted); font-size: 15px; }
.bm-tile:hover { border-color: var(--bm-accent); }
.bm-tile[aria-checked="true"] { border-color: var(--bm-accent); background: var(--bm-accent-soft); color: var(--bm-accent-text); box-shadow: 0 0 0 1px var(--bm-accent); }
.bm-tile[aria-checked="true"] .fa { background: var(--bm-accent); color: var(--bm-on-accent); }
.bm-counter { display: block; margin-top: 6px; font-size: 12px; color: var(--bm-muted); text-align: right; }
.bm-counter.bm-low { color: #b54708; }
.bm-field-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--bm-muted); font-weight: 400; }

/* ---------- Login ---------------------------------------------------------- */
body.login-layout { background: radial-gradient(1200px 600px at 10% -10%, var(--bm-accent-soft), transparent 60%),
	radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--bm-accent) 12%, transparent), transparent 60%), var(--bm-bg) !important; }
body.login-layout .main-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
body.login-layout .main-content { width: 100%; }
body.login-layout .login-container, body.login-layout .position-relative, body.login-layout .col-md-offset-3 { }
body.login-layout .widget-box, body.login-layout .login-box .widget-main { background: var(--bm-surface) !important; }
body.login-layout .login-box.widget-box { border-radius: 18px; box-shadow: var(--bm-shadow-lg); border: 1px solid var(--bm-border) !important; }
body.login-layout .login-box .widget-main { padding: 34px 36px 30px; }
body.login-layout .login-box h4.header { border: 0; font-size: 0 !important; margin: 0; padding: 0; }
body.login-layout .login-box h4.header .ace-icon { display: none; }
body.login-layout .login-box input[type=text], body.login-layout .login-box input[type=password] { height: 44px; font-size: 15px; padding-left: 12px; }
body.login-layout .login-box .input-icon > .ace-icon { display: none; }
body.login-layout .login-box input[type=submit] { width: 100%; height: 44px; font-size: 15px; margin-top: 4px; }
body.login-layout .toolbar, body.login-layout .login-box .toolbar { background: var(--bm-surface-2) !important; border-top: 1px solid var(--bm-border); }
body.login-layout .toolbar a, body.login-layout .login-box .toolbar a { color: var(--bm-accent-text) !important; text-shadow: none; }
html.bm-hide-mantis body.login-layout .login-logo, html.bm-hide-mantis body.login-layout #banner img, html.bm-hide-mantis body.login-layout img[alt*="Mantis"] { display: none; }
.bm-login-brand { text-align: center; margin: 0 0 22px; }
.bm-login-brand .bm-logo-mark { width: 48px; height: 48px; border-radius: 14px; font-size: 20px; margin-bottom: 14px; }
.bm-login-brand h1 { font-size: 24px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.02em; }
.bm-login-brand p { color: var(--bm-muted); margin: 0; font-size: 14.5px; }
.bm-login-tagline { display: inline-block; font-size: 12px; font-weight: 600; color: var(--bm-accent-text); background: var(--bm-accent-soft);
	padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- My View timeline & misc ---------------------------------------- */
body .timeline-container:before, body .timeline-items:before { background: var(--bm-border) !important; }
body .timeline-info .ace-icon, body .timeline-indicator { background: var(--bm-surface-3) !important; color: var(--bm-muted) !important;
	border: 0 !important; box-shadow: none !important; text-shadow: none !important; width: 32px !important; height: 32px !important;
	line-height: 32px !important; font-size: 14px !important; }
body .timeline-item .widget-box { border: 0 !important; box-shadow: none !important; background: transparent; }
body .timeline-item .widget-main { padding: 8px 0; font-size: 13.5px; }
body .my-buglist-bug td { font-size: 13.5px; }
body .my-buglist-bug td span a { color: var(--bm-text); font-weight: 500; }
body .my-buglist-id a { font-weight: 600; }
body .progress { border-radius: 99px; background: var(--bm-surface-3); }
body .pagination > li > a, body .pagination > li > span { border-color: var(--bm-border); color: var(--bm-text-2); background: var(--bm-surface); }
body .pagination > .active > a { background: var(--bm-accent); border-color: var(--bm-accent); }
body .well { background: var(--bm-surface-2); border-color: var(--bm-border); border-radius: var(--bm-radius); box-shadow: none; }
body hr { border-color: var(--bm-border); }
body .page-header { border-color: var(--bm-border); }
body .nav-tabs > li > a { border-radius: 8px 8px 0 0; color: var(--bm-text-2); }
body .nav-tabs > li.active > a, body .nav-tabs > li.active > a:hover { border-top: 2px solid var(--bm-accent) !important; color: var(--bm-text); background: var(--bm-surface); }
body .filter-box .table td, body #filter .table td { font-size: 13px; }

/* ---------- Shared bits for plugin pages ---------------------------------- */
.bm-page { padding-top: 4px; }
.bm-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.bm-h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 4px; }
.bm-h2 { font-size: 16px; font-weight: 650; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.bm-h2 .fa { color: var(--bm-muted); }
.bm-lead { color: var(--bm-muted); font-size: 15px; margin: 0; }
.bm-muted { color: var(--bm-muted); }
.bm-id { font-weight: 650; color: var(--bm-muted); font-variant-numeric: tabular-nums; }
.bm-count { font-size: 12px; font-weight: 600; color: var(--bm-muted); background: var(--bm-surface-3); border-radius: 999px; padding: 1px 8px; }
.bm-dot-sep { color: var(--bm-muted); }
.bm-tag { font-size: 12px; font-weight: 550; color: var(--bm-text-2); background: var(--bm-surface-3); border-radius: 6px; padding: 2px 8px; }

.bm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.bm-kpi { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: var(--bm-radius-lg); padding: 16px 18px; box-shadow: var(--bm-shadow);
	display: flex; flex-direction: column; gap: 2px; }
.bm-kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--bm-text); }
.bm-kpi-label { color: var(--bm-muted); font-size: 13px; font-weight: 500; }
.bm-kpi-warn { background: var(--bm-warn-bg); border-color: var(--bm-warn-border); }
.bm-kpi-warn .bm-kpi-value, .bm-kpi-warn .bm-kpi-label { color: var(--bm-warn-fg); }
.bm-kpi-ok .bm-kpi-value { color: var(--bm-ok-fg); }

.bm-section { margin-bottom: 28px; }
.bm-section-warn .bm-h2 { color: var(--bm-warn-fg); }
.bm-section-warn .bm-h2 .fa { color: var(--bm-warn-fg); }
.bm-tickets { display: flex; flex-direction: column; gap: 10px; }
.bm-ticket { display: flex; gap: 20px; align-items: stretch; padding: 16px 18px; background: var(--bm-surface); border: 1px solid var(--bm-border);
	border-radius: var(--bm-radius-lg); box-shadow: var(--bm-shadow); color: var(--bm-text) !important; text-decoration: none !important;
	transition: border-color .12s, box-shadow .12s, transform .12s; }
.bm-ticket:hover { border-color: color-mix(in srgb, var(--bm-accent) 45%, var(--bm-border)); box-shadow: 0 6px 16px -6px rgba(16,24,40,.18); transform: translateY(-1px); }
.bm-section-warn .bm-ticket { border-left: 4px solid var(--bm-s20-dot); }
.bm-tickets-quiet .bm-ticket { box-shadow: none; background: var(--bm-surface-2); }
.bm-ticket-main { flex: 1; min-width: 0; }
.bm-ticket-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--bm-muted); margin-bottom: 3px; }
.bm-ticket-meta span + span:before { content: '·'; margin-right: 10px; color: var(--bm-border-strong); }
.bm-ticket-title { font-size: 15.5px; font-weight: 600; line-height: 1.4; color: var(--bm-text); }
.bm-ticket-last { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; color: var(--bm-text-2);
	background: var(--bm-surface-2); border-radius: 10px; padding: 8px 10px; }
.bm-ticket-last strong { font-weight: 600; }
.bm-ticket-side { width: 260px; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.bm-ticket-side .bm-stepper { width: 100%; }
.bm-ticket-foot { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--bm-muted); flex-wrap: wrap; justify-content: flex-end; }
.bm-empty { text-align: center; padding: 40px 20px; background: var(--bm-surface); border: 1px dashed var(--bm-border-strong); border-radius: var(--bm-radius-lg); color: var(--bm-muted); }
.bm-empty-icon { font-size: 34px !important; color: var(--bm-ok-fg); }
.bm-empty-title { color: var(--bm-text); font-weight: 600; font-size: 16px; margin: 10px 0 4px; }
.bm-portal-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13.5px; padding-top: 6px; }
.bm-portal-foot a { font-weight: 600; }

/* Board */
.bm-board-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bm-segmented { display: inline-flex; padding: 3px; background: var(--bm-surface-3); border-radius: 10px; gap: 2px; }
.bm-segmented a { padding: 6px 12px; border-radius: 8px; color: var(--bm-text-2); font-weight: 550; font-size: 13.5px; text-decoration: none !important; }
.bm-segmented a.active { background: var(--bm-surface); color: var(--bm-text); box-shadow: var(--bm-shadow); }
.bm-board-filter { width: 220px; }
.bm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.bm-col { background: var(--bm-surface-3); border-radius: var(--bm-radius-lg); padding: 10px; min-height: 200px; transition: background .12s, box-shadow .12s; }
.bm-col.bm-drop { background: var(--bm-accent-soft); box-shadow: inset 0 0 0 2px var(--bm-accent); }
.bm-col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.bm-col-head h2 { font-size: 13.5px; font-weight: 650; margin: 0; flex: 1; color: var(--bm-text); }
.bm-col-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bm-s90-dot); }
.bm-col-s-10 .bm-col-dot { background: var(--bm-s10-dot); } .bm-col-s-20 .bm-col-dot { background: var(--bm-s20-dot); }
.bm-col-s-30 .bm-col-dot { background: var(--bm-s30-dot); } .bm-col-s-40 .bm-col-dot { background: var(--bm-s40-dot); }
.bm-col-s-50 .bm-col-dot { background: var(--bm-s50-dot); } .bm-col-s-80 .bm-col-dot { background: var(--bm-s80-dot); }
.bm-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.bm-card { display: block; background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 10px; padding: 10px 12px; box-shadow: var(--bm-shadow-sm);
	color: var(--bm-text) !important; text-decoration: none !important; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.bm-card[draggable="true"] { cursor: grab; }
.bm-card:hover { border-color: var(--bm-border-strong); box-shadow: var(--bm-shadow); }
.bm-card.bm-dragging { opacity: .5; }
.bm-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 12px; }
.bm-card-title { font-size: 13.5px; font-weight: 550; line-height: 1.4; margin-bottom: 10px; }
.bm-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; min-width: 0; }
.bm-card-foot > * { min-width: 0; max-width: 100%; }
.bm-card-spacer { flex: 1; }
.bm-prio { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em; }
.bm-prio-low { color: var(--bm-muted); background: var(--bm-surface-3); }
.bm-prio-normal { display: none; }
.bm-prio-high { color: #b54708; background: #fffaeb; }
.bm-prio-urgent { color: #b42318; background: #fef3f2; }
.bm-col-more, .bm-col-empty { text-align: center; color: var(--bm-muted); font-size: 12.5px; margin: 6px 0; }
.bm-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--bm-text); color: var(--bm-surface); padding: 10px 16px;
	border-radius: 10px; box-shadow: var(--bm-shadow-lg); font-weight: 550; font-size: 14px; z-index: 2000; }
.bm-toast.bm-toast-err { background: #b42318; color: #fff; }

/* ---------- Command palette ---------------------------------------------- */
.bm-palette-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); backdrop-filter: blur(3px); z-index: 3000; display: flex;
	align-items: flex-start; justify-content: center; padding-top: 12vh; }
.bm-palette-backdrop[hidden] { display: none; }
.bm-palette { width: min(640px, calc(100vw - 32px)); background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 16px;
	box-shadow: var(--bm-shadow-lg); overflow: hidden; }
.bm-palette-input-wrap { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--bm-border); }
.bm-palette-input-wrap .fa { color: var(--bm-muted); font-size: 16px; }
body .bm-palette input.bm-palette-input { border: 0 !important; box-shadow: none !important; height: 56px; font-size: 16px; flex: 1; padding: 0; background: transparent !important; }
.bm-palette-list { max-height: 55vh; overflow: auto; padding: 8px; margin: 0; list-style: none; }
.bm-palette-group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--bm-muted); font-weight: 650; padding: 10px 10px 4px; }
.bm-palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; cursor: pointer; color: var(--bm-text-2); font-size: 14px; }
.bm-palette-item .fa { width: 18px; text-align: center; color: var(--bm-muted); }
.bm-palette-item .bm-palette-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bm-text); }
.bm-palette-item[aria-selected="true"] { background: var(--bm-accent-soft); }
.bm-palette-item[aria-selected="true"] .bm-palette-title, .bm-palette-item[aria-selected="true"] .fa { color: var(--bm-accent-text); }
.bm-palette-empty { padding: 22px; text-align: center; color: var(--bm-muted); }
.bm-palette-foot { border-top: 1px solid var(--bm-border); padding: 9px 16px; font-size: 12px; color: var(--bm-muted); background: var(--bm-surface-2); }

/* ---------- Responsive ----------------------------------------------------- */
@media (max-width: 991px) {
	.bm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bm-searchbtn { min-width: 0; width: 36px; padding: 0; justify-content: center; }
	.bm-searchbtn .bm-searchbtn-label, .bm-searchbtn kbd { display: none; }
}
@media (max-width: 767px) {
	body .page-content { padding: 12px 12px 32px !important; }
	body .widget-main { padding: 12px; }
	.bm-ticket { flex-direction: column; gap: 12px; }
	.bm-ticket-side { width: 100%; align-items: flex-start; }
	.bm-ticket-foot { justify-content: flex-start; }
	.bm-h1 { font-size: 22px; }
	.bm-issue-hero { padding: 16px 14px 4px; }
	.bm-issue-hero h1 { font-size: 20px; }
	.bm-stepper li { font-size: 11px; }
	.bm-stepper-row > td { padding: 4px 10px 14px !important; }
	/* Issue details: label/value pairs stack in two columns instead of overflowing */
	body .bm-issue-table, body .bm-issue-table tbody { display: block; width: 100%; }
	body .bm-issue-table tr { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; }
	body .bm-issue-table tr > * { display: block; width: auto !important; border: 0 !important; padding: 8px 12px !important; word-break: break-word; }
	body .bm-issue-table tr > td[colspan] { grid-column: auto; }
	body .bm-issue-table tr.top-buttons, body .bm-issue-table tr.bm-stepper-row, body .bm-issue-table tr.bm-full { grid-template-columns: 1fr; }
	body .bm-issue-table tr > td:empty, body .bm-issue-table tr > th:empty { display: none; }
	body .bm-issue-table tr { border-bottom: 1px solid var(--bm-border); }
	body #bugnotes table, body #bugnotes tbody, body #bugnotes tr.bugnote { display: block; }
	body #bugnotes tr.bugnote > td { display: block; width: auto !important; padding: 10px 12px !important; }
	body #bugnotes tr.bugnote > td.category { padding-bottom: 4px !important; }
	body #bugnotes tr.bugnote > td:last-child { padding-left: 12px !important; }
	body #bugnote_add table, body #bugnote_add tbody, body #bugnote_add tr, body #bugnote_add th, body #bugnote_add td,
	body #bugnote_add_open table, body #bugnote_add_open tbody, body #bugnote_add_open tr, body #bugnote_add_open th, body #bugnote_add_open td,
	html.bm-simple-report #report_bug_form table, html.bm-simple-report #report_bug_form tbody, html.bm-simple-report #report_bug_form tr:not(.bm-adv),
	html.bm-simple-report #report_bug_form th, html.bm-simple-report #report_bug_form td { display: block; width: auto !important; }
	html.bm-simple-report #report_bug_form.bm-adv-open tr.bm-adv { display: block; }
	html.bm-simple-report #report_bug_form .table > tbody > tr > th.category { padding: 12px 12px 0 !important; }
	body .bm-mobile-cards #buglist thead { display: none; }
	.bm-navtools .bm-iconbtn { margin-right: 4px; }
	body .navbar .navbar-brand { padding-left: 8px; }
	body .dropzone .dz-message { font-size: 13.5px !important; }
}
@media (max-width: 480px) {
	.bm-kpis { gap: 10px; }
	.bm-kpi { padding: 12px 14px; }
	.bm-kpi-value { font-size: 24px; }
}

/* Dark-mode touch-ups for Ace pieces that hardcode colors */
@media print { .bm-navtools, .bm-stepper-row, .bm-palette-backdrop { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Fixes after first review ------------------------------------- */
body td.category label, body th.category label { background: transparent !important; color: inherit !important; font-weight: inherit; }
body .table > tbody > tr > td, body .table > tbody > tr > th:not(.category) { background-color: transparent !important; }
body .lbl, body label, body .table { color: inherit; }
body .dropzone .upload-icon { font-size: 26px !important; }
body .dropzone .bigger-150 { font-size: 14px !important; color: var(--bm-muted) !important; }
body .ace-nav > li > a { display: flex !important; align-items: center; gap: 6px; }
body .ace-nav > li > a .ace-icon.fa-caret-down, body .ace-nav > li > a .fa-angle-down { margin-left: 2px; }
html.bm-hide-mantis .footer { display: none; }
html.bm-hide-mantis .main-content { padding-bottom: 24px; }
#buglist td.column-summary { min-width: 280px; text-align: left; }
.bm-stepper-wrap { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--bm-border); }
.bm-issue-hero .bm-stepper-wrap .bm-stepper { margin-top: 0; }
html.bm-on-portal #navbar .btn-primary { display: none !important; }
.bm-ticket-side { width: 320px; }
.bm-ticket-foot { white-space: nowrap; }
body .bm-palette input.bm-palette-input:focus { box-shadow: none !important; outline: 0 !important; }
body.login-layout .widget-box .widget-main, body.login-layout .widget-box .widget-body { background: var(--bm-surface) !important; }
body.login-layout .widget-main h4.header { display: none; }
body.login-layout .input-icon > .ace-icon { display: none; }
body.login-layout input[type=submit] { width: 100% !important; height: 44px; font-size: 15px; float: none !important; }
body.login-layout .widget-main .space-6, body.login-layout .widget-main .space { height: 8px; }
body .navbar .navbar-toggle, body #menu-toggler { background: var(--bm-surface-3) !important; border-radius: 8px; border: 0; }
body #menu-toggler .icon-bar { background: var(--bm-text-2) !important; }
body .navbar .navbar-toggle-img .fa, body .navbar .navbar-toggle .ace-icon { color: var(--bm-text-2) !important; }
@media (max-width: 767px) {
	body .table-responsive > .table > tbody > tr > td, body .table-responsive > .table > tbody > tr > th { white-space: normal; }
	body .bm-note-body { word-break: break-word; }
	body .bm-ticket-foot { white-space: normal; }
}
body .table, body .table-bordered, body .table-striped, body .table-condensed { background-color: transparent !important; }
.bm-ticket-foot { flex-wrap: nowrap; }
body .ace-nav > li > a .user-info { line-height: 1.25 !important; top: 0 !important; position: static; max-width: 180px; }
body .ace-nav > li > a .user-info small { display: none; }
body .widget-title a, body .widget-title .white { color: var(--bm-text) !important; text-decoration: none; }
body .widget-title a:hover { color: var(--bm-accent-text) !important; }
body .profile-activity { border-color: var(--bm-border) !important; padding: 10px 14px; }
/* Ace hovers with a hard-coded #F4F9FD: unreadable in dark mode */
body .profile-activity:hover { background: var(--bm-surface-2) !important; }
body .profile-activity .thumbicon { background: var(--bm-surface-3) !important; color: var(--bm-muted) !important; border: 0 !important;
	width: 32px; height: 32px; line-height: 32px; font-size: 13px !important; border-radius: 50%; text-shadow: none; box-shadow: none; }
body .profile-activity .thumbicon.fa-plus { background: var(--bm-s10-bg) !important; color: var(--bm-s10-fg) !important; }
body .profile-activity .thumbicon.fa-check, body .profile-activity .thumbicon.fa-thumbs-o-up { background: var(--bm-s80-bg) !important; color: var(--bm-s80-fg) !important; }
body .profile-activity .action { font-size: 13.5px; }
body .profile-activity .time { color: var(--bm-muted); font-size: 12.5px; }
body .profile-activity .time .fa { display: none; }
body .profile-activity .action a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; font-weight: 550; }
/* Team lists stay dense (Tufte): more air than stock, less than client views */
html.bm-staff body #buglist > tbody > tr > td { padding: 8px 10px !important; }

/* ---------- v1.1: team feedback ------------------------------------------ */
/* Step captions answer "is Received = taken in charge?" */
.bm-step-caption { font-size: 11.5px; font-weight: 400; color: var(--bm-muted); line-height: 1.3; max-width: 150px; }
.bm-stepper li.current .bm-step-caption { color: var(--bm-text-2); font-weight: 500; }
.bm-stepper li.current.waiting .bm-step-caption { color: var(--bm-warn-fg); font-weight: 650; }
.bm-stepper li.current.waiting .bm-step-label { color: var(--bm-warn-fg); }
.bm-stepper-compact .bm-step-caption { display: none; }
.bm-stepper li { gap: 6px; }
.bm-step-now { display: none; margin: 10px 0 0; font-size: 13px; color: var(--bm-text-2); text-align: center; }
.bm-step-now.waiting, .bm-step-now.waiting strong { color: var(--bm-warn-fg); }
@media (max-width: 767px) { .bm-step-caption { display: none; } .bm-step-now { display: block; } }

.bm-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 991px) { .bm-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bm-kpis-3 { grid-template-columns: 1fr 1fr; } .bm-kpis-3 .bm-kpi:first-child { grid-column: 1 / -1; } }
.bm-h2-link { margin-left: auto; font-size: 13.5px; font-weight: 600; text-decoration: none !important; display: inline-flex; gap: 6px; align-items: center; }
.bm-h2 { flex-wrap: wrap; }

/* Client priority badge: position in the list sets the tone */
.bm-cprio { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; padding: 1px 8px; border-radius: 6px;
	border: 1px solid var(--bm-border); color: var(--bm-text-2); background: var(--bm-surface); white-space: nowrap; }
.bm-cprio:before { content: '\f0a1'; font: normal normal normal 11px/1 FontAwesome; opacity: .8; }
.bm-cprio-0 { color: light-dark(#b42318, #fda29b); border-color: light-dark(#fecdca, #7a271a); background: light-dark(#fef3f2, #55160c); }
.bm-cprio-1 { color: light-dark(#b54708, #fec84b); border-color: light-dark(#fedf89, #7a2e0e); background: light-dark(#fffaeb, #4e1d09); }
.bm-ticket-meta .bm-cprio { margin-left: 4px; }
.bm-ticket-meta span.bm-cprio:before { margin-right: 0; content: '\f0a1'; }
.bm-ticket-meta span.bm-cprio + span:before, .bm-ticket-meta span + span.bm-cprio:before { }

/* Priorities board */
.bm-pboard { grid-auto-columns: minmax(214px, 1fr); gap: 10px; }
.bm-pcol-none { background: transparent; border: 2px dashed var(--bm-border-strong); }
.bm-pcol-0 .bm-col-dot { background: #f04438; } .bm-pcol-1 .bm-col-dot { background: #f79009; }
.bm-pcol-2 .bm-col-dot { background: var(--bm-s50-dot); } .bm-pcol-3 .bm-col-dot { background: var(--bm-s90-dot); }
.bm-pcol-none .bm-col-dot { background: transparent; border: 2px solid var(--bm-border-strong); }
.bm-col-hint { font-size: 12.5px; color: var(--bm-muted); margin: -4px 6px 10px; }
.bm-pcard { cursor: grab; }
.bm-pcard .bm-card-title { display: block; color: var(--bm-text) !important; text-decoration: none; margin-bottom: 12px; }
.bm-pcard .bm-card-title:hover { color: var(--bm-accent-text) !important; }
.bm-pcard .bm-id { text-decoration: none; }
.bm-pcard .bm-stepper { margin-bottom: 12px; }
.bm-pcard-tools { display: flex; gap: 4px; align-items: center; border-top: 1px solid var(--bm-border); padding-top: 10px; }
body .bm-pcard-tools select.bm-prio-select { flex: 1; min-width: 0; min-height: 32px; height: 32px; font-size: 13px; padding: 4px 20px 4px 7px; background-position: right 4px center; }
.bm-move { width: 28px; height: 32px; flex: none; border: 1px solid var(--bm-border-strong); border-radius: 7px; background: var(--bm-surface); color: var(--bm-text-2);
	display: inline-grid; place-items: center; cursor: pointer; }
.bm-move:hover { background: var(--bm-surface-3); }
.bm-move:disabled { opacity: .35; cursor: default; }
.bm-pcard.bm-flash { box-shadow: 0 0 0 3px var(--bm-focus); }
.bm-drop-marker { height: 3px; border-radius: 3px; background: var(--bm-accent); margin: -2px 0; }
.bm-pboard-note { margin-top: 10px; font-size: 13px; }
@media (max-width: 767px) {
	.bm-pboard { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; }
	.bm-pcol { min-height: 0; }
}
.bm-card-top .bm-cprio { margin-left: 6px; }

/* ---------- v1.2: workflow-driven colors ---------------------------------- */
/* Pills and columns follow the client phase, so custom statuses get a coherent color */
.bm-pill.bm-p-received { background: var(--bm-s10-bg); color: var(--bm-s10-fg); }
.bm-pill.bm-p-review { background: var(--bm-s30-bg); color: var(--bm-s30-fg); }
.bm-pill.bm-p-estimate { background: var(--bm-s40-bg); color: var(--bm-s40-fg); }
.bm-pill.bm-p-progress { background: var(--bm-s50-bg); color: var(--bm-s50-fg); }
.bm-pill.bm-p-waiting { background: var(--bm-s20-bg); color: var(--bm-s20-fg); }
.bm-pill.bm-p-resolved { background: var(--bm-s80-bg); color: var(--bm-s80-fg); }
.bm-pill.bm-p-closed { background: var(--bm-s90-bg); color: var(--bm-s90-fg); }
.bm-pill.bm-p-estimated { background: var(--bm-s95-bg); color: var(--bm-s95-fg); }
.bm-col-p-received .bm-col-dot { background: var(--bm-s10-dot); }
.bm-col-p-review .bm-col-dot { background: var(--bm-s30-dot); }
.bm-col-p-estimate .bm-col-dot { background: var(--bm-s40-dot); }
.bm-col-p-progress .bm-col-dot { background: var(--bm-s50-dot); }
.bm-col-p-waiting .bm-col-dot { background: var(--bm-s20-dot); }
.bm-col-p-resolved .bm-col-dot { background: var(--bm-s80-dot); }
.bm-col-p-closed .bm-col-dot { background: var(--bm-s90-dot); }
.bm-col-p-estimated .bm-col-dot { background: var(--bm-s95-dot); }
.bm-config-sub { margin: 18px 12px 4px; font-weight: 650; font-size: 14px; }
.bm-config-hint { margin: 0 12px 10px; color: var(--bm-muted); font-size: 13px; }

/* ---------- v1.3: user psychology iteration ------------------------------ */
.bm-callout-ok { background: var(--bm-s80-bg); border-color: color-mix(in srgb, var(--bm-s80-dot) 35%, transparent); }
.bm-callout-ok strong, .bm-callout-ok .bm-callout-icon { color: var(--bm-s80-fg); }
.bm-callout-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bm-callout-error { flex-basis: 100%; margin: 6px 0 0; color: #b42318; font-size: 13px; }
.bm-callout { flex-wrap: wrap; }
.bm-reported { margin: 0 0 18px; }
.bm-upload-error { margin: 0 0 14px; }
.bm-upload-error > div > span { display: block; margin-top: 2px; }
.bm-upload-error .bm-upload-reason { color: var(--bm-text); }
.bm-reported-steps { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; color: var(--bm-text-2); }

/* What happens next + story, side by side */
.bm-journey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px 28px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--bm-border); }
.bm-next-label { display: block; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--bm-muted); margin-bottom: 6px; }
.bm-next p { margin: 0 0 6px; font-size: 14px; color: var(--bm-text); line-height: 1.55; }
.bm-next .bm-next-version { color: var(--bm-text-2); font-size: 13.5px; }
.bm-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.bm-events li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13.5px; color: var(--bm-text-2); position: relative; }
.bm-events li + li:before { content: ''; position: absolute; left: 11px; top: -7px; height: 12px; width: 2px; background: var(--bm-border); }
.bm-ev-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bm-surface-3); color: var(--bm-muted); font-size: 11px; }
.bm-events li:first-child .bm-ev-icon { background: var(--bm-accent-soft); color: var(--bm-accent-text); }
.bm-events li:first-child .bm-ev-text { color: var(--bm-text); font-weight: 600; }
.bm-events time { color: var(--bm-muted); font-size: 12.5px; white-space: nowrap; }
.bm-events-more summary { cursor: pointer; font-size: 13px; color: var(--bm-accent-text); font-weight: 550; padding: 6px 0 2px; list-style: none; }
.bm-events-more summary::-webkit-details-marker { display: none; }
.bm-events-more summary:before { content: '\f105'; font-family: FontAwesome; margin-right: 6px; display: inline-block; transition: transform .15s; }
.bm-events-more[open] summary:before { transform: rotate(90deg); }
html.bm-client #history, html.bm-client .bm-issue-hero ~ .widget-toolbox a[href="#history"], html.bm-client a.btn[href="#history"] { display: none !important; }

/* Notes: roles in words */
body #bugnotes .label.bm-label-team { background: var(--bm-accent-soft) !important; color: var(--bm-accent-text) !important; }
body #bugnotes .label.bm-label-client { background: var(--bm-surface-3) !important; color: var(--bm-text-2) !important; }

/* Portal: latest update */
.bm-ticket-event { margin-top: 8px; font-size: 13px; color: var(--bm-text-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bm-ticket-event .fa { color: var(--bm-accent); }

/* Board: the ball is in our court */
.bm-reply-badge { font-size: 11px; font-weight: 650; color: var(--bm-s20-fg); background: var(--bm-s20-bg); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }

/* Lists: phase stripe (preattentive colour, Healey & Enns) */
#buglist tr > td.bm-first-cell, tr.my-buglist-bug > td.bm-first-cell { box-shadow: inset 3px 0 0 var(--bm-row-stripe, transparent); }
tr.bm-row-p-received { --bm-row-stripe: var(--bm-s10-dot); } tr.bm-row-p-review { --bm-row-stripe: var(--bm-s30-dot); }
tr.bm-row-p-estimate { --bm-row-stripe: var(--bm-s40-dot); } tr.bm-row-p-progress { --bm-row-stripe: var(--bm-s50-dot); }
tr.bm-row-p-waiting { --bm-row-stripe: var(--bm-s20-dot); } tr.bm-row-p-resolved { --bm-row-stripe: var(--bm-s80-dot); }
tr.bm-row-p-closed { --bm-row-stripe: var(--bm-s90-dot); } tr.bm-row-p-estimated { --bm-row-stripe: var(--bm-s95-dot); }
html.bm-client #buglist .column-selection, html.bm-client .bm-bulk { display: none !important; }
.bm-density-btn { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; height: 30px; padding: 0 10px; border-radius: 7px;
	border: 1px solid var(--bm-border); background: var(--bm-surface); color: var(--bm-text-2); font-size: 12.5px; font-weight: 550; cursor: pointer; }
.bm-density-btn[aria-pressed="true"] { background: var(--bm-accent-soft); color: var(--bm-accent-text); border-color: transparent; }
html.bm-dense body #buglist > tbody > tr > td { padding: 4px 8px !important; font-size: 13px; line-height: 1.35; }
html.bm-dense body #buglist .bm-pill { line-height: 16px; padding: 1px 8px 1px 6px; }
html.bm-dense body .my-buglist-bug td { padding: 5px 8px !important; }

@media (max-width: 991px) { .bm-journey { grid-template-columns: 1fr; } }
/* Mobile: tickets as cards (NN/g, mobile tables: browsing, not comparing) */
@media (max-width: 767px) {
	body #buglist { display: block; }
	body #buglist thead { display: none; }
	body #buglist tbody { display: block; }
	body #buglist tbody tr { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "id status date" "sum sum sum" "cat cat cat";
		gap: 6px 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--bm-border); box-shadow: inset 3px 0 0 var(--bm-row-stripe, transparent); }
	body #buglist tbody tr > td { display: none; padding: 0 !important; border: 0 !important; text-align: left !important; min-width: 0 !important; box-shadow: none !important; }
	body #buglist tbody tr > td.column-id { display: block; grid-area: id; }
	body #buglist tbody tr > td.column-status { display: block; grid-area: status; }
	body #buglist tbody tr > td.column-last-modified { display: block; grid-area: date; color: var(--bm-muted); font-size: 12.5px; font-weight: 400 !important; }
	body #buglist tbody tr > td.column-summary { display: block; grid-area: sum; font-size: 14.5px; white-space: normal !important; }
	body #buglist tbody tr > td.column-category { display: block; grid-area: cat; color: var(--bm-muted); font-size: 12.5px; }
	body #buglist .bm-handler { display: none; }
	body .table-responsive { overflow-x: visible; }
	.bm-reported-steps { padding-left: 16px; }
}

html.bm-dense body #buglist td.column-last-modified { white-space: nowrap; }
@media (max-width: 767px) {
	body .widget-box > .widget-header { flex-wrap: wrap; padding: 6px 12px; min-height: 0; }
	body .widget-header > .widget-title { line-height: 1.3; min-height: 40px; }
	body #filter .widget-header .widget-toolbar, body .filter-box .widget-header .widget-toolbar { line-height: 1; padding: 0 0 8px; }
	body .widget-header .widget-toolbar input.input-sm { width: 150px !important; }
}

/* ---------- sai preset (Corporate Identity V5.1) ---------------------------- */
.bm-logo, .bm-login-logo { display: inline-flex; align-items: center; }
.bm-logo img { height: 40px; width: auto; margin: -6px -8px -6px -10px; }   /* PNG carries its own 24px protection zone */
.bm-logo-dark { display: none; }
:root[data-bm-theme="dark"] .bm-logo-light { display: none; }
:root[data-bm-theme="dark"] .bm-logo-dark { display: inline; }
@media (prefers-color-scheme: dark) {
	:root:not([data-bm-theme="light"]) .bm-logo-light { display: none; }
	:root:not([data-bm-theme="light"]) .bm-logo-dark { display: inline; }
}
.bm-brand-label { font-weight: 600; font-size: 15px; color: var(--bm-text-2); padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--bm-border-strong); line-height: 22px; }
/* Signature rule: 3px orange gradient, as on the letterhead and title slides */
html.bm-preset-sai body #navbar:after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
	background: linear-gradient(90deg, var(--bm-brand-light), var(--bm-brand), var(--bm-brand-dark)); }
html.bm-preset-sai body.skin-3 #navbar { border-bottom-color: transparent; }
html.bm-preset-sai .bm-kpi-value, html.bm-preset-sai .bm-h1 { letter-spacing: -0.03em; }
html.bm-preset-sai .bm-h1 { font-weight: 800; }
html.bm-preset-sai .bm-stepper li.done .bm-step-dot, html.bm-preset-sai .bm-stepper li.done:before, html.bm-preset-sai .bm-stepper li.current:before { }
html.bm-preset-sai body.login-layout { background: radial-gradient(1100px 520px at 12% -12%, rgba(240,120,48,.14), transparent 60%),
	radial-gradient(900px 480px at 110% 112%, rgba(194,65,12,.10), transparent 60%), var(--bm-bg) !important; }
.bm-login-logo { justify-content: center; margin: 0 auto 6px; }
.bm-login-logo img { height: 64px; width: auto; }
.bm-signature { text-align: center; margin: 18px 0 0; font-weight: 700; font-size: 15px; color: var(--bm-text-2); letter-spacing: -0.01em; }
/* Product capsule: filled with the vertical colour, lowercase white text, no outline */
.bm-vbadge { display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: 999px; background: var(--bm-v, #334155); color: #fff !important;
	font-size: 11.5px; font-weight: 700; letter-spacing: .01em; text-transform: lowercase; white-space: nowrap; line-height: 1; }
.bm-ticket-meta .bm-vbadge:before, .bm-ticket-meta span.bm-vbadge + span:before { }
.bm-ticket-meta .bm-vbadge + span:before { content: none; }
.bm-ticket-meta > .bm-vbadge { margin-left: 2px; }
#buglist .bm-vbadge, .my-buglist-bug .bm-vbadge { margin-right: 6px; vertical-align: 1px; }
.bm-card-top .bm-vbadge { margin-left: 6px; }
.bm-card-foot .bm-vbadge { flex: none; }
html.bm-preset-sai body #navbar:after { bottom: 0; z-index: 5; pointer-events: none; }
html.bm-preset-sai body #navbar { overflow: visible; }
.bm-ticket-meta span.bm-vbadge:before { content: none; }
html.bm-preset-sai body #navbar:after { display: block !important; width: 100%; top: auto; clear: none; visibility: visible; }

/* Configuration page */
.bm-config tr.bm-config-section > td { background: var(--bm-surface-2) !important; padding: 14px 12px 6px !important; }
.bm-config tr.bm-config-section h5 { margin: 0 0 2px; }
.bm-config tr.bm-config-section .bm-config-hint { margin: 0; }
.bm-config-help { display: block; font-weight: 400; font-size: 12.5px; color: var(--bm-muted); margin-top: 3px; line-height: 1.45; max-width: 60ch; }
.bm-config-legend { font-weight: 500; }
.bm-config-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; border: 0; margin: 0; padding: 0; }
.bm-config-checks label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }

/* ---------- v1.5: clients see the essentials ------------------------------ */
html.bm-client .bm-issue-table tr.bm-detail { display: none; }
html.bm-client .bm-issue-table.bm-details-open tr.bm-detail { display: table-row; }
.bm-details-row > td { padding: 8px 12px 10px !important; border-top: 0 !important; }
.bm-details-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 1px solid var(--bm-border); border-radius: var(--bm-radius);
	background: var(--bm-surface-2); color: var(--bm-text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; text-align: left; }
.bm-details-toggle:hover { border-color: var(--bm-border-strong); background: var(--bm-surface-3); }
.bm-details-toggle .fa-info-circle { color: var(--bm-muted); }
.bm-details-hint { font-weight: 400; color: var(--bm-muted); font-size: 12.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-details-chev { color: var(--bm-muted); transition: transform .15s; }
.bm-details-open .bm-details-chev { transform: rotate(180deg); }
html.bm-client .bm-issue-table td.bug-description { font-size: 15px; }
html.bm-client-list #buglist .column-priority, html.bm-client-list #buglist .column-severity,
html.bm-client-list #buglist .column-attachments, html.bm-client-list #buglist .column-edit { display: none !important; }
html.bm-client-list #buglist td.column-summary { font-size: 14.5px; }
.bm-confirm-no[role="button"] { cursor: pointer; }
@media (max-width: 767px) {
	html.bm-client .bm-issue-table.bm-details-open tr.bm-detail { display: grid; }
	.bm-details-hint { display: none; }
}

/* ---------- Markdown editor ---------------------------------------------- */
.bm-md { border: 1px solid var(--bm-border-strong); border-radius: var(--bm-radius); background: var(--bm-surface); overflow: hidden; width: 100%;
	transition: border-color .12s, box-shadow .12s; }
.bm-md:focus-within { border-color: var(--bm-accent); box-shadow: 0 0 0 4px var(--bm-focus); }
.bm-md-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 4px 6px; background: var(--bm-surface-2); border-bottom: 1px solid var(--bm-border); }
.bm-md-tabs { display: flex; gap: 2px; }
.bm-md-tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--bm-muted); cursor: pointer; }
.bm-md-tab[aria-selected="true"] { background: var(--bm-surface); color: var(--bm-text); box-shadow: var(--bm-shadow-sm), 0 0 0 1px var(--bm-border); }
.bm-md-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.bm-md-tools[hidden] { display: none; }
.bm-md-btn { width: 32px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--bm-text-2); display: inline-grid; place-items: center; cursor: pointer; font-size: 13px; }
.bm-md-btn:hover { background: var(--bm-surface-3); color: var(--bm-text); }
.bm-md-sep { width: 1px; height: 18px; background: var(--bm-border-strong); margin: 0 4px; }
body .bm-md textarea { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; width: 100% !important; display: block; resize: vertical; margin: 0; }
body .bm-md textarea:focus { box-shadow: none !important; }
.bm-md-preview { padding: 12px 14px; font-size: 14.5px; line-height: 1.65; color: var(--bm-text); overflow-wrap: anywhere; background: var(--bm-surface) !important; border: 0 !important; }
.bm-md-preview > :first-child { margin-top: 0; } .bm-md-preview > :last-child { margin-bottom: 0; }
.bm-md-preview h1, .bm-md-preview h2, .bm-md-preview h3 { font-size: 16px; margin: 12px 0 6px; }
.bm-md-preview ul, .bm-md-preview ol { padding-left: 22px; }
.bm-md-preview blockquote, .bm-note-body blockquote { border-left: 3px solid var(--bm-border-strong); margin: 8px 0; padding: 2px 12px; color: var(--bm-text-2); }
.bm-md-preview code, .bm-note-body code { background: var(--bm-surface-3); border-radius: 5px; padding: 1px 5px; font-size: .92em; }
.bm-md-preview pre, .bm-note-body pre { background: var(--bm-surface-3); border: 1px solid var(--bm-border); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }
/* Markdown tables (Mantis tags them "table table-nonfluid"): content, not list chrome.
   A grid tinted from the text color, so it reads on any bubble (staff, private) in both themes,
   and words are never split to squeeze a column (the note's break-word would cut "SAL04"). */
body table.table-nonfluid { width: auto; max-width: 100%; margin: 10px 0 14px !important; border-collapse: collapse; font-size: .94em; }
body table.table-nonfluid > thead > tr > th, body table.table-nonfluid > tbody > tr > td {
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent) !important; padding: 7px 12px !important; vertical-align: top;
	word-break: normal; overflow-wrap: break-word; }
body table.table-nonfluid > thead > tr { background: none !important; color: inherit !important; }
body table.table-nonfluid > thead > tr > th { background: color-mix(in srgb, currentColor 10%, transparent) !important; color: inherit !important;
	font-size: inherit !important; font-weight: 700 !important; text-transform: none; letter-spacing: 0; }
body table.table-nonfluid > tbody > tr:nth-child(even) > td { background: color-mix(in srgb, currentColor 4%, transparent) !important; }
.bm-md-foot { padding: 6px 12px; font-size: 12px; color: var(--bm-muted); border-top: 1px dashed var(--bm-border); background: var(--bm-surface); }
.bm-md-previewing .bm-md-foot { display: none; }
@media (max-width: 480px) { .bm-md-btn { width: 30px; } .bm-md-sep { display: none; } }

body .bm-md textarea[hidden], .bm-md-preview[hidden] { display: none !important; }

html.bm-client-list #buglist .bm-handler { display: none; }
html.bm-client-list #buglist td.column-summary { font-weight: 600; }

/* ---------- "How does it work?" ----------------------------------------- */
.bm-help-bar { display: flex; justify-content: flex-end; margin: 4px 0 -4px; }
.bm-help-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--bm-accent-text) !important;
	padding: 4px 10px; border-radius: 999px; text-decoration: none !important; }
.bm-help-link:hover, .bm-help-link:focus-visible { background: var(--bm-accent-soft); }
.bm-help-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.bm-help-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--bm-border); background: var(--bm-surface); color: var(--bm-text-2) !important;
	font-weight: 600; font-size: 14px; text-decoration: none !important; }
.bm-help-tabs a:hover { border-color: var(--bm-accent); }
.bm-help-tabs a[aria-current="page"] { background: var(--bm-accent); border-color: var(--bm-accent); color: var(--bm-on-accent) !important; }
.bm-help-title { font-size: 21px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.02em; }
.bm-help-topic > .bm-lead { margin-bottom: 18px; }
.bm-help-shot { margin: 0 0 30px; }
.bm-help-shot-title { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.bm-help-figure { margin: 0 0 14px; }
.bm-help-frame { position: relative; display: block; max-width: 100%; border: 1px solid var(--bm-border); border-radius: var(--bm-radius-lg);
	overflow: hidden; box-shadow: var(--bm-shadow); background: #fff; cursor: zoom-in; }
.bm-help-frame img { display: block; width: 100%; height: auto; }
.bm-help-mark, .bm-help-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
	background: var(--bm-accent); color: var(--bm-on-accent); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bm-help-mark { position: absolute; transform: translate(-50%, -50%); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(16, 24, 40, .35);
	transition: transform .12s, box-shadow .12s; }
.bm-help-mark.is-active { transform: translate(-50%, -50%) scale(1.35); box-shadow: 0 0 0 6px var(--bm-focus); }
.bm-help-legend { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; }
.bm-help-legend li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; font-size: 14px; color: var(--bm-text-2); padding: 6px 8px; border-radius: var(--bm-radius); }
.bm-help-legend li:hover { background: var(--bm-surface-3); }
.bm-help-legend strong { display: block; color: var(--bm-text); }
.bm-help-go { margin: 4px 0 0; }
@media (max-width: 767px) {
	.bm-help-legend { grid-template-columns: 1fr; }
	.bm-help-mark { width: 20px; height: 20px; font-size: 11px; }
}

/* ---------- Request form: explained categories and priorities ---------- */
.bm-tiles.bm-tiles-described { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.bm-tiles-described .bm-tile { align-items: flex-start; text-align: left; padding: 12px 14px 12px 12px; }
.bm-tile-text { display: flex; flex-direction: column; gap: 3px; }
.bm-tile-name { font-weight: 650; }
.bm-tile-help { font-size: 12.5px; line-height: 1.45; color: var(--bm-muted); font-weight: 400; }
.bm-tile[aria-checked="true"] .bm-tile-help { color: var(--bm-text-2); }
.bm-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.bm-choice { --lvl: var(--bm-muted); display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-radius: var(--bm-radius);
	border: 1px solid var(--bm-border-strong); border-left: 4px solid var(--lvl); background: var(--bm-surface); color: var(--bm-text); cursor: pointer; }
.bm-choice-mid { --lvl: light-dark(#b45309, #fbbf24); }
.bm-choice-high { --lvl: light-dark(#b91c1c, #f87171); }
.bm-choice:hover { border-color: var(--lvl); }
.bm-choice[aria-checked="true"] { border-color: var(--lvl); box-shadow: 0 0 0 1px var(--lvl); background: color-mix(in srgb, var(--lvl) 8%, var(--bm-surface)); }
.bm-choice:focus-visible { outline: 2px solid var(--bm-accent); outline-offset: 2px; }
.bm-choice-name { font-weight: 650; }
.bm-choice-help { font-size: 12.5px; line-height: 1.45; color: var(--bm-text-2); }
.bm-report-note { margin: 8px 0 0; font-size: 12.5px; font-style: italic; color: var(--bm-muted); }

/* ---------- Dialog (forgotten attachment) ------------------------------- */
.bm-dialog { border: 1px solid var(--bm-border); border-radius: var(--bm-radius-lg); padding: 22px 24px 20px; max-width: min(460px, calc(100vw - 32px));
	background: var(--bm-surface); color: var(--bm-text); box-shadow: var(--bm-shadow-lg); }
.bm-dialog::backdrop { background: rgba(16, 24, 40, .45); }
.bm-dialog-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.bm-dialog-title .fa { color: var(--bm-accent-text); }
.bm-dialog-text { margin: 0 0 18px; line-height: 1.55; color: var(--bm-text-2); }
.bm-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
body .bm-btn-ghost { background: transparent !important; border: 1px solid var(--bm-border-strong) !important; color: var(--bm-text) !important; border-radius: var(--bm-radius-sm); }
body .bm-btn-ghost:hover { border-color: var(--bm-accent) !important; }
.bm-dialog-actions .btn .fa { margin-right: 6px; }

/* ---------- Ticket list: quick filters for clients ---------------------- */
.bm-quickfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--bm-border); }
.bm-qf-steps { flex-wrap: wrap; }
.bm-qf-category { min-width: 200px; height: 34px; border-radius: var(--bm-radius-sm); }
#filter .bm-qf-hidden, .bm-ff.bm-qf-hidden { display: none !important; }
/* Filter header: search, reset and pin with room to breathe */
#filter > .widget-header { padding-right: 14px; }
#filter-bar-queries { margin-left: 8px; }
#filter-bar-queries .widget-menu { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 12px !important; vertical-align: middle; }
#filter-bar-queries .widget-menu form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
#filter-bar-queries .btn-xs { min-width: 32px; height: 32px; padding: 0 8px !important; display: inline-grid; place-items: center; }
#filter-bar-queries #filter-bar-search-txt, #filter-bar-queries select { height: 34px; padding: 0 12px; border-radius: var(--bm-radius-sm); min-width: 200px; }
#filter-bar-queries #filter-bar-search-btn { height: 34px; min-width: 34px; }

/* ---------- Contrast pass (audit of every screen, light and dark) -------- */
/* Tabs of Manage and My account: Ace paints them white, unreadable in dark mode */
body .nav-tabs { border-color: var(--bm-border) !important; }
body .nav-tabs > li > a, body .nav-tabs > li > a:focus { background: var(--bm-surface-2) !important; border-color: var(--bm-border) !important; color: var(--bm-text-2) !important; }
body .nav-tabs > li > a:hover { background: var(--bm-surface-3) !important; color: var(--bm-text) !important; }
body .nav-tabs > li.active > a, body .nav-tabs > li.active > a:hover, body .nav-tabs > li.active > a:focus {
	background: var(--bm-surface) !important; color: var(--bm-text) !important; border-bottom-color: var(--bm-surface) !important; }
/* Sub-menus of Manage > Configuration, user filters: the active button */
body .btn-white.active, body .btn.btn-white.active, body .btn-primary.btn-white.active {
	background: var(--bm-accent-soft) !important; color: var(--bm-accent-text) !important; border-color: var(--bm-accent) !important; }
/* Code blocks and inline code everywhere (Ace keeps #333 text) */
body pre, body code, body kbd, body samp { color: var(--bm-text); }
body pre { background: var(--bm-surface-3); border: 1px solid var(--bm-border); border-radius: 8px; }
body code { background: var(--bm-surface-3); border-radius: 5px; padding: 1px 5px; }
body pre code { background: transparent; padding: 0; border-radius: 0; font-size: inherit; }
/* Notes shown outside the ticket page (update page, print) keep Mantis' black text */
body td.bugnote-note, body .bugnote-note p, body .bugnote-note li { color: var(--bm-text); }
/* Project menu of the navbar (Ace "yellow" dropdown with #333 links) */
body .dropdown-yellow .list a, body #projects-list a.project-link { color: var(--bm-text-2) !important; }
body .dropdown-yellow .list a:hover, body #projects-list a.project-link:hover { background: var(--bm-accent-soft) !important; color: var(--bm-accent-text) !important; }
/* Current page of a pagination on the accent colour */
body .pagination > .active > a, body .pagination > .active > span, body .pagination a.page.active { color: var(--bm-on-accent) !important; }
/* Manage > Plugins: dependency states */
body .dependency_met { color: light-dark(#067647, #75e0a7); }
body .dependency_unmet { color: light-dark(#b42318, #fda29b); }
body .dependency_dated, body .dependency_upgrade { color: light-dark(#93370d, #fdb022); }
/* Manage > Configuration: Mantis' colour legend (light backgrounds) */
/* Roadmap and changelog: category labels */
body .label-light, body .label.label-light { background: var(--bm-surface-3) !important; color: var(--bm-text-2) !important; }
body .label-light strong { color: var(--bm-text); }
/* Summary page: + / - deltas */
body td.red, body span.red { color: light-dark(#b42318, #fda29b) !important; }
body td.green, body span.green { color: light-dark(#067647, #75e0a7) !important; }
/* Manage > Configuration: Mantis' legend colours, toned down in dark mode */
body .color-global { background-color: light-dark(#d1e9ff, #102a56) !important; color: var(--bm-text) !important; }
body .color-project { background-color: light-dark(#d3f8df, #053321) !important; color: var(--bm-text) !important; }

/* ---------- Team board: full width, fits the window ---------------------
   The content area is capped at 1480px: the board may use the whole screen. It fits the window
   height, each column scrolls on its own, so the horizontal scrollbar stays at the bottom of the
   screen instead of below the longest column. */
body .page-content:has(.bm-board:not(.bm-pboard)) { max-width: none; }
@media (min-width: 768px) {
	.bm-board:not(.bm-pboard) { height: max(360px, calc(100vh - var(--bm-board-top, 240px))); align-items: stretch; padding-bottom: 10px; }
	.bm-board:not(.bm-pboard) > .bm-col { display: flex; flex-direction: column; min-height: 0; }
	.bm-board:not(.bm-pboard) > .bm-col > .bm-col-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 2px 2px; margin: -2px -4px -2px -2px; }
}

/* ---------- Copy "@username" next to people ----------------------------- */
.bm-mention { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--bm-muted); padding: 1px 5px; margin-left: 2px;
	border-radius: 6px; font-size: 12px; line-height: 1.4; cursor: pointer; vertical-align: baseline; }
.bm-mention:hover, .bm-mention:focus-visible { color: var(--bm-accent-text); background: var(--bm-accent-soft); outline: none; }
.bm-mention.is-copied { color: var(--bm-ok-fg); }
.bm-mention.is-copied .fa-at:before { content: "\f00c"; }
.bm-mention-done { font-weight: 600; white-space: nowrap; }
.bm-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.bm-card-foot .bm-muted, .bm-card-foot .bm-reply-badge { white-space: nowrap; }

/* ---------- Advanced filters, compact ------------------------------------
   One line per criterion ("Label ▾ value"); the active ones first, those still at "any" behind
   "All criteria (n)". */
.bm-ff-source { display: none !important; }
.bm-ff-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px 0; font-size: 13px; color: var(--bm-muted); }
.bm-ff-more { margin-left: auto; border: 1px solid var(--bm-border-strong); background: var(--bm-surface); color: var(--bm-text-2); border-radius: 999px;
	padding: 4px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.bm-ff-more:hover, .bm-ff-more:focus-visible { border-color: var(--bm-accent); color: var(--bm-accent-text); }
.bm-ff-grid { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 12px; }
.bm-ff { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 5px 10px; border: 1px solid var(--bm-border);
	border-radius: 999px; background: var(--bm-surface); max-width: 100%; min-width: 0; }
.bm-ff-label a { font-size: 12.5px; font-weight: 600; color: var(--bm-accent-text) !important; text-decoration: none !important; white-space: nowrap; }
.bm-ff-label a::after { content: " ▾"; font-size: 10px; }
.bm-ff-label a:hover { text-decoration: underline !important; }
.bm-ff > td { display: inline; padding: 0 !important; border: 0 !important; background: none !important; font-size: 13px; color: var(--bm-text); overflow-wrap: anywhere; }
.bm-ff > td br { display: none; }
.bm-ff.is-open { border-radius: var(--bm-radius); flex-basis: 100%; }
.bm-ff.is-open > td { display: block; width: 100%; padding-top: 4px !important; }
.bm-ff.is-open > td br { display: initial; }
.bm-ff > td select, .bm-ff > td input[type=text] { max-width: 100%; }
.bm-ff.is-default { border-style: dashed; background: transparent; }
.bm-ff.is-default > td { color: var(--bm-muted); }
.bm-ff:not(.is-default) { border-color: var(--bm-accent); background: var(--bm-accent-soft); }
.bm-ff-grid:not(.bm-ff-all) > .bm-ff.is-default:not(.is-open), .bm-ff-grid:not(.bm-ff-all) > .bm-ff.is-default.is-static { display: none; }
/* Static form (advanced filter page, saved filter): the editors are already open, cells as cards */
.bm-ff.is-static { flex-basis: 180px; flex-grow: 1; display: flex; flex-direction: column; align-items: stretch; border-radius: var(--bm-radius); }
.bm-ff.is-static .bm-ff-label > td { display: block; padding: 0 !important; border: 0 !important; background: none !important; font-size: 12.5px; font-weight: 600; color: var(--bm-accent-text); }
.bm-ff.is-static > td { display: block; padding-top: 4px !important; }
.bm-ff.is-static > td select { max-width: 100%; }
.bm-ff.is-static, .bm-ff.is-static * { overflow-wrap: normal; }
.bm-ff.is-static .bm-ff-label, .bm-ff.is-static .bm-ff-label * { font-size: 12.5px !important; font-weight: 600 !important; line-height: 1.35; }
/* Criteria with several fields (dates, sort): a wider card, the inner table as a plain block */
.bm-ff.is-wide { flex-basis: 360px; }
.bm-ff.is-static table, .bm-ff.is-static tbody, .bm-ff.is-static tr { display: block; width: auto; background: transparent !important; border: 0 !important; }
.bm-ff.is-static table td { display: inline-block; padding: 2px 6px 2px 0 !important; border: 0 !important; background: none !important; vertical-align: middle; white-space: nowrap; }

/* ---------- v1.6: findings of the October 2026 audit ---------------------- */
/* Top bar: Ace paints the menu chevrons and the user icon white, invisible on the light bar */
body .ace-nav > li > a .ace-icon.white, body .ace-nav > li > a .fa-angle-down, body .ace-nav > li > a .fa-caret-down { color: var(--bm-muted) !important; }
body .ace-nav > li > a.bm-user-toggle { font-weight: 600; color: var(--bm-text) !important; }
/* Login: visible label, a quiet way out, no "back to top" on a one-screen page */
.bm-login-label { display: block; font-weight: 600; font-size: 13.5px; color: var(--bm-text-2); margin-bottom: 6px; }
.bm-login-forgot { display: block; text-align: center; margin-top: 8px; padding: 6px 0; font-size: 13.5px; color: var(--bm-accent-text) !important; }
body.login-layout .btn-scroll-up { display: none !important; }
/* Dead-end page */
.bm-message { max-width: 640px; margin: 24px auto; }
.bm-message .bm-empty-icon { color: var(--bm-muted); }
.bm-message-title { font-size: 20px; font-weight: 700; margin: 4px 0 10px; text-align: center; }
.bm-message p { text-align: center; }
.bm-message-contact { color: var(--bm-text-2); margin-top: 8px; }
.bm-message-contact a { text-decoration: underline !important; font-weight: 600; display: inline-block; padding: 3px 0; }
.bm-message-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.bm-auth-page.bm-message .btn-block { margin-top: 18px; }
.bm-error-page .bm-empty-icon { color: var(--bm-warn-fg); }
.bm-error-page .bm-error-text { color: var(--bm-text); font-weight: 600; }
.bm-error-code { color: var(--bm-muted); font-size: 12px; margin: 16px 0 0; }
.bm-auth-page.bm-error-page .btn-block + .btn-block { margin-top: 8px; }
.bm-error-details { max-width: 960px; margin: 0 auto 24px; text-align: left; }
.bm-error-details summary { cursor: pointer; color: var(--bm-text-2); font-weight: 600; padding: 6px 0; }
/* Portal: figures lead to their section; resolved tickets to check are an action */
a.bm-kpi { display: grid; text-decoration: none !important; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.bm-kpi:hover, a.bm-kpi:focus-visible { border-color: var(--bm-accent); box-shadow: var(--bm-shadow-lg); }
.bm-ticket-verify { border-left: 4px solid var(--bm-ok-fg) !important; }
.bm-ticket-ask { color: var(--bm-ok-fg); }
.bm-ticket-ask .bm-ticket-ask-icon { margin-right: 6px; }
section[id^="bm-s-"] { scroll-margin-top: calc(var(--bm-navbar-h) + 16px); }
/* Priorities: a long status pill wraps inside the card instead of overflowing it */
.bm-card-top { flex-wrap: wrap; gap: 4px 6px; }
.bm-card-top .bm-pill { max-width: 100%; white-space: normal; text-align: left; }
/* Report form: product tiles, similar requests, drafts */
.bm-tiles-product .bm-tile .bm-vbadge { margin: 0; }
.bm-similar { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--bm-warn-border); background: var(--bm-warn-bg); border-radius: var(--bm-radius); }
.bm-similar-title { font-weight: 600; color: var(--bm-warn-fg); margin: 0 0 2px; }
.bm-similar-hint { font-size: 13px; color: var(--bm-text-2); margin: 0 0 8px; }
.bm-similar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bm-similar li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bm-similar li a { color: var(--bm-text) !important; font-weight: 500; }
.bm-draft-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; padding: 8px 12px; border-radius: var(--bm-radius-sm);
	background: var(--bm-accent-soft); color: var(--bm-text-2); font-size: 13.5px; }
.bm-draft-note .fa { color: var(--bm-accent-text); }
.bm-linkbtn { border: 0; background: none; padding: 4px 2px; color: var(--bm-accent-text); font-weight: 600; text-decoration: underline; cursor: pointer; margin-left: auto; }
/* Filter values separated (", ") while the criterion is folded */
.bm-ff.is-open .bm-ff-sep { display: none; }
/* Account: a section title before the optional password change */
tr.bm-form-section > td { font-weight: 700; color: var(--bm-text) !important; padding-top: 18px !important; background: var(--bm-surface-2) !important; }
/* Release notes and roadmap: brand typography, readable percentage */
body .page-header h1 { color: var(--bm-text) !important; font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
body .page-header h1 strong { color: var(--bm-text); }
body .progress[data-percent]:after { color: var(--bm-text-2) !important; text-shadow: none !important; font-weight: 600; }
body ul.roadmap li, body .widget-main ul li { line-height: 2; }
/* My View: empty boxes say so */
tr.bm-empty-row > td { color: var(--bm-muted); font-style: italic; text-align: center; padding: 14px !important; }
/* Kanban: status names start with a capital, overflow is announced */
.bm-col-head h2::first-letter { text-transform: uppercase; }
.bm-board-scroll { white-space: nowrap; }
.bm-avatar-empty { background: transparent !important; border: 1px dashed var(--bm-border-strong); color: var(--bm-muted) !important; }
/* Summary: wide tables scroll inside their card instead of being cut off */
body .widget-box.table-responsive { overflow-x: auto !important; overflow-y: hidden !important; }
#buglist span.project a { text-decoration: none !important; }
#buglist span.project .bm-vbadge { margin-right: 6px; }
/* Release notes: the version description is a note, not a warning */
.bm-version-note { background: var(--bm-surface-2); border: 1px solid var(--bm-border); border-radius: var(--bm-radius); padding: 10px 14px; color: var(--bm-text-2); }
.bm-version-note p { margin: 0; }
/* Team issue page: "Delete" set apart and marked as dangerous */
form.bm-danger-form { margin-left: auto !important; }
body .btn.bm-btn-danger, body input.bm-btn-danger { color: var(--bm-danger, #b42318) !important; border-color: color-mix(in srgb, #b42318 45%, transparent) !important; }
body .btn.bm-btn-danger:hover, body input.bm-btn-danger:hover { background: #fef3f2 !important; }
/* Team list: dates on one line */
#buglist td.column-last-modified, #buglist td.column-date-submitted { white-space: nowrap; }
/* Kanban on a phone: one column at a time, snapping, the next one peeking */
@media (max-width: 767px) {
	.bm-board:not(.bm-pboard) { scroll-snap-type: x mandatory; grid-auto-columns: 84vw !important; }
	.bm-board:not(.bm-pboard) > .bm-col { scroll-snap-align: start; }
}
/* Portal: a long section ends with a way to the full list */
.bm-portal-more { display: block; text-align: center; padding: 12px; border: 1px dashed var(--bm-border-strong); border-radius: var(--bm-radius); color: var(--bm-accent-text) !important; font-weight: 600; }
.bm-portal-more:hover { background: var(--bm-accent-soft); }
/* Kanban without dragging: pick a card, then a column */
.bm-board-move { border: 1px solid var(--bm-border-strong); background: var(--bm-surface); color: var(--bm-text-2); border-radius: var(--bm-radius-sm);
	min-height: 36px; padding: 0 12px; font-weight: 600; cursor: pointer; }
.bm-board-move[aria-pressed="true"] { background: var(--bm-accent); color: var(--bm-on-accent); border-color: var(--bm-accent); }
.bm-board-move-hint { margin: 8px 0 0; font-size: 13.5px; color: var(--bm-accent-text); font-weight: 600; min-height: 1em; }
.bm-board-move-hint:empty { display: none; }
.bm-moving .bm-col-head { cursor: pointer; outline: 2px dashed var(--bm-border-strong); outline-offset: -2px; border-radius: var(--bm-radius-sm); }
.bm-moving .bm-col-head:hover, .bm-moving .bm-col-head:focus-visible { outline-color: var(--bm-accent); background: var(--bm-accent-soft); }
.bm-card.bm-picked { outline: 3px solid var(--bm-accent); outline-offset: 2px; }
/* One-click opinion after the confirmation */
.bm-rating { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--bm-border); }
.bm-rating-ask { flex-basis: 100%; margin: 0 0 2px; font-weight: 600; color: var(--bm-text); }
.bm-rating-btn { min-height: 36px; }
.bm-confirm { flex-wrap: wrap; }
/* Board: a client's reply waiting too long, and the satisfaction of the last 90 days */
.bm-reply-badge time { font-weight: 500; }
.bm-reply-badge.bm-reply-late { background: var(--bm-warn-bg) !important; color: var(--bm-warn-fg) !important; border: 1px solid var(--bm-warn-border); }
.bm-csat { margin: 4px 0 0; font-size: 13.5px; color: var(--bm-text-2); }
.bm-csat .fa { color: #f79009; }
/* Report form: sub-projects under their parent; multiple choices as toggles */
.bm-tiles-product .bm-tile-sub { border-style: dashed; }
.bm-tiles-product .bm-tile .bm-tile-text { display: grid; gap: 2px; text-align: left; }
.bm-tiles-product .bm-tile-help { font-size: 12.5px; color: var(--bm-muted); font-weight: 400; }
.bm-chips-hint { margin: 0 0 6px; font-size: 13px; color: var(--bm-muted); }
.bm-chips { display: flex; flex-wrap: wrap; gap: 8px; border-radius: var(--bm-radius); }
.bm-chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--bm-border-strong); background: var(--bm-surface); color: var(--bm-text-2); font-weight: 500; cursor: pointer; }
.bm-chip .fa { display: none; }
.bm-chip[aria-pressed="true"], .bm-chip[aria-checked="true"] { background: var(--bm-accent-soft); border-color: var(--bm-accent); color: var(--bm-accent-text); font-weight: 600; }
.bm-chip[aria-pressed="true"] .fa, .bm-chip[aria-checked="true"] .fa { display: inline-block; }
.bm-chip:hover { border-color: var(--bm-accent); }
.bm-chips.bm-invalid { outline: 2px solid var(--bm-danger, #b42318); outline-offset: 4px; }
/* Login: Mantis' own "forgotten password" link (when the feature is on), centred and easy to hit */
body.login-layout .login-container a[href*="lost_pwd_page"] { display: block; float: none !important; text-align: center; margin-top: 8px; padding: 6px 0;
	font-size: 13.5px; color: var(--bm-accent-text) !important; }
/* "No, still a problem": the reply form says what sending will do */
.bm-reject-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; padding: 8px 12px; border-radius: var(--bm-radius-sm);
	background: var(--bm-warn-bg); border: 1px solid var(--bm-warn-border); color: var(--bm-warn-fg); font-size: 13.5px; font-weight: 500; }
/* Private note: a label on the bubble, and the composer takes the same look while "private" is ticked */
.bm-private-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 2px 10px; border-radius: 999px;
	background: var(--bm-private-border); color: light-dark(#fff, #2a0619); font-size: 12px; font-weight: 700; letter-spacing: .01em; }
form.bm-composing-private .bm-md, form.bm-composing-private textarea#bugnote_text { border-color: var(--bm-private-border) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bm-private-border) 25%, transparent); }
form.bm-composing-private .bm-md { background: var(--bm-private-bg); }
.bm-private-compose { display: none; margin: 0 0 8px; padding: 8px 12px; border-radius: var(--bm-radius-sm); background: var(--bm-private-bg);
	border: 1px solid var(--bm-private-border); color: var(--bm-private-fg); font-size: 13.5px; font-weight: 600; }
form.bm-composing-private .bm-private-compose { display: flex; align-items: center; gap: 8px; }
form.bm-composing-private input[type=submit].bm-btn-primary { background: var(--bm-private-border) !important; border-color: var(--bm-private-border) !important; }

/* ---------- Summary > "Open issues" chart (pages/open_trend.php) ---------- */
.bm-open-trend .widget-toolbar { line-height: 36px; }
.bm-ot-periods .btn.active { background: var(--bm-accent) !important; border-color: var(--bm-accent) !important; color: #fff !important; }
.bm-ot-intro { color: var(--bm-text-2); margin: 0 0 14px; max-width: 72ch; }
.bm-ot-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
.bm-ot-figures > div { background: var(--bm-surface-2); border: 1px solid var(--bm-border); border-radius: var(--bm-radius-sm, 8px); padding: 10px 14px; }
.bm-ot-figures dt { color: var(--bm-muted); font-size: 12.5px; font-weight: 500; }
.bm-ot-figures dd { margin: 2px 0 0; color: var(--bm-text); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bm-ot-figures dd small { color: var(--bm-muted); font-size: 12.5px; font-weight: 500; }
.bm-ot-figures dd.bm-ot-up { color: light-dark(#b42318, #f97066); }
.bm-ot-figures dd.bm-ot-down { color: light-dark(#067647, #47cd89); }
.bm-ot-figures dd.bm-ot-landmark { margin-top: 2px; font-size: 12.5px; font-weight: 600; font-variant-numeric: normal; cursor: help; }
.bm-ot-chart { position: relative; height: 360px; }
.bm-ot-note { color: var(--bm-muted); margin: 12px 0 0; }
@media (max-width: 600px) { .bm-ot-chart { height: 260px; } .bm-ot-figures { grid-template-columns: 1fr 1fr; } .bm-ot-figures dd { font-size: 20px; } .bm-open-trend .widget-toolbar { float: none; line-height: normal; padding: 0 0 8px; } }
