/* =========================================================================
   MRCM overrides on top of Tixia v4.0 (style.css is untouched apart from
   removing its @import lines). Load order: bootstrap-icons subset, style.css,
   this file.
   1. Brand + contrast tokens   2. Shell (logo, sidebar, header)
   3. Accessibility             4. MRCM components   5. Pages   6. Dark mode
   ========================================================================= */

/* ---------- 1. Brand + contrast tokens ----------
   Owner theme (UI audit, 2026-10-13): navy blue + soft white. Navy #1F3A68 is the primary (buttons, links, focus),
   #13294B the sidebar / header brand surface, #F7F8FA the soft-white app background, white cards.
   Every text/background pair is AA; ratios listed in docs/v2-teams/ui-audit.md section 3. */
body[data-primary=color_3] {
  --mrcm-blue: #1F3A68;          /* primary navy (was the classic #3D60AB blue) */
  --mrcm-blue-dark: #172E54;
  --mrcm-navy: #13294B;          /* sidebar, header logo bar, pressed pills */
  --mrcm-soft-white: #F7F8FA;    /* app background, sidebar text */
  --bs-body-bg: #FFFFFF;         /* cards */
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-secondary-bg: #F7F8FA;    /* page background (Tixia paints body with --bs-secondary-bg) */
  --bs-secondary-bg-rgb: 247, 248, 250;
  --bs-tertiary-bg: #F1F3F7;
  --mrcm-accent: #0B6B61;        /* the one accent: covered / totals */
  --mrcm-accent-subtle: #E1F3F0;
  --mrcm-muted: #5A6278;
  --mrcm-line: #E1E5EC;
  --mrcm-line-strong: #8A93A6;
  --mrcm-surface-2: #F1F3F7;

  --bs-primary: #1F3A68;
  --bs-primary-rgb: 31, 58, 104;
  --bs-primary-text-emphasis: #172E54;
  --bs-primary-bg-subtle: #E8EDF5;
  --bs-primary-border-subtle: #BAC6DA;
  --bs-link-color: #1F3A68;
  --bs-link-color-rgb: 31, 58, 104;
  --bs-link-hover-color: #172E54;
  --bs-link-hover-color-rgb: 23, 46, 84;

  --bs-secondary: #0B6B61;
  --bs-secondary-rgb: 11, 107, 97;
  --bs-secondary-bg-subtle: #E1F3F0;
  --bs-success: #146C35;
  --bs-success-rgb: 20, 108, 53;
  --bs-success-bg-subtle: #E6F4E9;
  --bs-info: #1B64A3;
  --bs-info-rgb: 27, 100, 163;
  --bs-info-bg-subtle: #E5F0FA;
  --bs-warning: #8A4B00;
  --bs-warning-rgb: 138, 75, 0;
  --bs-warning-bg-subtle: #FFF3DC;
  --bs-danger: #B42318;
  --bs-danger-rgb: 180, 35, 24;
  --bs-danger-bg-subtle: #FDECEA;

  --bs-body-color: #3B4357;      /* Tixia default #7e7e7e is 3.9:1, below AA */
  --bs-body-color-rgb: 74, 81, 99;
  --bs-heading-color: #13213D;
  --bs-secondary-color: #5A6278;
  --bs-border-color: #DDE2EC;
  --bs-form-invalid-color: #B42318;
  --bs-form-invalid-border-color: #B42318;
  --bs-form-valid-color: #146C35;
  --bs-form-valid-border-color: #146C35;
  --bs-focus-ring-color: rgba(31, 58, 104, .35);

  --nav-headbg: #13294B;
  --sidebar-bg: #13294B;
}
body[data-primary=color_3] .btn-primary {
  --bs-btn-bg: #1F3A68; --bs-btn-border-color: #1F3A68;
  --bs-btn-hover-bg: #172E54; --bs-btn-hover-border-color: #172E54;
  --bs-btn-active-bg: #12243F; --bs-btn-active-border-color: #12243F;
  --bs-btn-disabled-bg: #1F3A68; --bs-btn-disabled-border-color: #1F3A68;
  --bs-btn-focus-shadow-rgb: 31, 58, 104;
}
body[data-primary=color_3] .btn-outline-primary {
  --bs-btn-color: #1F3A68; --bs-btn-border-color: #1F3A68;
  --bs-btn-hover-bg: #1F3A68; --bs-btn-hover-border-color: #1F3A68; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #172E54; --bs-btn-active-color: #fff;
}
body[data-primary=color_3] .btn-secondary { --bs-btn-bg: #0B6B61; --bs-btn-border-color: #0B6B61; --bs-btn-hover-bg: #095A51; --bs-btn-hover-border-color: #095A51; --bs-btn-color: #fff; --bs-btn-hover-color: #fff; }
body[data-primary=color_3] .btn-danger { --bs-btn-bg: #B42318; --bs-btn-border-color: #B42318; --bs-btn-hover-bg: #921C13; --bs-btn-hover-border-color: #921C13; }
body[data-primary=color_3] .btn-success { --bs-btn-bg: #146C35; --bs-btn-border-color: #146C35; --bs-btn-hover-bg: #0F5629; --bs-btn-hover-border-color: #0F5629; }
.btn-light { --bs-btn-color: #13213D; }

body { font-size: 0.9375rem; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--bs-heading-color); }
.text-muted-mrcm { color: var(--mrcm-muted) !important; }
.fs-13 { font-size: .8125rem !important; }
.tnum { font-variant-numeric: tabular-nums; }
.text-accent { color: var(--mrcm-accent) !important; }

/* Light (subtle) badges at AA contrast. Status never relies on colour alone: each badge also carries an icon. */
.badge { font-weight: 600; }
.light.badge-primary { color: #172E54; background: #E8EDF5; }
.light.badge-success { color: #146C35; background: #E6F4E9; }
.light.badge-warning { color: #8A4B00; background: #FFF3DC; }
.light.badge-danger { color: #B42318; background: #FDECEA; }
.light.badge-info { color: #1B64A3; background: #E5F0FA; }
.light.badge-secondary { color: #0B6B61; background: #E1F3F0; }
.light.badge-dark { color: #3E4556; background: #EEF0F4; }
.badge .bi { margin-right: 4px; }
.avatar.light-primary { background: #E8EDF5; color: #172E54; }
.avatar.light-success { background: #E6F4E9; color: #146C35; }
.avatar.light-warning { background: #FFF3DC; color: #8A4B00; }
.avatar.light-danger { background: #FDECEA; color: #B42318; }
.avatar.light-info { background: #E5F0FA; color: #1B64A3; }
.avatar { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.avatar.avatar-sm { width: 2.25rem; height: 2.25rem; font-size: .8125rem; }
.avatar.avatar-md { width: 2.75rem; height: 2.75rem; font-size: 1rem; }
.avatar-primary { background: #1F3A68; color: #fff; }

/* ---------- 2. Shell ---------- */
.nav-header .brand-logo { padding-left: 1.25rem; padding-right: 1rem; }
.mrcm-logo-full { width: 168px; height: auto; }
.mrcm-logo-mark { display: none; width: 40px; height: 40px; }
[data-sidebar-style=mini] .mrcm-logo-full,
#main-wrapper.menu-toggle .mrcm-logo-full { display: none; }
[data-sidebar-style=mini] .mrcm-logo-mark,
#main-wrapper.menu-toggle .mrcm-logo-mark { display: block; }
[data-sidebar-style=overlay] .mrcm-logo-full { display: none; }
[data-sidebar-style=overlay] .mrcm-logo-mark { display: block; }
[data-sidebar-style=overlay] #main-wrapper.menu-toggle .mrcm-logo-full { display: none; }

.nav-control .hamburger { background: transparent; border: 0; padding: 0; width: 44px; height: 44px; display: grid; place-content: center; gap: 0; }
.nav-control { display: flex; align-items: center; }

.deznav .metismenu > li > a { color: #fff; display: flex !important; align-items: center; gap: .75rem; padding: .75rem 1rem !important; width: 100%; min-height: 44px; }
.deznav .metismenu > li > a .bi { font-size: 1.15rem; color: #fff; width: 1.4rem; text-align: center; }
.deznav .metismenu > li > a:hover, .deznav .metismenu > li > a:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
body[data-sidebarbg] .deznav .metismenu > li > a i { position: static !important; margin: 0 !important; width: 1.4rem; height: auto; line-height: 1; background: none !important; display: inline-block; padding: 0; }
body[data-sidebarbg] .deznav .metismenu > li > a { color: #fff !important; }
body[data-sidebarbg] .deznav .metismenu > li > a i { color: #fff !important; }
body[data-sidebarbg] .deznav .metismenu > li.mm-active > a { background: #fff !important; color: #172E54 !important; font-weight: 600; }
body[data-sidebarbg] .deznav .metismenu > li.mm-active > a i { color: #172E54 !important; }
body[data-sidebarbg] .deznav .metismenu > li:not(.mm-active):hover > a { background: rgba(255,255,255,.14) !important; }
.deznav .metismenu { padding: 1rem .75rem; }
.deznav .metismenu > li > a .nav-text { display: flex; align-items: center; gap: .5rem; flex: 1; }
.nav-later { opacity: .92; }
.nav-later-tag { margin-left: auto; font-size: .6875rem; font-weight: 600; border: 1px solid rgba(255,255,255,.6); border-radius: 1rem; padding: 0 .5rem; line-height: 1.4; }
.deznav-footer { padding: 0 1.25rem 1.25rem; }
.deznav-help { display: flex; gap: .5rem; color: #fff; font-size: .8125rem; line-height: 1.4; background: rgba(255,255,255,.1); padding: .75rem; border-radius: .5rem; }
[data-sidebar-style=mini] .deznav-footer, #main-wrapper.menu-toggle .deznav-footer { display: none; }
[data-sidebar-style=mini] .deznav .metismenu > li > a .nav-text,
[data-sidebar-style=mini] .deznav .metismenu > li > a > .badge { display: none; }
[data-sidebar-style=mini] .deznav .metismenu > li > a { justify-content: center; padding: .75rem !important; }
[data-sidebar-style=overlay] #main-wrapper.menu-toggle .deznav .metismenu > li > a .nav-text { display: flex; }

.header .dashboard_bar { color: #13213D; font-weight: 600; }
.header-right .nav-link.bell-btn,
.header-right .nav-link.profile-btn { background: transparent; border: 0; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; min-width: 44px; color: #13213D; position: relative; padding: .25rem .5rem; border-radius: .5rem; }
.header-right .nav-link.bell-btn { justify-content: center; font-size: 1.25rem; background: var(--bs-primary-bg-subtle); color: #172E54; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; background: #B42318; color: #fff; font-size: .6875rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; line-height: 1; }
.bell-count:empty, .bell-count[data-zero] { display: none; }
.profile-name { line-height: 1.2; font-size: .8125rem; color: #13213D; }
.header-right .search-area { width: 22rem; }
.header-right .search-area .form-control { min-height: 44px; }
.header-right .search-area .input-group-text { height: auto; min-height: 44px; } /* 2.0.1: same height as the box, so the borders line up */
.notif-menu { width: min(380px, calc(100vw - 2rem)); }
.notif-list { max-height: 60vh; overflow: auto; padding: 0 .5rem; }
.notif-item { display: flex; gap: .75rem; padding: .75rem .5rem; border-top: 1px solid var(--mrcm-line); }
.notif-item:first-child { border-top: 0; }
.notif-item.is-unread { background: #F0F3F8; border-radius: .5rem; }
.notif-title { margin: 0; font-weight: 600; color: #13213D; font-size: .875rem; }
.notif-item.is-unread .notif-title::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #1F3A68; vertical-align: middle; }
.notif-sub, .notif-when { margin: 0; font-size: .8125rem; color: var(--mrcm-muted); }
.page-title h1 { font-size: 1.125rem; margin: 0; font-weight: 600; color: #13213D; }
.page-title .breadcrumb { align-items: center; gap: .25rem; flex-wrap: wrap; }
.page-title .breadcrumb > li:first-child { margin-right: 1rem; }
.footer .copyright p { color: var(--mrcm-muted); }

/* ---------- 3. Accessibility ---------- */
:focus-visible { outline: 3px solid #1F3A68 !important; outline-offset: 2px; }
.deznav :focus-visible { outline-color: #fff !important; }
.form-control:focus, .form-select:focus { border-color: #1F3A68; box-shadow: 0 0 0 .2rem rgba(31, 58, 104, .3); }
.form-control, .form-select { min-height: 44px; font-size: 1rem; color: #13213D; border-color: var(--mrcm-line-strong); }
.form-control::placeholder { color: #6A7184; }
.form-control[readonly] { background: var(--mrcm-surface-2); border-style: dashed; }
.form-label { color: #13213D; font-weight: 500; }
.form-text { color: var(--mrcm-muted); }
.form-check-input { width: 1.25rem; height: 1.25rem; border-color: var(--mrcm-line-strong); }
.form-check { min-height: 44px; display: flex; align-items: flex-start; gap: .5rem; padding-top: .5rem; }
.form-check .form-check-input { margin-left: 0; float: none; flex: none; margin-top: .1rem; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.btn-xs { min-height: 32px; }
.req { color: #B42318; }
.invalid-feedback { color: #B42318; font-weight: 500; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 2000; background: #fff; color: #172E54; padding: .75rem 1rem; border-radius: .5rem; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.skip-link:focus { top: 1rem; }
#main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- 4. MRCM components ---------- */
.card { box-shadow: 0 1px 2px rgba(20, 37, 74, .04), 0 4px 14px rgba(20, 37, 74, .05); }
.card.h-auto { height: auto; }
.card-header { gap: .75rem; flex-wrap: wrap; }
.card-title { color: #13213D; }
.card-header p { margin: 0; color: var(--mrcm-muted); font-size: .875rem; }
.section-gap { margin-bottom: 1.875rem; }

/* Certificate card: the one bold element (security-print guilloche) */
.mrcm-cert { position: relative; overflow: hidden; border-radius: 1rem; color: #fff; padding: 1.75rem;
  background-color: #14254A;
  background-image: url("../img/guilloche.svg"), url("../img/guilloche.svg"), linear-gradient(135deg, #172E54 0%, #1C3366 45%, #14254A 100%);
  background-size: 520px, 300px, auto; background-position: right -170px top -150px, left -150px bottom -170px, 0 0; background-repeat: no-repeat; }
.mrcm-cert::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.2); border-radius: .75rem; pointer-events: none; }
.mrcm-cert > * { position: relative; z-index: 1; }
.mrcm-cert h2, .mrcm-cert h3 { color: #fff; }
.mrcm-cert .cert-kicker { color: #D3DDF2; font-size: .875rem; margin: 0; }
.mrcm-cert .cert-no { letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.mrcm-cert dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 1.5rem 0 0; }
.mrcm-cert dt { color: #D3DDF2; font-size: .75rem; font-weight: 500; }
.mrcm-cert dd { margin: 2px 0 0; font-weight: 600; font-size: 1rem; font-variant-numeric: tabular-nums; }
.mrcm-cert .badge.cert-badge { background: #DDF5EF; color: #0B5A51; }
.mrcm-cert .btn-light { background: #fff; color: #14254A; border-color: #fff; }
.mrcm-cert .btn-light:hover { background: #E5ECFA; }
.mrcm-cert .btn-outline-light { color: #fff; border-color: rgba(255,255,255,.6); }
.mrcm-cert .btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.mrcm-cert :focus-visible { outline-color: #fff !important; }
@media (min-width: 768px) { .mrcm-cert { padding: 2rem 2.25rem; } .mrcm-cert dl { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cert-meter { margin-top: 1.5rem; }
.cert-meter .bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.cert-meter .bar > span { display: block; height: 100%; border-radius: 4px; background: #7FE0D2; }
.cert-meter .legend { display: flex; justify-content: space-between; gap: 1rem; font-size: .75rem; color: #D3DDF2; margin-top: 6px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.cert-meter .legend strong { color: #fff; }

/* Status stepper (horizontal on wide screens, vertical on phones) */
.mrcm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.mrcm-steps li { position: relative; display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; padding-bottom: 1.25rem; }
.mrcm-steps li:last-child { padding-bottom: 0; }
.mrcm-steps li::before { content: ""; position: absolute; left: calc(1rem - 1px); top: 2rem; bottom: 0; width: 2px; background: var(--mrcm-line); }
.mrcm-steps li:last-child::before { display: none; }
.mrcm-steps li.done::before { background: var(--mrcm-accent); }
.mrcm-steps .mark { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--mrcm-line-strong); background: #fff; color: var(--mrcm-muted); z-index: 1; font-size: .875rem; }
.mrcm-steps .done .mark { background: var(--mrcm-accent); border-color: var(--mrcm-accent); color: #fff; }
.mrcm-steps .current .mark { border-color: #1F3A68; color: #1F3A68; box-shadow: 0 0 0 4px #E8EDF5; }
.mrcm-steps .step-name { font-weight: 600; color: #13213D; margin: 0; font-size: .9375rem; }
.mrcm-steps .upcoming .step-name { color: var(--mrcm-muted); font-weight: 500; }
.mrcm-steps .step-when { font-size: .8125rem; color: var(--mrcm-muted); margin: 0; font-variant-numeric: tabular-nums; }
@media (min-width: 992px) {
  .mrcm-steps.horizontal { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .mrcm-steps.horizontal li { grid-template-columns: 1fr; padding: 0 .75rem 0 0; }
  .mrcm-steps.horizontal li::before { left: 2rem; right: 0; top: calc(1rem - 1px); bottom: auto; width: auto; height: 2px; }
}

/* Theme timeline (Tixia .widget-timeline1) tweaks */
.widget-timeline1 .timeline-status { color: var(--mrcm-muted); font-variant-numeric: tabular-nums; }

/* Rows: actions, documents */
.action-row { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; padding: 1rem; border: 1px solid var(--mrcm-line); border-left: 4px solid #8A4B00; border-radius: .5rem; background: #fff; }
.action-row + .action-row { margin-top: .75rem; }
.action-row .grow { flex: 1 1 220px; min-width: 0; }
.action-row.is-done { border-left-color: #146C35; }
.action-row h3 { font-size: 1rem; margin: 0 0 .125rem; }
.action-row p { margin: 0; color: var(--mrcm-muted); font-size: .875rem; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; align-items: center; gap: .875rem; padding: .875rem 0; border-top: 1px solid var(--mrcm-line); }
.doc-list li:first-child { border-top: 0; padding-top: 0; }
.doc-list .doc-icon { width: 2.75rem; height: 2.75rem; border-radius: .5rem; display: grid; place-items: center; background: #FDECEA; color: #B42318; font-size: 1.25rem; flex: none; }
.doc-list .doc-icon.img { background: #E5F0FA; color: #1B64A3; }
.doc-list .doc-main { flex: 1; min-width: 0; }
.doc-list .doc-main strong { display: block; color: #13213D; font-weight: 600; overflow-wrap: anywhere; }
.doc-list .doc-main span { font-size: .8125rem; color: var(--mrcm-muted); }

/* KPI chips (filter buttons) */
.kpi-chips { display: flex; gap: .75rem; overflow-x: auto; padding: 2px 2px .5rem; scroll-snap-type: x proximity; }
.kpi-chip { flex: none; min-width: 9.5rem; min-height: 4.5rem; text-align: left; border: 1px solid var(--mrcm-line); background: #fff; border-radius: .75rem; padding: .75rem 1rem; display: flex; flex-direction: column; justify-content: center; scroll-snap-align: start; box-shadow: 0 1px 2px rgba(20,37,74,.04); }
.kpi-chip .n { font-size: 1.5rem; font-weight: 700; color: #13213D; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-chip .t { font-size: .8125rem; color: var(--mrcm-muted); font-weight: 500; }
.kpi-chip:hover { border-color: var(--mrcm-line-strong); }
.kpi-chip[aria-pressed=true] { border-color: #1F3A68; background: #E8EDF5; box-shadow: inset 0 0 0 1px #1F3A68; }
.kpi-chip[aria-pressed=true] .t { color: #172E54; }
.kpi-chip.attn .n { color: #8A4B00; }

/* Saved filter pills */
.filter-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-pill { min-height: 36px; border-radius: 2rem; border: 1px solid var(--mrcm-line-strong); background: #fff; padding: .25rem .875rem; font-size: .8125rem; font-weight: 500; color: #13213D; }
.filter-pill[aria-pressed=true] { background: #14254A; color: #fff; border-color: #14254A; }

/* Data table */
.mrcm-table { width: 100%; font-size: .875rem; }
.mrcm-table thead th { font-size: .75rem; font-weight: 600; color: var(--mrcm-muted); background: var(--mrcm-surface-2); white-space: nowrap; }
.mrcm-table tbody th { font-size: .875rem; color: var(--bs-body-color); background: transparent; }
.mrcm-table td, .mrcm-table th { padding: .75rem 1rem; vertical-align: middle; border-color: var(--mrcm-line); }
.mrcm-table tbody tr.is-selected > * { background: #E8EDF5; }
.mrcm-table .person strong { display: block; color: #13213D; font-weight: 600; }
.mrcm-table .person span { font-size: .75rem; color: var(--mrcm-muted); }
.sort-btn { background: none; border: 0; padding: .25rem; margin: -.25rem; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: .25rem; min-height: 32px; }
.sort-btn .bi { opacity: .45; font-size: .75rem; }
th[aria-sort=ascending] .sort-btn .bi, th[aria-sort=descending] .sort-btn .bi { opacity: 1; color: #172E54; }
th[aria-sort=descending] .sort-btn .bi { transform: rotate(180deg); }
.age-hot { color: #B42318; font-weight: 600; }
.table-check { width: 3rem; }
@media (max-width: 1199.98px) {
  .mrcm-table.stack { min-width: 0 !important; }
  .mrcm-table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mrcm-table.stack, .mrcm-table.stack tbody, .mrcm-table.stack tr, .mrcm-table.stack td { display: block; width: 100%; }
  .mrcm-table.stack tr { position: relative; border: 1px solid var(--mrcm-line); border-radius: .75rem; margin: 0 0 .75rem; padding: .75rem 1rem; background: #fff; }
  .mrcm-table.stack tr:has(.table-check) { padding-left: 3.25rem; }
  .mrcm-table.stack tr.is-selected { border-color: #1F3A68; }
  .mrcm-table.stack td { border: 0; padding: .25rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; background: transparent !important; }
  .mrcm-table.stack td::before { content: attr(data-label); color: var(--mrcm-muted); font-size: .75rem; font-weight: 600; text-align: left; flex: none; }
  .mrcm-table.stack td.table-check { position: absolute; left: .75rem; top: .625rem; width: auto; padding: 0; }
  .mrcm-table.stack td.table-check::before, .mrcm-table.stack td.cell-main::before, .mrcm-table.stack td.cell-actions::before { display: none; }
  .mrcm-table.stack td.cell-main { text-align: left; padding-bottom: .5rem; }
  .mrcm-table.stack td.cell-actions { justify-content: flex-end; padding-top: .5rem; }
  .table-scroll-desktop { overflow: visible !important; }
}
.pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.pager .pagination { margin: 0; }
.pager .page-link { min-width: 44px; min-height: 44px; display: grid; place-items: center; }

.bulk-bar { position: fixed; z-index: 1040; left: 50%; bottom: 1rem; transform: translateX(-50%); width: min(760px, calc(100vw - 2rem)); display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .75rem 1rem; background: #14254A; color: #fff; border-radius: .75rem; box-shadow: 0 12px 32px rgba(20,37,74,.3); }
.bulk-bar strong { margin-right: auto; font-variant-numeric: tabular-nums; }
.bulk-bar .btn-outline-light { color: #fff; }
.bulk-bar :focus-visible { outline-color: #fff !important; }
@media (min-width: 1024px) { .bulk-bar { left: calc(50% + 8.25rem); } }

/* Wizard */
.wiz-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .375rem; }
.wiz-group .bar { height: 6px; border-radius: 3px; background: var(--mrcm-line); overflow: hidden; }
.wiz-group .bar > span { display: block; height: 100%; width: 0; background: #1F3A68; transition: width .3s ease; }
.wiz-group.complete .bar > span { background: var(--mrcm-accent); }
.wiz-group .name { font-size: .75rem; font-weight: 600; color: var(--mrcm-muted); margin-top: .375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-group.active .name { color: #172E54; }
.wiz-steps { display: none; }
@media (min-width: 768px) {
  .wiz-steps { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: .875rem 0 0; }
  .wiz-steps button { display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; padding: .25rem .75rem .25rem .25rem; border-radius: 2rem; border: 1px solid var(--mrcm-line); background: #fff; font-size: .75rem; font-weight: 500; color: var(--mrcm-muted); }
  .wiz-steps .n { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: #EEF0F4; color: #3E4556; font-variant-numeric: tabular-nums; font-weight: 600; }
  .wiz-steps button[aria-current=step] { border-color: #1F3A68; color: #172E54; background: #E8EDF5; font-weight: 600; }
  .wiz-steps button[aria-current=step] .n { background: #1F3A68; color: #fff; }
  .wiz-steps button.is-done { color: #13213D; }
  .wiz-steps button.is-done .n { background: var(--mrcm-accent); color: #fff; }
  .wiz-steps button:disabled { cursor: not-allowed; opacity: .65; }
}
.save-state { display: inline-flex; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--mrcm-muted); }
.save-state .bi { color: var(--mrcm-accent); }
.save-state.is-saving .bi { animation: mrcm-spin 1s linear infinite; color: var(--mrcm-muted); }
@keyframes mrcm-spin { to { transform: rotate(360deg); } }
.wiz-section + .wiz-section { border-top: 1px solid var(--mrcm-line); padding-top: 1.5rem; margin-top: 1.5rem; }
.wiz-section > legend, .wiz-section-title { font-size: 1.0625rem; font-weight: 600; color: #13213D; margin-bottom: 1rem; float: left; width: 100%; }
.wiz-section > legend + * { clear: both; }
.wiz-nav { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--mrcm-line); }
.error-summary { border: 2px solid #B42318; border-radius: .5rem; padding: 1rem 1.25rem; margin-bottom: 1.5rem; background: #FDECEA; }
.error-summary h3 { font-size: 1rem; color: #B42318; margin: 0 0 .25rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: #B42318; font-weight: 600; text-decoration: underline; }
.question { padding: 1rem 0; border-top: 1px solid var(--mrcm-line); }
.question:first-of-type { border-top: 0; padding-top: 0; }
.question > legend { font-size: .9375rem; font-weight: 500; color: #13213D; margin-bottom: .75rem; float: left; width: 100%; max-width: 72ch; }
.question > legend + * { clear: both; }
.yesno { display: flex; gap: .5rem; flex-wrap: wrap; }
.yesno .btn-check + .btn { min-width: 6rem; border-color: var(--mrcm-line-strong); color: #13213D; background: #fff; }
.yesno .btn-check:checked + .btn { background: #E8EDF5; border-color: #1F3A68; color: #172E54; box-shadow: inset 0 0 0 1px #1F3A68; }
.yesno .btn-check:focus-visible + .btn { outline: 3px solid #1F3A68; outline-offset: 2px; }
.yesno.is-invalid .btn { border-color: #B42318; }
.option-tiles { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .option-tiles { grid-template-columns: repeat(3, 1fr); } }
.option-tiles .btn-check + label { display: block; height: 100%; text-align: left; padding: .875rem 1rem; border: 1px solid var(--mrcm-line-strong); border-radius: .5rem; background: #fff; cursor: pointer; color: #13213D; }
.option-tiles .btn-check + label small { display: block; color: var(--mrcm-muted); margin-top: 2px; }
.option-tiles .btn-check:checked + label { border-color: #1F3A68; box-shadow: inset 0 0 0 1px #1F3A68; background: #E8EDF5; }
.option-tiles .btn-check:focus-visible + label { outline: 3px solid #1F3A68; outline-offset: 2px; }
.masked-field { display: flex; align-items: center; gap: .75rem; padding: .625rem .875rem; border: 1px dashed var(--mrcm-line-strong); border-radius: .5rem; background: var(--mrcm-surface-2); min-height: 44px; flex-wrap: wrap; }
.masked-field .tnum { letter-spacing: .06em; color: #13213D; font-weight: 600; }
.switch-row { display: flex; align-items: flex-start; gap: .875rem; padding: 1rem; border: 1px solid var(--mrcm-line); border-radius: .5rem; }
.switch-row .form-check-input { width: 2.75rem; height: 1.5rem; margin: 0; flex: none; }
.form-switch.form-check { padding-left: 0; }

/* Premium summary */
.premium-panel { position: sticky; top: calc(var(--dz-header-height) + 1rem); }
@media (max-width: 1199.98px) { .premium-panel { position: static; } }
.price-rows { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; margin: 0; font-size: .875rem; }
.price-rows dt { color: var(--mrcm-muted); font-weight: 400; }
.price-rows dd { margin: 0; text-align: right; font-weight: 600; color: #13213D; font-variant-numeric: tabular-nums; }
.price-rows .minus { color: #146C35; }
.price-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 2px solid #13213D; }
.price-total .amt { font-size: 1.75rem; font-weight: 700; color: var(--mrcm-accent); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.price-total .amt.flash { animation: mrcm-flash .6s ease; }
@keyframes mrcm-flash { from { background: var(--mrcm-accent-subtle); } to { background: transparent; } }
.demo-flag { display: inline-flex; align-items: center; gap: .375rem; font-size: .75rem; font-weight: 600; color: #8A4B00; background: #FFF3DC; padding: .125rem .5rem; border-radius: .375rem; }
.cover-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0; font-size: .875rem; }
.cover-facts dt { color: var(--mrcm-muted); font-size: .75rem; font-weight: 500; }
.cover-facts dd { margin: 0; font-weight: 600; color: #13213D; }
.price-bar { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; margin: 1rem -.9375rem 0; background: #fff; border-top: 1px solid var(--mrcm-line); box-shadow: 0 -6px 16px rgba(20,37,74,.08); }
.price-bar .amt { font-size: 1.25rem; font-weight: 700; color: var(--mrcm-accent); font-variant-numeric: tabular-nums; }
@media (min-width: 1200px) { .price-bar { display: none; } }

.declaration-box { max-height: 320px; overflow-y: auto; padding: 1rem 1.25rem; border: 1px solid var(--mrcm-line); border-radius: .5rem; background: var(--mrcm-surface-2); font-size: .875rem; }
.declaration-box h4 { font-size: .875rem; margin: 1rem 0 .25rem; }
.declaration-box h4:first-child { margin-top: 0; }
.sigpad { position: relative; border: 1px dashed var(--mrcm-line-strong); border-radius: .5rem; background: #fff; touch-action: none; }
.sigpad canvas { display: block; width: 100%; height: 180px; cursor: crosshair; border-radius: .5rem; }
.sigpad .sig-line { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 2.5rem; border-top: 1px solid var(--mrcm-line-strong); pointer-events: none; }
.sigpad .sig-hint { position: absolute; left: 1.5rem; bottom: .75rem; font-size: .75rem; color: var(--mrcm-muted); pointer-events: none; }
.sigpad.is-invalid { border: 2px solid #B42318; }

.dropzone-mrcm { display: block; position: relative; border: 2px dashed var(--mrcm-line-strong); border-radius: .75rem; padding: 2rem 1rem; text-align: center; background: var(--mrcm-surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone-mrcm:hover, .dropzone-mrcm.is-over { border-color: #1F3A68; background: #E8EDF5; }
.dropzone-mrcm input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone-mrcm:focus-within { outline: 3px solid #1F3A68; outline-offset: 2px; }
.dropzone-mrcm .bi { font-size: 2rem; color: #1F3A68; display: block; margin-bottom: .25rem; }
.file-chip { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--mrcm-line); border-radius: .5rem; background: #fff; margin-top: .75rem; }
.file-thumb { width: 3rem; height: 3rem; border-radius: .375rem; object-fit: cover; background: #E8EDF5; display: grid; place-items: center; color: #172E54; flex: none; font-size: 1.25rem; }
.bank-box { display: grid; grid-template-columns: auto 1fr; gap: .375rem 1rem; font-size: .875rem; margin: 0; }
.bank-box dt { color: var(--mrcm-muted); font-weight: 400; }
.bank-box dd { margin: 0; font-weight: 600; color: #13213D; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pay-option { border: 1px solid var(--mrcm-line); border-radius: .75rem; padding: 1.25rem; height: 100%; }
.pay-option.is-soon { background: var(--mrcm-surface-2); }

/* Case page */
.next-action { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .75rem .75rem .75rem 1rem; border-radius: .75rem; border: 1px solid var(--mrcm-line); background: #fff; }
.case-meta { display: flex; flex-wrap: wrap; gap: .375rem 1.25rem; color: var(--mrcm-muted); font-size: .875rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.case-meta li { display: inline-flex; align-items: center; gap: .375rem; }
.proof-frame { border: 1px solid var(--mrcm-line); border-radius: .5rem; overflow: hidden; background: var(--mrcm-surface-2); }
.proof-frame button { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.proof-frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--mrcm-line); font-size: .875rem; }
.check-list li:first-child { border-top: 0; padding-top: 0; }
.check-list .bi { font-size: 1.125rem; flex: none; }
.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .875rem 1.5rem; margin: 0; }
@media (min-width: 576px) { .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .dl-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dl-grid dt { font-size: .75rem; color: var(--mrcm-muted); font-weight: 500; }
.dl-grid dd { margin: 2px 0 0; color: #13213D; overflow-wrap: anywhere; }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-list li { display: grid; grid-template-columns: 2.25rem 1fr; gap: .75rem; padding: .875rem 0; border-top: 1px solid var(--mrcm-line); font-size: .875rem; }
.audit-list li:first-child { border-top: 0; }
.audit-list time { display: block; color: var(--mrcm-muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.audit-list .diff { display: inline-block; margin-top: .25rem; font-size: .75rem; background: var(--mrcm-surface-2); border: 1px solid var(--mrcm-line); border-radius: .375rem; padding: .125rem .375rem; }
.nav-underline .nav-link { min-height: 48px; color: var(--mrcm-muted); font-weight: 500; }
.nav-underline .nav-link.active { color: #172E54; font-weight: 600; }
.nav-scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-scroll-x .nav-link { white-space: nowrap; }

/* Agent */
.stat-tile { display: flex; align-items: center; gap: 1rem; }
.stat-tile .avatar { width: 3rem; height: 3rem; font-size: 1.25rem; border-radius: .75rem; }
.stat-tile .v { font-size: 1.5rem; font-weight: 700; color: #13213D; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-tile .l { font-size: .8125rem; color: var(--mrcm-muted); }
.bars { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .375rem; align-items: end; height: 180px; padding-top: .75rem; }
.bars .bar { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: .25rem; }
.bars .bar span { display: block; border-radius: 4px 4px 0 0; background: #1F3A68; min-height: 2px; }
.bars .bar span.pending { background: #BAC6DA; border: 1px dashed #1F3A68; border-bottom: 0; }
.bars .bar small { font-size: .6875rem; color: var(--mrcm-muted); text-align: center; }
.chart-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .75rem; color: var(--mrcm-muted); }
.chart-legend i { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; background: #1F3A68; vertical-align: -2px; margin-right: .375rem; }
.chart-legend i.pending { background: #BAC6DA; border: 1px dashed #1F3A68; }
.tree-list { list-style: none; margin: 0; padding: 0; }
.tree-list li { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--mrcm-line); }
.tree-list li:first-child { border-top: 0; }
.tree-list .indent { width: 1rem; height: 1.25rem; margin-top: -1.25rem; border-left: 2px solid var(--mrcm-line); border-bottom: 2px solid var(--mrcm-line); border-bottom-left-radius: .375rem; flex: none; }

/* Toasts */
.toast-container { z-index: 1090; }
.toast.mrcm-toast { background: #14254A; color: #fff; border: 0; }
.toast.mrcm-toast .toast-body { display: flex; gap: .75rem; align-items: flex-start; }
.toast.mrcm-toast .bi { color: #7FE0D2; font-size: 1.125rem; }
.toast.mrcm-toast.is-bad .bi { color: #FF9B8F; }
.toast.mrcm-toast .btn-close { filter: invert(1) grayscale(1) brightness(2); margin-left: auto; flex: none; }

/* ---------- 5. Pages ---------- */
/* Login */
.auth-body { background: #F4F5F9; }
.mrcm-auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .mrcm-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.mrcm-auth-panel { display: none; color: #fff; padding: 3rem; position: relative; overflow: hidden;
  background-color: #14254A;
  background-image: url("../img/guilloche.svg"), url("../img/guilloche.svg"), linear-gradient(160deg, #1F3A68 0%, #1F3A73 55%, #14254A 100%);
  background-size: 900px, 520px, auto; background-position: right -320px bottom -300px, left -220px top -200px, 0 0; background-repeat: no-repeat; }
@media (min-width: 992px) { .mrcm-auth-panel { display: flex; flex-direction: column; justify-content: space-between; } }
.mrcm-auth-panel h2 { color: #fff; font-size: 2.25rem; font-weight: 700; line-height: 1.15; max-width: 15ch; }
.mrcm-auth-panel p { color: #D3DDF2; font-size: 1.0625rem; max-width: 44ch; margin-top: 1rem; }
.mrcm-auth-panel ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .75rem; }
.mrcm-auth-panel li { display: flex; gap: .75rem; color: #EEF2FB; }
.mrcm-auth-panel li .bi { color: #7FE0D2; }
.mrcm-auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.mrcm-auth-form .auth-form { width: 100%; max-width: 440px; background: #fff; border-radius: 1rem; padding: 2rem 1.5rem; box-shadow: 0 4px 20px rgba(20,37,74,.06); }
@media (min-width: 576px) { .mrcm-auth-form .auth-form { padding: 2.5rem; } }
.auth-alt { display: grid; gap: .75rem; }
.auth-alt a { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border: 1px solid var(--mrcm-line); border-radius: .5rem; color: #13213D; min-height: 56px; }
.auth-alt a:hover { border-color: #1F3A68; background: #E8EDF5; }
.auth-alt a .bi { font-size: 1.25rem; color: #1F3A68; }
.auth-alt span { flex: 1; font-size: .875rem; color: var(--mrcm-muted); }
.auth-alt strong { display: block; color: #13213D; font-size: .9375rem; }
.pw-toggle { position: absolute; right: 0; top: 0; width: 44px; height: 44px; border: 0; background: none; color: var(--mrcm-muted); }

/* Hub */
.hub-body { background: #F4F5F9; }
.hub-hero { background-color: #14254A; color: #fff;
  background-image: url("../img/guilloche.svg"), linear-gradient(135deg, #1F3A68 0%, #1F3A73 60%, #14254A 100%);
  background-size: 760px, auto; background-position: right -240px top -260px, 0 0; background-repeat: no-repeat; }
.hub-hero .inner, .hub-main { max-width: 1180px; margin: 0 auto; padding: 2.5rem 1rem; }
@media (min-width: 768px) { .hub-hero .inner, .hub-main { padding: 3.5rem 2rem; } }
.hub-hero h1 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin-top: 1.5rem; max-width: 24ch; }
.hub-hero p { color: #D3DDF2; font-size: 1.0625rem; max-width: 64ch; margin-top: .75rem; }
.hub-hero .hub-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.25rem; color: #EEF2FB; font-size: .875rem; }
.screen-card { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 0; }
.screen-card .thumb { aspect-ratio: 16 / 10; background: #E8EDF5; border-bottom: 1px solid var(--mrcm-line); overflow: hidden; }
.screen-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.screen-card .card-body { display: flex; flex-direction: column; gap: .5rem; }
.screen-card h2 { font-size: 1.125rem; margin: 0; }
.screen-card h2 a { color: #13213D; }
.screen-card h2 a::after { content: ""; position: absolute; inset: 0; }
.screen-card:hover { box-shadow: 0 0 0 2px #1F3A68; }
.screen-card:focus-within { outline: 3px solid #1F3A68; outline-offset: 2px; }
.screen-card h2 a:focus-visible { outline: none !important; }
.screen-card .who { font-size: .75rem; font-weight: 600; color: #172E54; }
.screen-card ul { padding-left: 1.125rem; margin: 0; font-size: .875rem; color: var(--bs-body-color); }

/* ---------- 6. Dark mode (follows the device setting): navy-based palette ---------- */
body[data-bs-theme=dark][data-primary=color_3] {
  --bs-body-bg: #111D33;         /* cards */
  --bs-body-bg-rgb: 17, 29, 51;
  --bs-secondary-bg: #0B1424;    /* page */
  --bs-secondary-bg-rgb: 11, 20, 36;
  --bs-tertiary-bg: #16233D;
  --bs-body-color: #DCE3EF;
  --bs-heading-color: #F3F6FB;
  --bs-link-color: #9DB8EE;
  --bs-link-color-rgb: 157, 184, 238;
  --bs-link-hover-color: #B9CBF2;
  --bs-primary: #2C5291;
  --bs-primary-rgb: 44, 82, 145;
  --bs-border-color: #26365A;
  --bs-focus-ring-color: rgba(157, 184, 238, .45);
  --mrcm-muted: #A9B5CC;
  --mrcm-line: #26365A;
  --mrcm-line-strong: #5D6E92;
  --mrcm-surface-2: #16233D;
  --bs-primary-bg-subtle: #1C2D52;
  --sidebar-bg: #0E1A30;
  --nav-headbg: #0E1A30;
}
[data-bs-theme=dark] .dashboard_bar, [data-bs-theme=dark] .profile-name, [data-bs-theme=dark] .header-right .nav-link.profile-btn,
[data-bs-theme=dark] .card-title, [data-bs-theme=dark] .page-title h1, [data-bs-theme=dark] .notif-title,
[data-bs-theme=dark] .doc-list .doc-main strong, [data-bs-theme=dark] .mrcm-table .person strong, [data-bs-theme=dark] .kpi-chip .n,
[data-bs-theme=dark] .mrcm-steps .step-name, [data-bs-theme=dark] .price-rows dd, [data-bs-theme=dark] .cover-facts dd,
[data-bs-theme=dark] .dl-grid dd, [data-bs-theme=dark] .stat-tile .v, [data-bs-theme=dark] .form-label, [data-bs-theme=dark] .question > legend,
[data-bs-theme=dark] .wiz-section > legend, [data-bs-theme=dark] .bank-box dd, [data-bs-theme=dark] .masked-field .tnum,
[data-bs-theme=dark] .screen-card h2 a, [data-bs-theme=dark] .auth-alt strong, [data-bs-theme=dark] .form-control { color: #F2F5FA; }
[data-bs-theme=dark] .action-row, [data-bs-theme=dark] .kpi-chip, [data-bs-theme=dark] .filter-pill, [data-bs-theme=dark] .next-action,
[data-bs-theme=dark] .file-chip, [data-bs-theme=dark] .sigpad, [data-bs-theme=dark] .mrcm-steps .mark, [data-bs-theme=dark] .wiz-steps button,
[data-bs-theme=dark] .yesno .btn-check + .btn, [data-bs-theme=dark] .option-tiles .btn-check + label, [data-bs-theme=dark] .price-bar,
[data-bs-theme=dark] .mrcm-auth-form .auth-form, [data-bs-theme=dark] .mrcm-table.stack tr { background: #111D33; color: var(--bs-body-color); }
[data-bs-theme=dark] .kpi-chip[aria-pressed=true], [data-bs-theme=dark] .wiz-steps button[aria-current=step], [data-bs-theme=dark] .yesno .btn-check:checked + .btn,
[data-bs-theme=dark] .option-tiles .btn-check:checked + label, [data-bs-theme=dark] .notif-item.is-unread { background: #1C2D52; color: #F2F5FA; border-color: #9DB5EC; }
[data-bs-theme=dark] .kpi-chip[aria-pressed=true] .t, [data-bs-theme=dark] .wiz-group.active .name { color: #B9CBF2; }
[data-bs-theme=dark] .light.badge-primary { color: #B9CBF2; background: #1C2D52; }
[data-bs-theme=dark] .light.badge-success { color: #7FD49A; background: #173A25; }
[data-bs-theme=dark] .light.badge-warning { color: #FFC56B; background: #3A2A0E; }
[data-bs-theme=dark] .light.badge-danger { color: #FF9B8F; background: #3D1A1A; }
[data-bs-theme=dark] .light.badge-info { color: #8FC3F0; background: #18324D; }
[data-bs-theme=dark] .light.badge-secondary { color: #5FCFBF; background: #123A37; }
[data-bs-theme=dark] .light.badge-dark { color: #C4CCD9; background: #24314F; }
[data-bs-theme=dark] .text-accent, [data-bs-theme=dark] .price-total .amt, [data-bs-theme=dark] .price-bar .amt { color: #5FCFBF !important; }
[data-bs-theme=dark] .price-total { border-top-color: #DDE3EE; }
[data-bs-theme=dark] .mrcm-table tbody tr.is-selected > * { background: #1C2D52; }
[data-bs-theme=dark] .filter-pill[aria-pressed=true] { background: #9DB5EC; color: #14254A; border-color: #9DB5EC; }
[data-bs-theme=dark] .header-right .nav-link.bell-btn { color: #B9CBF2; }
[data-bs-theme=dark] .bell-count { border-color: #0B1424; }
[data-bs-theme=dark] .auth-body, [data-bs-theme=dark].hub-body, [data-bs-theme=dark] .hub-body { background: #0B1424; }
[data-bs-theme=dark] .error-summary { background: #3D1A1A; }
[data-bs-theme=dark] .error-summary h3, [data-bs-theme=dark] .error-summary a, [data-bs-theme=dark] .invalid-feedback, [data-bs-theme=dark] .req { color: #FF9B8F; }
[data-bs-theme=dark] .demo-flag { color: #FFC56B; background: #3A2A0E; }
[data-bs-theme=dark] .header .dashboard_bar { color: #F2F5FA; }
[data-bs-theme=dark] body[data-sidebarbg] .deznav .metismenu > li.mm-active > a,
body[data-bs-theme=dark][data-sidebarbg] .deznav .metismenu > li.mm-active > a { background: rgba(255,255,255,.2) !important; color: #fff !important; }
body[data-bs-theme=dark][data-sidebarbg] .deznav .metismenu > li.mm-active > a i { color: #fff !important; }
[data-bs-theme=dark] .form-select { color: #F2F5FA; }
.mrcm-steps li { align-content: start; }
.page-title .page-sub { margin: 0; color: var(--mrcm-muted); font-size: .875rem; }

/* ---------- Review fixes ---------- */
.mrcm-table td.tnum, .mrcm-table .tnum, .mrcm-table td.text-end { white-space: nowrap; }
.stat-tile .v { font-size: 1.25rem; white-space: nowrap; }
.deznav .metismenu > li > a { font-size: .875rem; }
.form-check { padding-left: 0; }
.proof-frame button { display: block; width: 100%; }
.proof-frame img { display: block; width: 100% !important; max-width: 100%; height: auto; }
.mrcm-auth-panel { background-image: url("../img/guilloche.svg"), linear-gradient(160deg, #1F3A68 0%, #1F3A73 55%, #14254A 100%); background-size: 760px, auto; background-position: right -330px bottom -330px, 0 0; }
.mrcm-auth-panel .auth-copy { position: relative; z-index: 1; }
.nav-underline.nav-scroll-x { gap: .25rem !important; }
.nav-underline.nav-scroll-x .nav-link { padding-left: .5rem; padding-right: .5rem; }

/* keep certificate text legible over the guilloche at every width */
.mrcm-cert { background-image: linear-gradient(90deg, rgba(20,37,74,.88) 0%, rgba(20,37,74,.55) 50%, rgba(20,37,74,0) 85%), url("../img/guilloche.svg"), url("../img/guilloche.svg"), linear-gradient(135deg, #172E54 0%, #1C3366 45%, #14254A 100%);
  background-size: auto, 520px, 300px, auto; background-position: 0 0, right -190px top -170px, left -150px bottom -170px, 0 0; }
/* 16px side gutters on phones */
@media (max-width: 575.98px) {
  .content-body .container-fluid { padding-left: 16px !important; padding-right: 16px !important; }
  .page-title { padding: 12px 16px; }
}

.kpi-chips { max-width: 100%; }
.check-hit { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -12px; cursor: pointer; }
.check-hit .form-check-input { width: 1.375rem; height: 1.375rem; margin: 0; }
.skip-link { min-height: 44px; }
@media (max-width: 767.98px) {
  .btn-sm, .filter-pill, .btn-xs { min-height: 44px; }
}
.hub-main { padding-left: 1.125rem; padding-right: 1.125rem; }
.mrcm-auth-form { padding-left: 1.125rem; padding-right: 1.125rem; }

@media (min-width: 1200px) { .mobile-sort { display: none !important; } }
@media (max-width: 1199.98px) { .mrcm-table.stack thead { display: none; } }
.auth-home-link { display: inline-flex; align-items: center; min-height: 44px; }
.screen-card ul, .hub-main .card ul { list-style: disc; padding-left: 1.125rem; }
.screen-card ul li + li, .hub-main .card ul li + li { margin-top: .25rem; }
body[data-bs-theme=dark].auth-body, body[data-bs-theme=dark].hub-body { background: #0B1424; }
.btn[aria-label] { min-width: 44px; }

/* Country-code box before the mobile number (wizard step 1, admin editor): a fixed width so the chosen "+60 Malaysia" shows
   (an input-group select is width: 1% in Bootstrap; with flex-grow-0 only the arrow was left). Owner 14 Oct 2026. */
.input-group > .form-select.v2-country-code { flex: 0 0 10.5rem; width: 10.5rem; min-width: 7.5rem; max-width: 45%; }
