/* ==========================================================================
   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);
	--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); }
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: #d92d20; }
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); }
input.ace[type=radio] + .lbl::before { border-radius: 50%; }
input.ace:checked + .lbl::before { background: var(--bm-accent-soft); border-color: var(--bm-accent); color: var(--bm-accent); }
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; }

/* 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: #fef3f2; color: #912018; border-color: #fecdca; }
body .alert-success { background: #ecfdf3; color: #054f31; border-color: #abefc6; }
body .alert-warning { background: var(--bm-warn-bg); color: var(--bm-warn-fg); border-color: var(--bm-warn-border); }
body .alert-info { background: #eff8ff; color: #194185; border-color: #b2ddff; }

/* ---------- 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; }
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-warn-bg); border-color: var(--bm-warn-border); }
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) 55% 30%), 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-border-strong); }
.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; align-items: center; gap: 8px; font-size: 12px; }
.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; }
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-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; }
.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 { 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; }
