/* ==========================================================================
   RBU DDE (CDOE) portal theme - five themes, each with light and dark mode
   --------------------------------------------------------------------------
   <html data-skin="royal|emerald|slate|heritage|ocean" data-bs-theme="light|dark">
   (set by Scripts/au/au-theme.js from the user's choice).

   Presentation only. It re-skins the existing Inspinia / Bootstrap 3 class
   names (navbar-static-side, #side-menu, ibox, panel, widget, ...) so no
   view, controller or script has to change. Loaded last in <head>.
   Rules start with html[data-skin] so they win over Inspinia's style.css and
   plugin stylesheets that views include later in <body>.
   ========================================================================== */

/* ---------- 1. Tokens ------------------------------------------------------ */
:root {
  --rbu-side-w: 264px; --rbu-side-mini: 76px; --rbu-top-h: 62px; --rbu-gap: 20px; --rbu-float: 0px;
  --rbu-c1: #4f7cff; --rbu-c2: #10b981; --rbu-c3: #f59e0b; --rbu-c4: #ef4770; --rbu-c5: #8b5cf6; --rbu-c6: #06b6d4;
}
/* Royal (also the fallback when no data-skin is set) */
:root, html[data-skin="royal"] {
  --rbu-font: "Inter", "Segoe UI", system-ui, sans-serif; --rbu-head-font: var(--rbu-font);
  --rbu-radius: 10px; --rbu-radius-lg: 12px; --rbu-pill: 8px;
  --rbu-bg: #f3f5f9; --rbu-surface: #ffffff; --rbu-surface-2: #f7f9fc; --rbu-border: #e2e7f0; --rbu-text: #172036; --rbu-muted: #66708a;
  --rbu-primary: #2451d6; --rbu-primary-2: #1e3fae; --rbu-on-primary: #ffffff; --rbu-accent: #e0a100;
  --rbu-grad: linear-gradient(135deg, #1e3fae, #4f7cff);
  --rbu-side-bg: #ffffff; --rbu-side-text: #51607d; --rbu-side-strong: #172036; --rbu-side-hover: #f1f4fb;
  --rbu-side-active-bg: #e9effe; --rbu-side-active-text: #2451d6; --rbu-side-line: #e2e7f0; --rbu-ico-mix: 100%;
  --rbu-top-bg: #ffffff; --rbu-top-line: 1px solid #e2e7f0;
  --rbu-th-bg: #f3f6fc; --rbu-th-color: #33415f; --rbu-th-line: #d6deec;
  --rbu-ph-bg: #f5f8ff; --rbu-ph-color: #1e3fae; --rbu-ph-top: 3px solid #2451d6; --rbu-ph-bottom: 1px solid #e2e7f0;
  --rbu-mh-bg: linear-gradient(135deg, #1e3fae, #2f63e8); --rbu-mh-color: #ffffff;
  --rbu-shadow: 0 1px 2px rgba(23, 32, 54, .06);
}
html[data-skin="royal"][data-bs-theme="dark"] {
  --rbu-bg: #0c1220; --rbu-surface: #141c2e; --rbu-surface-2: #1a2439; --rbu-border: #27324b; --rbu-text: #e6ebf5; --rbu-muted: #93a0bb;
  --rbu-primary: #6d93ff; --rbu-primary-2: #8fb0ff; --rbu-on-primary: #0b1020;
  --rbu-side-bg: #101829; --rbu-side-text: #9aa7c2; --rbu-side-strong: #ffffff; --rbu-side-hover: #1a2439;
  --rbu-side-active-bg: rgba(109, 147, 255, .16); --rbu-side-active-text: #9db7ff; --rbu-side-line: #27324b; --rbu-ico-mix: 70%;
  --rbu-top-bg: #141c2e; --rbu-top-line: 1px solid #27324b;
  --rbu-th-bg: #18223a; --rbu-th-color: #c6d2ec; --rbu-th-line: #2c3a5a;
  --rbu-ph-bg: #182238; --rbu-ph-color: #9db7ff; --rbu-ph-top: 3px solid #6d93ff; --rbu-ph-bottom: 1px solid #27324b;
  --rbu-mh-bg: linear-gradient(135deg, #1b3a8f, #2f5fd0);
  --rbu-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
/* Emerald */
html[data-skin="emerald"] {
  --rbu-font: "Outfit", "Segoe UI", system-ui, sans-serif; --rbu-head-font: var(--rbu-font);
  --rbu-radius: 14px; --rbu-radius-lg: 20px; --rbu-pill: 999px; --rbu-float: 14px;
  --rbu-bg: #eef6f3; --rbu-surface: #ffffff; --rbu-surface-2: #f4faf8; --rbu-border: #dcebe6; --rbu-text: #10302b; --rbu-muted: #5f7d77;
  --rbu-primary: #0e9f8e; --rbu-primary-2: #0b8577; --rbu-on-primary: #ffffff; --rbu-accent: #ff7a59;
  --rbu-grad: linear-gradient(135deg, #0e9f8e, #34d399);
  --rbu-side-bg: #0f3d38; --rbu-side-text: rgba(255, 255, 255, .72); --rbu-side-strong: #ffffff; --rbu-side-hover: rgba(255, 255, 255, .10);
  --rbu-side-active-bg: #ffffff; --rbu-side-active-text: #0f3d38; --rbu-side-line: rgba(255, 255, 255, .14); --rbu-ico-mix: 45%;
  --rbu-top-bg: transparent; --rbu-top-line: 0 solid transparent;
  --rbu-th-bg: #e8f4f0; --rbu-th-color: #285e55; --rbu-th-line: #cfe5de;
  --rbu-ph-bg: #e3f4ef; --rbu-ph-color: #0b6f63; --rbu-ph-top: 0 solid transparent; --rbu-ph-bottom: 1px solid #dcebe6;
  --rbu-mh-bg: linear-gradient(135deg, #0e9f8e, #22b996); --rbu-mh-color: #ffffff;
  --rbu-shadow: 0 8px 24px rgba(16, 48, 43, .07);
}
html[data-skin="emerald"][data-bs-theme="dark"] {
  --rbu-bg: #07130f; --rbu-surface: #0f201c; --rbu-surface-2: #142924; --rbu-border: #20403a; --rbu-text: #e2f3ee; --rbu-muted: #8db0a8;
  --rbu-primary: #2dd4bf; --rbu-primary-2: #5eead4; --rbu-on-primary: #06231f;
  --rbu-side-bg: #0b1c19; --rbu-side-active-bg: #2dd4bf; --rbu-side-active-text: #06231f;
  --rbu-th-bg: #12261f; --rbu-th-color: #9fd9c9; --rbu-th-line: #23463e;
  --rbu-ph-bg: #133129; --rbu-ph-color: #6ee7b7; --rbu-ph-bottom: 1px solid #20403a;
  --rbu-mh-bg: linear-gradient(135deg, #0d6e62, #12907a);
  --rbu-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
/* Slate */
html[data-skin="slate"] {
  --rbu-font: "Manrope", "Segoe UI", system-ui, sans-serif; --rbu-head-font: var(--rbu-font);
  --rbu-radius: 8px; --rbu-radius-lg: 10px; --rbu-pill: 8px;
  --rbu-bg: #f4f4f2; --rbu-surface: #ffffff; --rbu-surface-2: #f8f8f6; --rbu-border: #e4e4df; --rbu-text: #1c1917; --rbu-muted: #6b6a64;
  --rbu-primary: #b45309; --rbu-primary-2: #92400e; --rbu-on-primary: #ffffff; --rbu-accent: #f59e0b;
  --rbu-btn-bg: #f59e0b; --rbu-btn-bg-2: #fbbf24; --rbu-on-btn: #1c1917;
  --rbu-grad: linear-gradient(135deg, #b45309, #f59e0b);
  --rbu-side-bg: #18181b; --rbu-side-text: rgba(255, 255, 255, .66); --rbu-side-strong: #ffffff; --rbu-side-hover: rgba(255, 255, 255, .07);
  --rbu-side-active-bg: #f59e0b; --rbu-side-active-text: #1c1917; --rbu-side-line: rgba(255, 255, 255, .09); --rbu-ico-mix: 45%;
  --rbu-top-bg: #ffffff; --rbu-top-line: 1px solid #e4e4df;
  --rbu-th-bg: #f3f3f0; --rbu-th-color: #3f3d38; --rbu-th-line: #e0dfd8;
  --rbu-ph-bg: #18181b; --rbu-ph-color: #ffffff; --rbu-ph-top: 0 solid transparent; --rbu-ph-bottom: 3px solid #f59e0b;
  --rbu-mh-bg: #18181b; --rbu-mh-color: #ffffff;
  --rbu-shadow: 0 1px 2px rgba(28, 25, 23, .06);
}
html[data-skin="slate"][data-bs-theme="dark"] {
  --rbu-bg: #0e0e10; --rbu-surface: #18181b; --rbu-surface-2: #1f1f23; --rbu-border: #2e2e33; --rbu-text: #ededed; --rbu-muted: #a1a1aa;
  --rbu-primary: #f59e0b; --rbu-primary-2: #fbbf24; --rbu-on-primary: #1c1917;
  --rbu-side-bg: #09090b; --rbu-top-bg: #18181b; --rbu-top-line: 1px solid #2e2e33;
  --rbu-th-bg: #1f1f23; --rbu-th-color: #d4d4d8; --rbu-th-line: #34343a;
  --rbu-ph-bg: #27272a; --rbu-mh-bg: #27272a;
  --rbu-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
/* Heritage */
html[data-skin="heritage"] {
  --rbu-font: "Source Sans 3", "Segoe UI", system-ui, sans-serif; --rbu-head-font: "Lora", Georgia, serif;
  --rbu-radius: 6px; --rbu-radius-lg: 8px; --rbu-pill: 6px;
  --rbu-bg: #f8f3ea; --rbu-surface: #fffdf8; --rbu-surface-2: #f7efe1; --rbu-border: #e8dcc6; --rbu-text: #2b1a1d; --rbu-muted: #7b6a63;
  --rbu-primary: #8e1b3a; --rbu-primary-2: #6f1430; --rbu-on-primary: #ffffff; --rbu-accent: #c9952b;
  --rbu-grad: linear-gradient(135deg, #6f1430, #a8254a);
  --rbu-side-bg: #5a1027; --rbu-side-text: rgba(255, 240, 225, .76); --rbu-side-strong: #ffffff; --rbu-side-hover: rgba(255, 255, 255, .08);
  --rbu-side-active-bg: #c9952b; --rbu-side-active-text: #2a0c14; --rbu-side-line: rgba(255, 255, 255, .12); --rbu-ico-mix: 45%;
  --rbu-top-bg: #fffdf8; --rbu-top-line: 2px solid #c9952b;
  --rbu-th-bg: #f4eadb; --rbu-th-color: #5a1027; --rbu-th-line: #e3d3b8;
  --rbu-ph-bg: linear-gradient(135deg, #6f1430, #a8254a); --rbu-ph-color: #ffffff; --rbu-ph-top: 0 solid transparent; --rbu-ph-bottom: 2px solid #c9952b;
  --rbu-mh-bg: linear-gradient(135deg, #6f1430, #a8254a); --rbu-mh-color: #ffffff;
  --rbu-shadow: 0 1px 3px rgba(90, 16, 39, .08);
}
html[data-skin="heritage"][data-bs-theme="dark"] {
  --rbu-bg: #150c0f; --rbu-surface: #20141a; --rbu-surface-2: #2a1b22; --rbu-border: #40262f; --rbu-text: #f3e7e2; --rbu-muted: #b59f9b;
  --rbu-primary: #e8748f; --rbu-primary-2: #f093a8; --rbu-on-primary: #2a0c14;
  --rbu-side-bg: #2a0c16; --rbu-top-bg: #20141a;
  --rbu-th-bg: #2a1a21; --rbu-th-color: #f0cfc2; --rbu-th-line: #4a2c36;
  --rbu-ph-bg: linear-gradient(135deg, #4a0f22, #7a1a38); --rbu-mh-bg: linear-gradient(135deg, #4a0f22, #7a1a38);
  --rbu-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
/* Ocean */
html[data-skin="ocean"] {
  --rbu-font: "DM Sans", "Segoe UI", system-ui, sans-serif; --rbu-head-font: var(--rbu-font);
  --rbu-radius: 12px; --rbu-radius-lg: 16px; --rbu-pill: 10px;
  --rbu-bg: #eff6f9; --rbu-surface: #ffffff; --rbu-surface-2: #f3f9fb; --rbu-border: #d9e8ee; --rbu-text: #0c2a36; --rbu-muted: #5a7884;
  --rbu-primary: #0891b2; --rbu-primary-2: #0e7490; --rbu-on-primary: #ffffff; --rbu-accent: #fb7185;
  --rbu-grad: linear-gradient(135deg, #0e7490, #22d3ee);
  --rbu-side-bg: #ffffff; --rbu-side-text: #4d6b77; --rbu-side-strong: #0c2a36; --rbu-side-hover: #eef7fa;
  --rbu-side-active-bg: #0891b2; --rbu-side-active-text: #ffffff; --rbu-side-line: #d9e8ee; --rbu-ico-mix: 100%;
  --rbu-brand-bg: #0b4f6c; --rbu-brand-text: #ffffff; --rbu-brand-sub: rgba(255, 255, 255, .75);
  --rbu-top-bg: linear-gradient(90deg, #0b4f6c, #0891b2); --rbu-top-line: 0 solid transparent;
  --rbu-top-text: #ffffff; --rbu-top-sub: rgba(255, 255, 255, .78);
  --rbu-top-btn-bg: rgba(255, 255, 255, .14); --rbu-top-btn-border: rgba(255, 255, 255, .24); --rbu-top-btn-color: #ffffff;
  --rbu-th-bg: #eaf5f9; --rbu-th-color: #0b4f6c; --rbu-th-line: #cfe3ea;
  --rbu-ph-bg: linear-gradient(90deg, #0b4f6c, #0891b2); --rbu-ph-color: #ffffff; --rbu-ph-top: 0 solid transparent; --rbu-ph-bottom: 0 solid transparent;
  --rbu-mh-bg: linear-gradient(90deg, #0b4f6c, #0891b2); --rbu-mh-color: #ffffff;
  --rbu-shadow: 0 4px 16px rgba(12, 42, 54, .06);
}
html[data-skin="ocean"][data-bs-theme="dark"] {
  --rbu-bg: #06141a; --rbu-surface: #0d2029; --rbu-surface-2: #122a35; --rbu-border: #1e3d4a; --rbu-text: #e1f1f6; --rbu-muted: #8bb0bd;
  --rbu-primary: #22d3ee; --rbu-primary-2: #67e8f9; --rbu-on-primary: #06222b;
  --rbu-side-bg: #0a1a21; --rbu-side-text: #8bb0bd; --rbu-side-strong: #ffffff; --rbu-side-hover: #122a35;
  --rbu-side-active-bg: #22d3ee; --rbu-side-active-text: #06222b; --rbu-side-line: #1e3d4a; --rbu-ico-mix: 70%;
  --rbu-brand-bg: #083344;
  --rbu-top-bg: linear-gradient(90deg, #083344, #0e7490);
  --rbu-th-bg: #102733; --rbu-th-color: #a5e6f5; --rbu-th-line: #1e3d4a;
  --rbu-ph-bg: linear-gradient(90deg, #083344, #0e7490); --rbu-mh-bg: linear-gradient(90deg, #083344, #0e7490);
  --rbu-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

/* Derived tokens + Bootstrap 5 variables */
html[data-skin] {
  --rbu-success: var(--rbu-c2); --rbu-info: var(--rbu-c6); --rbu-warning: var(--rbu-c3); --rbu-danger: var(--rbu-c4);
  --rbu-primary-soft: color-mix(in srgb, var(--rbu-primary) 13%, transparent);
  --rbu-brand-bg: transparent; --rbu-brand-text: var(--rbu-side-strong); --rbu-brand-sub: var(--rbu-side-text);
  --rbu-top-text: var(--rbu-text); --rbu-top-sub: var(--rbu-muted);
  --rbu-top-btn-bg: var(--rbu-surface); --rbu-top-btn-border: var(--rbu-border); --rbu-top-btn-color: var(--rbu-text);
  --rbu-btn-bg: var(--rbu-primary); --rbu-btn-bg-2: var(--rbu-primary-2); --rbu-on-btn: var(--rbu-on-primary);
  --bs-body-bg: var(--rbu-bg); --bs-body-color: var(--rbu-text); --bs-border-color: var(--rbu-border);
  --bs-secondary-color: var(--rbu-muted); --bs-link-color: var(--rbu-primary); --bs-link-hover-color: var(--rbu-primary-2);
  --bs-emphasis-color: var(--rbu-text); --bs-tertiary-bg: var(--rbu-surface-2);
  --bs-body-font-family: var(--rbu-font);
  font-size: 14px;
}
/* the per-skin values above that ocean overrides must come after the defaults */
html[data-skin="ocean"] { --rbu-brand-bg: #0b4f6c; --rbu-brand-text: #ffffff; --rbu-brand-sub: rgba(255, 255, 255, .75);
  --rbu-top-text: #ffffff; --rbu-top-sub: rgba(255, 255, 255, .78);
  --rbu-top-btn-bg: rgba(255, 255, 255, .14); --rbu-top-btn-border: rgba(255, 255, 255, .24); --rbu-top-btn-color: #ffffff; }
html[data-skin="ocean"][data-bs-theme="dark"] { --rbu-brand-bg: #083344; }
html[data-skin="slate"] { --rbu-btn-bg: #f59e0b; --rbu-btn-bg-2: #fbbf24; --rbu-on-btn: #1c1917; }

/* Theme palettes. Every accent (menu icons, tiles) and every status colour
   (success / info / warning / danger) comes from the active theme's own hue
   family, so no page shows a colour that belongs to a different theme.
   Solid colours carry white text (about 4.5:1 or better) except warning,
   which carries dark text. */
html[data-skin="royal"] {
  --rbu-deep: #1e3fae;
  --rbu-c1: #2451d6; --rbu-c2: #1e3fae; --rbu-c3: #c48a00; --rbu-c4: #4f7cff; --rbu-c5: #3730a3; --rbu-c6: #0369a1;
  --rbu-success: #1e3fae; --rbu-info: #0369a1; --rbu-warning: #e0a100; --rbu-danger: #b42335;
}
html[data-skin="emerald"] {
  --rbu-deep: #0f766e;
  --rbu-c1: #0e9f8e; --rbu-c2: #0f766e; --rbu-c3: #e8603c; --rbu-c4: #14b8a6; --rbu-c5: #065f46; --rbu-c6: #d97745;
  --rbu-success: #0b7d70; --rbu-info: #0f766e; --rbu-warning: #ff8a65; --rbu-danger: #c2412d;
}
html[data-skin="slate"] {
  --rbu-deep: #44403c;
  --rbu-c1: #d97706; --rbu-c2: #57534e; --rbu-c3: #f59e0b; --rbu-c4: #b45309; --rbu-c5: #78716c; --rbu-c6: #ea580c;
  --rbu-success: #44403c; --rbu-info: #57534e; --rbu-warning: #f59e0b; --rbu-danger: #b91c1c;
}
html[data-skin="heritage"] {
  --rbu-deep: #6f1430;
  --rbu-c1: #8e1b3a; --rbu-c2: #b0284c; --rbu-c3: #c9952b; --rbu-c4: #6f1430; --rbu-c5: #8a6417; --rbu-c6: #9f1239;
  --rbu-success: #8a6417; --rbu-info: #6f1430; --rbu-warning: #c9952b; --rbu-danger: #a8201a;
}
html[data-skin="ocean"] {
  --rbu-deep: #0e7490;
  --rbu-c1: #0891b2; --rbu-c2: #0e7490; --rbu-c3: #fb7185; --rbu-c4: #06b6d4; --rbu-c5: #155e75; --rbu-c6: #f43f5e;
  --rbu-success: #0e7490; --rbu-info: #155e75; --rbu-warning: #fb7185; --rbu-danger: #be123c;
}
html[data-skin] {
  --rbu-on-warning: #1b1300;
  /* the same status colours as text: darker on light pages, lighter on dark pages */
  --rbu-tmix: 100%;
  --rbu-success-text: color-mix(in srgb, var(--rbu-success) var(--rbu-tmix), #fff);
  --rbu-info-text: color-mix(in srgb, var(--rbu-info) var(--rbu-tmix), #fff);
  --rbu-danger-text: color-mix(in srgb, var(--rbu-danger) var(--rbu-tmix), #fff);
  --rbu-warning-text: color-mix(in srgb, var(--rbu-warning) 62%, #000);
  --rbu-accent-text: color-mix(in srgb, var(--rbu-accent) 62%, #000);
}
html[data-skin][data-bs-theme="dark"] {
  --rbu-tmix: 58%;
  --rbu-warning-text: var(--rbu-warning);
  --rbu-accent-text: var(--rbu-accent);
}

/* ---------- 2. Base -------------------------------------------------------- */
/* 13px and Bootstrap 3's line height (1.42857) keep the vertical rhythm the
   views were laid out with (their mt-20 / mt-23 offsets depend on it). */
:where(html[data-skin]) body {
  font-family: var(--rbu-font); font-size: 13px; line-height: 1.42857; color: var(--rbu-text); background-color: var(--rbu-bg);
}
/* the page background is the shell's: Inspinia's small-screen body rules must not
   bring back its light grey in dark mode */
html[data-skin] body { background-color: var(--rbu-bg); }
/* headings and labels inherit their container's colour, as in Inspinia */
:where(html[data-skin]) h1, :where(html[data-skin]) h2, :where(html[data-skin]) h3, :where(html[data-skin]) h4, :where(html[data-skin]) h5, :where(html[data-skin]) h6 { font-family: var(--rbu-head-font); }
:where(html[data-skin]) a { color: var(--rbu-primary); }
:where(html[data-skin]) a:hover, :where(html[data-skin]) a:focus { color: var(--rbu-primary-2); }
:where(html[data-skin]) .panel-heading :is(h1, h2, h3, h4, h5, h6, .panel-title, a),
:where(html[data-skin]) :is(.navy-bg, .yellow-bg, .lazur-bg, .blue-bg, .red-bg, .modal-header) a { color: inherit; }
:where(html[data-skin]) .text-muted { color: var(--rbu-muted) !important; }
:where(html[data-skin]) .text-navy, :where(html[data-skin]) .text-primary { color: var(--rbu-primary) !important; }
:where(html[data-skin]) .gray-bg { background-color: var(--rbu-bg); }
:where(html[data-skin]) .white-bg { background-color: var(--rbu-surface); color: var(--rbu-text); }
:where(html[data-skin]) hr { border-color: var(--rbu-border); opacity: 1; }
:where(html[data-skin]) ::selection { color: #fff; background: var(--rbu-primary); }
:where(html[data-skin]) .required:after { color: var(--rbu-danger); }
:where(html[data-skin]) * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--rbu-muted) 45%, transparent) transparent; }

/* ---------- 3. Shell: side panel ------------------------------------------- */
html[data-skin] #wrapper { overflow-x: clip; background: transparent; }  /* clip keeps the top bar sticky */
html[data-skin] body.canvas-menu nav.navbar-static-side {
  display: block; position: fixed; top: var(--rbu-float); bottom: var(--rbu-float); left: var(--rbu-float); height: auto;
  width: var(--rbu-side-w); z-index: 1035; overflow: hidden;
  background: var(--rbu-side-bg); border-right: 1px solid var(--rbu-side-line);
  transition: width .2s ease, transform .2s ease;
}
html[data-skin="emerald"] body.canvas-menu nav.navbar-static-side { border-right: 0; border-radius: 26px; box-shadow: 0 16px 40px rgba(8, 40, 36, .30); }
html[data-skin="slate"] body.canvas-menu nav.navbar-static-side,
html[data-skin="heritage"] body.canvas-menu nav.navbar-static-side { border-right: 0; }
html[data-skin] body.canvas-menu nav.navbar-static-side .sidebar-collapse { background: transparent; }
html[data-skin] body.canvas-menu nav.navbar-static-side .close-canvas-menu { display: none; }

/* header block: brand, profile, menu search */
html[data-skin] #side-menu { display: block; padding: 0 0 18px; margin: 0; }
html[data-skin] #side-menu > .nav-header.container {
  max-width: none; width: auto; margin: 0; padding: 0 0 8px; text-align: left;
  background: var(--rbu-side-bg); border-bottom: 1px solid var(--rbu-side-line);
}
html[data-skin] #side-menu > .nav-header .rbu-brand {
  display: flex; align-items: center; gap: 12px; height: var(--rbu-top-h); padding: 0 18px;
  background: var(--rbu-brand-bg); border-bottom: 1px solid var(--rbu-side-line);
}
html[data-skin] #side-menu > .nav-header .rbu-brand img { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px var(--rbu-side-line), 0 0 0 4px color-mix(in srgb, var(--rbu-accent) 55%, transparent); }
html[data-skin] #side-menu > .nav-header .rbu-brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; overflow: hidden; }
html[data-skin] #side-menu > .nav-header .rbu-brand-text b { font-size: 15.5px; color: var(--rbu-brand-text); letter-spacing: .02em; font-family: var(--rbu-head-font); }
html[data-skin] #side-menu > .nav-header .rbu-brand-text small { font-size: 11px; color: var(--rbu-brand-sub); }

html[data-skin] #side-menu > .nav-header .profile-element {
  display: flex; align-items: center; gap: 10px; margin: 12px 12px 0; padding: 8px 10px; text-align: left;
  background: var(--rbu-side-hover); border-radius: var(--rbu-radius);
}
html[data-skin] #side-menu > .nav-header .profile-element > img { width: 38px !important; height: 38px !important; flex-shrink: 0; object-fit: cover; }
html[data-skin] #side-menu > .nav-header .profile-element > .dropdown-toggle { flex: 1; min-width: 0; text-align: left !important; color: var(--rbu-side-strong); }
html[data-skin] #side-menu > .nav-header .profile-element > span:empty { display: none; }
html[data-skin] #side-menu > .nav-header .profile-element .font-bold { display: block; color: var(--rbu-side-strong); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-skin] #side-menu > .nav-header .profile-element .text-muted { color: var(--rbu-side-text) !important; font-size: 11.5px; }
html[data-skin] #side-menu > .nav-header .profile-element .m-t-xs { margin-top: 0; }
html[data-skin] #side-menu > .nav-header .profile-element .dropdown-menu { min-width: 200px; }
html[data-skin] #side-menu .logo-element { display: none !important; }

html[data-skin] #side-menu > .nav-header .searchInput { position: relative; width: auto; margin: 10px 12px 0 !important; box-shadow: none; border-radius: var(--rbu-pill); }
html[data-skin] #side-menu > .nav-header .searchInput .rbu-search-icon { position: absolute; left: 13px; top: 11px; font-size: 14px; color: var(--rbu-side-text); pointer-events: none; }
html[data-skin] #side-menu > .nav-header .searchInput input {
  width: 100%; height: 38px !important; padding: 0 12px 0 36px !important; font-size: 13px !important;
  color: var(--rbu-side-strong) !important; background: var(--rbu-side-hover) !important;
  border: 1px solid var(--rbu-side-line) !important; border-radius: var(--rbu-pill) !important; box-shadow: none !important;
}
html[data-skin] #side-menu > .nav-header .searchInput input::placeholder { color: var(--rbu-side-text); }
html[data-skin] #side-menu > .nav-header .searchInput input:focus { border-color: var(--rbu-primary) !important; }
html[data-skin] #side-menu > .nav-header .searchInput.active .resultBox {
  position: absolute; left: 0; right: 0; top: 42px; z-index: 10; padding: 6px; margin: 0;
  background: var(--rbu-surface); border: 1px solid var(--rbu-border); border-radius: var(--rbu-radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}
html[data-skin] #side-menu > .nav-header .resultBox li { padding: 0; border-radius: 6px; }
html[data-skin] #side-menu > .nav-header .resultBox li a { display: block; padding: 7px 10px; color: var(--rbu-text) !important; font-size: 13px; border-radius: 6px; }
html[data-skin] #side-menu > .nav-header .resultBox li a:hover { color: var(--rbu-primary) !important; background: var(--rbu-surface-2); }

/* menu built by app.authorised-menu.js:
   level 1 = section label, level 2 = icon items, level 3+ = sub items */
html[data-skin] #side-menu li { margin-top: 0 !important; background: transparent !important; border-left: 0 !important; }
html[data-skin] #side-menu .nav { flex-direction: column; flex-wrap: nowrap; padding-left: 0; }
html[data-skin] #side-menu .fa.arrow { float: none; margin-left: auto; padding-left: 6px; font-size: 12px; opacity: .65; }
html[data-skin] #side-menu > li > a {
  display: flex; align-items: center; margin: 14px 12px 4px; padding: 4px 10px !important;
  font-size: 10.5px; font-weight: 700 !important; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rbu-side-text) !important; opacity: .8; background: transparent !important;
}
html[data-skin] #side-menu > li > ul > li > a {
  display: flex; align-items: center; gap: 11px; min-height: 42px; margin: 2px 12px; padding: 5px 10px !important;
  font-size: 13.5px; font-weight: 600 !important; line-height: 1.25; color: var(--rbu-side-text) !important;
  background: transparent !important; border-radius: var(--rbu-pill);
  transition: background .15s ease, color .15s ease;
}
html[data-skin] #side-menu > li > ul > li > a:hover,
html[data-skin] #side-menu > li > ul > li > a:focus { color: var(--rbu-side-strong) !important; background: var(--rbu-side-hover) !important; }
html[data-skin] #side-menu > li > ul > li.rbu-current-branch > a { color: var(--rbu-side-strong) !important; }
html[data-skin] #side-menu > li > ul > li > a.rbu-current { color: var(--rbu-side-active-text) !important; background: var(--rbu-side-active-bg) !important; }
html[data-skin="royal"] #side-menu > li > ul > li > a.rbu-current { box-shadow: inset 3px 0 0 var(--rbu-primary); }
html[data-skin] #side-menu .nav-label { flex: 1; min-width: 0; white-space: normal; }

/* a module: one row with icon, name, page count and arrow. The open module
   becomes a tinted card that holds its pages, so it is clear where it ends. */
html[data-skin] #side-menu > li > ul > li { margin: 2px 10px !important; border-radius: 14px; transition: background .15s ease; }
html[data-skin] #side-menu > li > ul > li > a { margin: 0; border-radius: 12px; }
html[data-skin] #side-menu > li > ul > li.active:has(> ul) {
  padding-bottom: 8px; background: color-mix(in srgb, var(--rbu-side-strong) 6%, transparent) !important;
  box-shadow: inset 0 0 0 1px var(--rbu-side-line);
}
html[data-skin] #side-menu > li > ul > li.active:has(> ul) > a { color: var(--rbu-side-strong) !important; }
html[data-skin] #side-menu .rbu-count {
  flex-shrink: 0; min-width: 22px; padding: 2px 7px; font-size: 10.5px; font-weight: 700; line-height: 1.3; text-align: center;
  color: var(--rbu-side-text); background: color-mix(in srgb, var(--rbu-side-strong) 10%, transparent); border-radius: 999px;
}
html[data-skin] #side-menu .rbu-count + .fa.arrow { margin-left: 0; }
html[data-skin] #side-menu .fa.arrow { transition: transform .15s ease; }

/* pages inside a module: a tree on a solid guide line; each row has a tick to
   the line, groups are bold with their own arrow and nest one step further in */
html[data-skin] #side-menu > li > ul > li ul { margin: 2px 8px 0 25px; padding: 0; border-left: 1.5px solid var(--rbu-side-line); }
html[data-skin] #side-menu > li > ul > li ul ul { margin: 0 0 4px 21px; }
html[data-skin] #side-menu > li > ul > li ul a {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 10px !important; margin: 1px 0 1px 12px;
  font-size: 13px; font-weight: 500 !important; line-height: 1.3; color: var(--rbu-side-text) !important;
  background: transparent !important; border-radius: 9px;
}
html[data-skin] #side-menu > li > ul > li ul a::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 9px; height: 0; border-top: 1.5px solid var(--rbu-side-line);
}
html[data-skin] #side-menu > li > ul > li ul a:hover { color: var(--rbu-side-strong) !important; background: var(--rbu-side-hover) !important; }
html[data-skin] #side-menu > li > ul > li ul li:has(> ul) > a { font-weight: 600 !important; color: var(--rbu-side-strong) !important; }
html[data-skin] #side-menu > li > ul > li ul a.rbu-current {
  color: var(--rbu-side-active-text) !important; font-weight: 600 !important; background: var(--rbu-side-active-bg) !important;
}
html[data-skin] #side-menu > li > ul > li ul a.rbu-current::before { left: -13.5px; width: 11px; border-top: 0; height: 100%; top: 0; border-left: 3px solid var(--rbu-accent); border-radius: 2px; }

/* coloured menu icons (added by rbu-theme.js from the menu name) */
html[data-skin] .rbu-ico.fa {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0;
  font-size: 15px; line-height: 1;
  color: color-mix(in srgb, var(--rbu-k, var(--rbu-c1)) var(--rbu-ico-mix), #fff);
  background: color-mix(in srgb, var(--rbu-k, var(--rbu-c1)) 20%, transparent); border-radius: 10px;
}
html[data-skin="emerald"] .rbu-ico.fa { border-radius: 50%; }
.rbu-k1 { --rbu-k: var(--rbu-c1); } .rbu-k2 { --rbu-k: var(--rbu-c2); } .rbu-k3 { --rbu-k: var(--rbu-c3); }
.rbu-k4 { --rbu-k: var(--rbu-c4); } .rbu-k5 { --rbu-k: var(--rbu-c5); } .rbu-k6 { --rbu-k: var(--rbu-c6); }
html[data-skin] #side-menu a.rbu-current > .rbu-ico.fa { color: inherit; background: rgba(0, 0, 0, .10); }
html[data-skin="ocean"] #side-menu a.rbu-current > .rbu-ico.fa { background: rgba(255, 255, 255, .22); }

/* mobile backdrop (element added by rbu-theme.js) */
.rbu-side-backdrop { display: none; position: fixed; inset: 0; z-index: 1034; background: rgba(8, 10, 24, .5); }

/* ---------- 4. Shell: page, top bar, footer -------------------------------- */
html[data-skin] #page-wrapper { padding: 0 var(--rbu-gap) 56px; background: transparent; }
html[data-skin] body.canvas-menu nav.navbar-static-side ~ #page-wrapper { margin-left: calc(var(--rbu-side-w) + var(--rbu-float)); transition: margin-left .2s ease; }

html[data-skin] #page-wrapper > .rbu-topbar {
  display: block; position: sticky; top: 0; z-index: 1030;
  margin: 0 calc(-1 * var(--rbu-gap)) 18px; padding: 0; border: 0 !important;
}
html[data-skin] .rbu-topbar > .navbar-static-top {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; width: auto; max-width: none;
  min-height: var(--rbu-top-h); margin: 0 !important; padding: 0 var(--rbu-gap);
  color: var(--rbu-top-text); background: var(--rbu-top-bg); border: 0; border-bottom: var(--rbu-top-line); border-radius: 0; box-shadow: none;
}
html[data-skin="emerald"] .rbu-topbar > .navbar-static-top { padding-top: var(--rbu-float); backdrop-filter: none; }
html[data-skin="emerald"] #page-wrapper > .rbu-topbar { background: linear-gradient(var(--rbu-bg) 70%, transparent); }
html[data-skin] .rbu-topbar .navbar-header { float: none; display: flex; }
html[data-skin] .rbu-topbar .navbar-minimalize {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0; padding: 0; float: none;
  font-size: 17px; color: #fff; background: var(--rbu-grad); border: 0; border-radius: var(--rbu-pill); box-shadow: none;
}
html[data-skin="ocean"] .rbu-topbar .navbar-minimalize { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26); }
html[data-skin] .rbu-topbar .navbar-minimalize:hover { color: #fff; filter: brightness(1.08); }
html[data-skin] .rbu-topbar .window-title {
  flex: 1 1 auto; min-width: 0; height: auto; margin: 0 !important; padding: 0; float: none;
  font-size: 18px; font-weight: 700; line-height: 1.2; white-space: normal; color: var(--rbu-top-text);
}
html[data-skin] .rbu-topbar .navbar-top-links {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0 0 0 auto; padding: 0; float: none !important;
}
html[data-skin] .rbu-topbar .navbar-top-links > li { display: block; margin: 0 !important; }
html[data-skin] .rbu-topbar .navbar-top-links > li > a.btn-logout {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  font-weight: 600; color: var(--rbu-top-btn-color); background: var(--rbu-top-btn-bg);
  border: 1px solid var(--rbu-top-btn-border); border-radius: var(--rbu-pill);
}
html[data-skin] .rbu-topbar .navbar-top-links > li > a.btn-logout:hover { color: #fff; background: var(--rbu-danger); border-color: var(--rbu-danger); }
/* "My work" link for university users, with the number of items waiting */
html[data-skin] .rbu-topbar .navbar-top-links > li > a.rbu-mywork-link {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  font-weight: 600; color: var(--rbu-top-btn-color); background: var(--rbu-top-btn-bg);
  border: 1px solid var(--rbu-top-btn-border); border-radius: var(--rbu-pill);
}
html[data-skin] .rbu-topbar .navbar-top-links > li > a.rbu-mywork-link:hover { color: #fff; background: var(--rbu-primary); border-color: var(--rbu-primary); }
html[data-skin] .rbu-mywork-badge {
  min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: #fff; background: var(--rbu-danger); font-variant-numeric: tabular-nums;
}
html[data-skin] .rbu-mywork-badge[hidden] { display: none; }
@media (max-width: 575.98px) { html[data-skin] .rbu-topbar a.rbu-mywork-link { padding: 0 10px; font-size: 0; gap: 4px; } html[data-skin] .rbu-topbar a.rbu-mywork-link .fa { font-size: 15px; } html[data-skin] .rbu-topbar a.rbu-mywork-link .rbu-mywork-badge { font-size: 11px; } }

/* signed-in user (and employee code / designation for Leave logins) in the top bar */
html[data-skin] .rbu-topbar .navbar-top-links > li.au-user-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; max-width: 320px;
  color: var(--rbu-text); background: var(--rbu-surface-2); border: 1px solid var(--rbu-border); border-radius: var(--rbu-pill);
  font-weight: 600; white-space: nowrap; overflow: hidden;
}
html[data-skin] .rbu-topbar li.au-user-chip .fa { color: var(--rbu-primary); font-size: 16px; }
html[data-skin] .rbu-topbar li.au-user-chip .au-user-name { overflow: hidden; text-overflow: ellipsis; }
html[data-skin] .rbu-topbar li.au-user-chip .au-user-meta { font-weight: 500; font-size: 12px; color: var(--rbu-muted); }
@media (max-width: 991.98px) { html[data-skin] .rbu-topbar li.au-user-chip .au-user-meta { display: none; } }
@media (max-width: 575.98px) { html[data-skin] .rbu-topbar li.au-user-chip { display: none !important; } }

html[data-skin] #page-wrapper > .footer {
  position: absolute; left: var(--rbu-gap); right: var(--rbu-gap); bottom: 0; padding: 12px 2px;
  font-size: 12px; color: var(--rbu-muted); background: transparent; border-top: 1px solid var(--rbu-border);
}

/* ---------- 5. Theme selector ---------------------------------------------- */
.rbu-theme-pick { position: relative; display: flex; align-items: center; gap: 8px; }
.rbu-top-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; flex-shrink: 0;
  font-size: 16px; color: var(--rbu-top-btn-color); background: var(--rbu-top-btn-bg);
  border: 1px solid var(--rbu-top-btn-border); border-radius: var(--rbu-pill); cursor: pointer;
}
.rbu-top-btn:hover { color: var(--rbu-primary); border-color: var(--rbu-primary); }
html[data-skin="ocean"] .rbu-topbar .rbu-top-btn:hover { color: #fff; border-color: #fff; }
html[data-bs-theme="light"] .rbu-top-btn .fa-sun-o, html[data-bs-theme="dark"] .rbu-top-btn .fa-moon-o { display: none; }
.rbu-theme-pick.rbu-floating { position: fixed; top: 14px; right: 16px; z-index: 1040; }
.rbu-theme-pick.rbu-floating .rbu-top-btn { color: var(--rbu-text); background: var(--rbu-surface); border-color: var(--rbu-border); box-shadow: var(--rbu-shadow); }
.rbu-theme-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 1060; width: 270px; padding: 10px; text-align: left;
  color: var(--rbu-text); background: var(--rbu-surface); border: 1px solid var(--rbu-border); border-radius: var(--rbu-radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.rbu-theme-pick.open .rbu-theme-menu { display: block; }
.rbu-tm-title { padding: 6px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rbu-muted); }
.rbu-tm-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; color: var(--rbu-text); text-align: left; background: transparent; border: 1px solid transparent; border-radius: var(--rbu-radius); cursor: pointer; }
.rbu-tm-item:hover { background: var(--rbu-surface-2); }
.rbu-tm-item.on { border-color: var(--rbu-primary); background: var(--rbu-primary-soft); }
.rbu-tm-item .rbu-sw { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.rbu-tm-item[data-rbu-skin="royal"] .rbu-sw { background: linear-gradient(135deg, #ffffff 50%, #2451d6 50%); }
.rbu-tm-item[data-rbu-skin="emerald"] .rbu-sw { background: linear-gradient(135deg, #0f3d38 50%, #34d399 50%); }
.rbu-tm-item[data-rbu-skin="slate"] .rbu-sw { background: linear-gradient(135deg, #18181b 50%, #f59e0b 50%); }
.rbu-tm-item[data-rbu-skin="heritage"] .rbu-sw { background: linear-gradient(135deg, #5a1027 50%, #c9952b 50%); }
.rbu-tm-item[data-rbu-skin="ocean"] .rbu-sw { background: linear-gradient(135deg, #0b4f6c 50%, #22d3ee 50%); }
.rbu-tm-text { flex: 1; line-height: 1.2; } .rbu-tm-text b { display: block; font-size: 13.5px; } .rbu-tm-text small { color: var(--rbu-muted); font-size: 11.5px; }
.rbu-tm-check { visibility: hidden; color: var(--rbu-primary); } .rbu-tm-item.on .rbu-tm-check { visibility: visible; }
.rbu-tm-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 4px 4px; }
.rbu-tm-mode button { padding: 8px; font-size: 13px; font-weight: 600; color: var(--rbu-text); background: var(--rbu-surface-2); border: 1px solid var(--rbu-border); border-radius: var(--rbu-radius); cursor: pointer; }
.rbu-tm-mode button.on { color: var(--rbu-on-btn); background: var(--rbu-btn-bg); border-color: var(--rbu-btn-bg); }

/* icon-rail fly-out (element added by rbu-theme.js) */
.rbu-fly {
  position: fixed; z-index: 1050; display: none; min-width: 220px; max-width: 300px; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; padding: 8px;
  color: var(--rbu-text); background: var(--rbu-surface); border: 1px solid var(--rbu-border); border-radius: var(--rbu-radius); box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}
.rbu-fly.show { display: block; }
.rbu-fly.tip { min-width: 0; padding: 0; }
.rbu-fly-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 4px 6px 10px;
  font-weight: 700; font-size: 14px; color: var(--rbu-text); border-bottom: 1px solid var(--rbu-border);
}
.rbu-fly.tip .rbu-fly-title { margin: 0; padding: 7px 12px; font-size: 13px; border: 0; }
.rbu-fly a { position: relative; display: block; padding: 7px 10px; font-size: 13px; color: var(--rbu-text) !important; border-radius: 8px; }
.rbu-fly a:hover { color: var(--rbu-primary) !important; background: var(--rbu-surface-2); }
.rbu-fly a.rbu-current { font-weight: 700; color: var(--rbu-primary) !important; background: var(--rbu-primary-soft); }
/* a group inside the fly-out: bold row with arrow and page count; its pages
   are indented on a guide line and can be folded away */
.rbu-fly-group {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; text-align: left;
  font-size: 13px; font-weight: 700; color: var(--rbu-text); background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.rbu-fly-group:hover { background: var(--rbu-surface-2); }
.rbu-fly-group > .fa { width: 12px; text-align: center; color: var(--rbu-primary); transition: transform .15s ease; }
.rbu-fly-group > span { flex: 1; min-width: 0; }
.rbu-fly-group > small { padding: 1px 7px; font-size: 10.5px; font-weight: 700; color: var(--rbu-muted); background: var(--rbu-surface-2); border-radius: 999px; }
.rbu-fly-node.open > .rbu-fly-group > .fa { transform: rotate(90deg); }
.rbu-fly-sub { display: none; margin: 0 0 4px 15px; padding-left: 10px; border-left: 1.5px solid var(--rbu-border); }
.rbu-fly-node.open > .rbu-fly-sub { display: block; }
.rbu-fly-sub > a::before { content: ""; position: absolute; left: -10px; top: 50%; width: 8px; border-top: 1.5px solid var(--rbu-border); }

/* ---------- 6. Icon rail (desktop) and slide-over (phones) ----------------- */
@media (min-width: 769px) {
  html[data-skin] body.canvas-menu.mini-navbar nav.navbar-static-side { width: var(--rbu-side-mini); }
  html[data-skin] body.canvas-menu.mini-navbar nav.navbar-static-side ~ #page-wrapper { margin-left: calc(var(--rbu-side-mini) + var(--rbu-float)); }
  html[data-skin] body.mini-navbar #side-menu > .nav-header .rbu-brand { justify-content: center; padding: 0; }
  html[data-skin] body.mini-navbar #side-menu > .nav-header .rbu-brand-text,
  html[data-skin] body.mini-navbar #side-menu > .nav-header .profile-element > .dropdown-toggle .clear,
  html[data-skin] body.mini-navbar #side-menu > .nav-header .searchInput input,
  html[data-skin] body.mini-navbar #side-menu > .nav-header .searchInput .resultBox,
  html[data-skin] body.mini-navbar #side-menu > li > a,
  html[data-skin] body.mini-navbar #side-menu .nav-label,
  html[data-skin] body.mini-navbar #side-menu .rbu-count,
  html[data-skin] body.mini-navbar #side-menu .fa.arrow,
  html[data-skin] body.mini-navbar #side-menu > li > ul > li > ul { display: none !important; }
  html[data-skin] body.mini-navbar #side-menu > .nav-header .profile-element { justify-content: center; margin: 12px 10px 0; padding: 6px 0; background: transparent; }
  html[data-skin] body.mini-navbar #side-menu > .nav-header .profile-element > .dropdown-toggle { flex: 0 0 auto; }
  html[data-skin] body.mini-navbar #side-menu > .nav-header .searchInput {
    display: flex; align-items: center; justify-content: center; height: 40px; margin: 8px 12px 0 !important; cursor: pointer;
    background: var(--rbu-side-hover); border-radius: var(--rbu-pill);
  }
  html[data-skin] body.mini-navbar #side-menu > .nav-header .searchInput .rbu-search-icon { position: static; }
  html[data-skin] body.mini-navbar #side-menu > li > ul { display: block !important; height: auto !important; margin-top: 10px; }
  html[data-skin] body.mini-navbar #side-menu > li > ul > li { margin: 3px 10px !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
  html[data-skin] body.mini-navbar #side-menu > li > ul > li > a { justify-content: center; padding: 5px 0 !important; }
}
@media (max-width: 768.98px) {
  html[data-skin] { --rbu-gap: 12px; --rbu-float: 0px; }
  html[data-skin] body.canvas-menu nav.navbar-static-side { top: 0; bottom: 0; left: 0; border-radius: 0; transform: translateX(-105%); }
  html[data-skin] body.canvas-menu.mini-navbar nav.navbar-static-side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .35); }
  html[data-skin] body.canvas-menu nav.navbar-static-side ~ #page-wrapper { margin-left: 0; }
  html[data-skin] body.canvas-menu.mini-navbar .rbu-side-backdrop { display: block; }
  html[data-skin] body.canvas-menu nav.navbar-static-side .close-canvas-menu {
    display: block; position: absolute; top: 18px; right: 14px; z-index: 10; color: var(--rbu-brand-text); font-size: 18px;
  }
  html[data-skin] .rbu-topbar .window-title { font-size: 15px; }
  html[data-skin] .rbu-topbar .navbar-top-links > li > a.btn-logout { width: 40px; padding: 0; justify-content: center; font-size: 0; }
  html[data-skin] .rbu-topbar .navbar-top-links > li > a.btn-logout .fa { font-size: 16px; }
}

/* ---------- 7. Cards: ibox, panels, widgets -------------------------------- */
:where(html[data-skin]) .ibox { margin-bottom: 20px; background: transparent; border: 0; }
:where(html[data-skin]) .ibox-title {
  min-height: 48px; padding: 14px 18px 10px; color: var(--rbu-text); background: var(--rbu-surface);
  border: 1px solid var(--rbu-border); border-bottom: 0; border-top: var(--rbu-ph-top);
  border-radius: var(--rbu-radius-lg) var(--rbu-radius-lg) 0 0;
}
:where(html[data-skin]) .ibox-title h5 { font-weight: 700; }
:where(html[data-skin]) .ibox-tools a { color: var(--rbu-muted); }
:where(html[data-skin]) .ibox-content {
  padding: 18px; color: var(--rbu-text); background: var(--rbu-surface);
  border: 1px solid var(--rbu-border); border-radius: var(--rbu-radius-lg); box-shadow: var(--rbu-shadow);
}
:where(html[data-skin]) .ibox-title + .ibox-content { border-top: 1px solid var(--rbu-border); border-radius: 0 0 var(--rbu-radius-lg) var(--rbu-radius-lg); }
:where(html[data-skin]) .ibox-footer { color: var(--rbu-muted); background: var(--rbu-surface-2); border-color: var(--rbu-border); }
/* The common "ibox > ibox-content > tab-content > row > col > panel" wrapper:
   show the panel as the card instead of a card inside a card. */
:where(html[data-skin]) .ibox-content:has(> .tab-content:only-child > .row:only-child > [class*="col-"]:only-child > .panel:only-child) {
  padding: 0; background: transparent; border: 0; box-shadow: none;
}

:where(html[data-skin]) .panel {
  color: var(--rbu-text); background-color: var(--rbu-surface); border: 1px solid var(--rbu-border);
  border-radius: var(--rbu-radius-lg); box-shadow: var(--rbu-shadow);
}
:where(html[data-skin]) .panel.no-radius { border-radius: var(--rbu-radius-lg) !important; }
:where(html[data-skin]) .panel-heading { padding: 12px 16px; font-weight: 700; font-size: 14.5px; font-family: var(--rbu-head-font); border-radius: calc(var(--rbu-radius-lg) - 1px) calc(var(--rbu-radius-lg) - 1px) 0 0; }
:where(html[data-skin]) .panel-heading.no-radius { border-radius: calc(var(--rbu-radius-lg) - 1px) calc(var(--rbu-radius-lg) - 1px) 0 0 !important; }
:where(html[data-skin]) .panel-primary { border-color: var(--rbu-border); }
:where(html[data-skin]) .panel-primary > .panel-heading {
  color: var(--rbu-ph-color); background: var(--rbu-ph-bg); border: 0; border-top: var(--rbu-ph-top); border-bottom: var(--rbu-ph-bottom);
}
:where(html[data-skin]) .panel-default > .panel-heading { color: var(--rbu-text); background: var(--rbu-surface-2); border-bottom: 1px solid var(--rbu-border); }
/* as in Inspinia: solid header in the theme's status colour with white text
   (views put white titles in these headers) */
:where(html[data-skin]) .panel-success > .panel-heading, :where(html[data-skin]) .panel-info > .panel-heading,
:where(html[data-skin]) .panel-warning > .panel-heading, :where(html[data-skin]) .panel-danger > .panel-heading {
  color: #fff; background: var(--rbu-k); border-bottom: 1px solid var(--rbu-k);
}
:where(html[data-skin]) .panel-warning > .panel-heading { background: color-mix(in srgb, var(--rbu-k) 68%, #000); border-color: transparent; }
:where(html[data-skin]) .panel-success { --rbu-k: var(--rbu-success); } :where(html[data-skin]) .panel-info { --rbu-k: var(--rbu-info); }
:where(html[data-skin]) .panel-warning { --rbu-k: var(--rbu-warning); } :where(html[data-skin]) .panel-danger { --rbu-k: var(--rbu-danger); }
:where(html[data-skin]) .panel-success, :where(html[data-skin]) .panel-info, :where(html[data-skin]) .panel-warning, :where(html[data-skin]) .panel-danger { border-color: color-mix(in srgb, var(--rbu-k) 30%, var(--rbu-border)); }
:where(html[data-skin]) .panel-body { color: var(--rbu-text); }
:where(html[data-skin]) .panel-footer { color: var(--rbu-muted); background: var(--rbu-surface-2); border-color: var(--rbu-border); }

:where(html[data-skin]) .widget { position: relative; overflow: hidden; border-radius: var(--rbu-radius-lg); box-shadow: var(--rbu-shadow); transition: transform .18s ease; }
:where(html[data-skin]) .widget:hover { transform: translateY(-3px); }
:where(html[data-skin]) .widget::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
:where(html[data-skin]) .widget a, :where(html[data-skin]) .widget h1, :where(html[data-skin]) .widget h2, :where(html[data-skin]) .widget h3, :where(html[data-skin]) .widget i { color: #fff; }
:where(html[data-skin]) .navy-bg { --rbu-k: var(--rbu-primary); } :where(html[data-skin]) .yellow-bg { --rbu-k: var(--rbu-c3); }
/* Inspinia's lazur/blue/red tiles take the theme's own accents */
:where(html[data-skin]) .lazur-bg { --rbu-k: var(--rbu-c2); } :where(html[data-skin]) .blue-bg { --rbu-k: var(--rbu-c4); } :where(html[data-skin]) .red-bg { --rbu-k: var(--rbu-c6); }
:where(html[data-skin]) .navy-bg, :where(html[data-skin]) .yellow-bg, :where(html[data-skin]) .lazur-bg, :where(html[data-skin]) .blue-bg, :where(html[data-skin]) .red-bg {
  color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--rbu-k) 90%, #000), color-mix(in srgb, var(--rbu-k) 64%, #000));
}

/* ---------- 8. Buttons ----------------------------------------------------- */
:where(html[data-skin]) .btn { border-radius: var(--rbu-pill); font-weight: 600; }
html[data-skin] .btn-primary, html[data-skin] .btn-primary:focus {
  color: var(--rbu-on-btn); background-color: var(--rbu-btn-bg); border-color: var(--rbu-btn-bg);
}
html[data-skin] .btn-primary:hover, html[data-skin] .btn-primary:active, html[data-skin] .btn-primary.active,
html[data-skin] .btn-primary:active:focus, html[data-skin] .btn-primary:active:hover, html[data-skin] .open .dropdown-toggle.btn-primary {
  color: var(--rbu-on-btn); background-color: var(--rbu-btn-bg-2); border-color: var(--rbu-btn-bg-2);
}
html[data-skin] .btn-primary.btn-outline { color: var(--rbu-primary); background-color: transparent; border-color: var(--rbu-primary); }
html[data-skin] .btn-primary.btn-outline:hover { color: var(--rbu-on-btn); background-color: var(--rbu-btn-bg); }
/* the theme's status colours (white text; warning has dark text below) */
html[data-skin] .btn-success { --rbu-k: var(--rbu-success); } html[data-skin] .btn-info { --rbu-k: var(--rbu-info); }
html[data-skin] .btn-warning { --rbu-k: var(--rbu-warning); } html[data-skin] .btn-danger { --rbu-k: var(--rbu-danger); }
html[data-skin] .btn-success, html[data-skin] .btn-info, html[data-skin] .btn-warning, html[data-skin] .btn-danger,
html[data-skin] .btn-success:focus, html[data-skin] .btn-info:focus, html[data-skin] .btn-warning:focus, html[data-skin] .btn-danger:focus {
  color: #fff; background-color: var(--rbu-k); border-color: var(--rbu-k);
}
html[data-skin] .btn-success:hover, html[data-skin] .btn-info:hover, html[data-skin] .btn-warning:hover, html[data-skin] .btn-danger:hover,
html[data-skin] .btn-success:active, html[data-skin] .btn-info:active, html[data-skin] .btn-warning:active, html[data-skin] .btn-danger:active {
  color: #fff; background-color: color-mix(in srgb, var(--rbu-k) 85%, #000); border-color: color-mix(in srgb, var(--rbu-k) 85%, #000);
}
/* amber is too light for white text: dark text instead (white was about 2:1) */
html[data-skin] .btn-warning, html[data-skin] .btn-warning:focus,
html[data-skin] .btn-warning:hover, html[data-skin] .btn-warning:active { color: var(--rbu-on-warning); }
/* style.css forces .btn-Reset to firebrick (!important); it takes the theme's danger colour instead */
:where(html[data-skin]) .btn-Reset, :where(html[data-skin]) .btn-Reset:hover, :where(html[data-skin]) .btn-Reset:focus {
  color: #fff !important; background-color: var(--rbu-danger) !important; border-color: var(--rbu-danger) !important;
}
:where(html[data-skin]) .btn-default, :where(html[data-skin]) .btn-white, :where(html[data-skin]) .btn-default:focus, :where(html[data-skin]) .btn-white:focus {
  color: var(--rbu-text); background-color: var(--rbu-surface); border: 1px solid var(--rbu-border);
}
:where(html[data-skin]) .btn-default:hover, :where(html[data-skin]) .btn-white:hover, :where(html[data-skin]) .btn-default:active, :where(html[data-skin]) .btn-white:active {
  color: var(--rbu-primary); background-color: var(--rbu-surface-2); border-color: var(--rbu-primary);
}
:where(html[data-skin]) .btn-link { color: var(--rbu-primary); }

/* ---------- 9. Forms ------------------------------------------------------- */
:where(html[data-skin]) .form-control, :where(html[data-skin]) .single-line {
  color: var(--rbu-text); background-color: var(--rbu-surface); border: 1px solid var(--rbu-border);
  border-radius: var(--rbu-radius); box-shadow: none;
}
:where(html[data-skin="emerald"]) .form-control { background-color: var(--rbu-surface-2); }
:where(html[data-skin]) .form-control:focus, :where(html[data-skin]) .single-line:focus {
  color: var(--rbu-text); background-color: var(--rbu-surface); border-color: var(--rbu-primary) !important;
  box-shadow: 0 0 0 3px var(--rbu-primary-soft);
}
:where(html[data-skin]) .form-control::placeholder { color: var(--rbu-muted); opacity: .85; }
:where(html[data-skin]) .form-control[disabled], :where(html[data-skin]) .form-control[readonly], :where(html[data-skin]) fieldset[disabled] .form-control {
  color: var(--rbu-text); background-color: var(--rbu-surface-2); opacity: .85;
}
:where(html[data-skin]) select.form-control option { color: var(--rbu-text); background-color: var(--rbu-surface); }
:where(html[data-skin]) .input-group-addon { color: var(--rbu-muted); background: var(--rbu-surface-2); border-color: var(--rbu-border); }
:where(html[data-skin]) legend { color: var(--rbu-text); border-color: var(--rbu-border); }

/* ---------- 10. Tables and DataTables -------------------------------------- */
:where(html[data-skin]) .table {
  --bs-table-bg: transparent; --bs-table-color: var(--rbu-text); --bs-table-border-color: var(--rbu-border);
  --bs-table-striped-bg: var(--rbu-surface-2); --bs-table-striped-color: var(--rbu-text);
  --bs-table-hover-bg: var(--rbu-primary-soft); --bs-table-hover-color: var(--rbu-text);
  --bs-table-active-bg: var(--rbu-primary-soft); --bs-table-active-color: var(--rbu-text);
  color: var(--rbu-text); border-color: var(--rbu-border);
}
:where(html[data-skin]) .table > :not(caption) > * > *,
:where(html[data-skin]) .table-bordered > thead > tr > th, :where(html[data-skin]) .table-bordered > tbody > tr > td,
:where(html[data-skin]) .table-bordered > tbody > tr > th, :where(html[data-skin]) .table-bordered > tfoot > tr > td,
:where(html[data-skin]) .table > thead > tr > th, :where(html[data-skin]) .table > tbody > tr > td, :where(html[data-skin]) .table > tfoot > tr > td { border-color: var(--rbu-border); }
:where(html[data-skin]) .table > thead > tr > th, :where(html[data-skin]) table.dataTable > thead > tr > th {
  color: var(--rbu-th-color); background-color: var(--rbu-th-bg); font-weight: 700; font-size: 12.5px;
  vertical-align: middle; border-bottom: 2px solid var(--rbu-th-line);
}
:where(html[data-skin]) .table-striped > tbody > tr:nth-of-type(odd),
:where(html[data-skin]) .table-hover > tbody > tr:hover { background-color: transparent; }
:where(html[data-skin]) .table > tbody > tr.active > td, :where(html[data-skin]) .table > tbody > tr.selected > td { background-color: var(--rbu-primary-soft); }

/* tables wider than the content area scroll inside their card instead of being cut off */
html[data-skin] .dataTables_wrapper { color: var(--rbu-text); overflow-x: auto; }
/* DataTables' Bootstrap rows have negative side margins; inside a scrolling wrapper
   they would add a needless scrollbar, so the outer edges are flattened instead */
html[data-skin] .dataTables_wrapper > .row { margin-left: 0; margin-right: 0; }
html[data-skin] .dataTables_wrapper > .row > [class*="col-"]:first-child { padding-left: 0; }
html[data-skin] .dataTables_wrapper > .row > [class*="col-"]:last-child { padding-right: 0; }
/* DataTables fixes a table's width in px when it first draws; when the content area
   later narrows (side panel expanded, scrollbar appears) that leaves a needless
   scrollbar. 100% follows the area; split-header scrolling tables keep their px sync. */
html[data-skin] table.dataTable:not(.dataTables_scrollHeadInner table, .dataTables_scrollBody table, .dataTables_scrollFootInner table) { width: 100% !important; }
/* Older filter forms place a button with style="position:absolute; top:22px" alone in a
   grid column. That column then has no height, so the content below slides up over the
   button (Withdraw_ApprovedVerify, SeatAllocation, MeritList ...). Keep such buttons in the
   normal flow, lined up with the input boxes beside them (label height = 26px). */
html[data-skin] [class*="col-"] > .btn:only-child[style*="position: absolute"],
html[data-skin] [class*="col-"] > .btn:only-child[style*="position:absolute"] {
  position: relative !important; top: auto !important; left: auto !important; right: auto !important;
  margin-left: 0 !important; margin-top: 26px; margin-bottom: 0;
}
/* its column sits at the bottom of the line, so the button lines up with the input boxes */
html[data-skin] .row > [class*="col-"]:has(> .btn:only-child[style*="position: absolute"]),
html[data-skin] .row > [class*="col-"]:has(> .btn:only-child[style*="position:absolute"]) { align-self: flex-end; }
/* only the table scrolls sideways (rbu-theme.js wraps each DataTable); the buttons,
   search and paging stay put, and a last column of buttons is pinned to the right */
html[data-skin] .rbu-dt-scroll { overflow-x: auto; max-width: 100%; margin-bottom: 8px; }
html[data-skin] .rbu-dt-scroll > table.dataTable { margin-bottom: 0 !important; }
html[data-skin] .rbu-dt-scroll .rbu-col-pin {
  position: sticky; right: 0; z-index: 2; white-space: nowrap;
  background-color: var(--rbu-surface);
}
html[data-skin] .rbu-dt-scroll thead .rbu-col-pin { background-image: linear-gradient(var(--rbu-th-bg), var(--rbu-th-bg)); z-index: 3; }
html[data-skin] .rbu-dt-scroll tr.selected > .rbu-col-pin, html[data-skin] .rbu-dt-scroll tr.active > .rbu-col-pin { background-image: linear-gradient(var(--rbu-primary-soft), var(--rbu-primary-soft)); }
/* soft edge while columns are hidden behind the pinned one */
html[data-skin] .rbu-dt-scroll.is-scroll:not(.at-end) .rbu-col-pin::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -10px; width: 10px; pointer-events: none;
  background: linear-gradient(to left, rgba(15, 23, 42, .14), transparent);
}
html[data-skin][data-bs-theme="dark"] .rbu-dt-scroll.is-scroll:not(.at-end) .rbu-col-pin::before { background: linear-gradient(to left, rgba(0, 0, 0, .45), transparent); }
html[data-skin] .dataTables_wrapper .dataTables_filter input, html[data-skin] .dataTables_wrapper .dataTables_length select {
  height: 34px; padding: 4px 10px; margin-left: 6px; color: var(--rbu-text); background-color: var(--rbu-surface);
  border: 1px solid var(--rbu-border); border-radius: var(--rbu-radius);
}
html[data-skin] .dataTables_wrapper .dataTables_info, html[data-skin] .dataTables_wrapper label { color: var(--rbu-muted); font-weight: 500; }
:where(html[data-skin]) .pagination > li > a, :where(html[data-skin]) .pagination > li > span { color: var(--rbu-text); background: var(--rbu-surface); border-color: var(--rbu-border); }
:where(html[data-skin]) .pagination > li > a:hover { color: var(--rbu-primary); border-color: var(--rbu-primary); background: var(--rbu-surface-2); }
:where(html[data-skin]) .pagination > .active > a, :where(html[data-skin]) .pagination > .active > a:hover, :where(html[data-skin]) .pagination > .active > span {
  color: var(--rbu-on-btn); background: var(--rbu-btn-bg); border-color: var(--rbu-btn-bg);
}
html[data-skin] .dt-buttons .dt-button, html[data-skin] a.dt-button, html[data-skin] button.dt-button {
  color: var(--rbu-text) !important; background: var(--rbu-surface) !important; border: 1px solid var(--rbu-border) !important;
  border-radius: var(--rbu-pill) !important; font-weight: 600; box-shadow: none !important;
}
html[data-skin] .dt-buttons .dt-button:hover, html[data-skin] a.dt-button:hover, html[data-skin] button.dt-button:hover {
  color: var(--rbu-primary) !important; border-color: var(--rbu-primary) !important;
}

/* ---------- 11. Modals, dropdowns, tabs, alerts ---------------------------- */
:where(html[data-skin]) .modal-content {
  color: var(--rbu-text); background: var(--rbu-surface); border: 1px solid var(--rbu-border);
  border-radius: var(--rbu-radius-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); overflow: hidden;
}
:where(html[data-skin]) .modal-header { align-items: center; padding: 13px 18px; color: var(--rbu-mh-color); background: var(--rbu-mh-bg); border-bottom: 0; }
:where(html[data-skin]) .modal-header .modal-title, :where(html[data-skin]) .modal-header h3,
:where(html[data-skin]) .modal-header h4, :where(html[data-skin]) .modal-header h5 { margin: 0; color: inherit; }
:where(html[data-skin]) .modal-header .close { color: inherit; opacity: .85; text-shadow: none; }
:where(html[data-skin]) .modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }
:where(html[data-skin]) .modal-body { color: var(--rbu-text); }
:where(html[data-skin]) .modal-footer { background: var(--rbu-surface-2); border-top: 1px solid var(--rbu-border); }
:where(html[data-skin]) .dropdown-menu {
  color: var(--rbu-text); background: var(--rbu-surface); border: 1px solid var(--rbu-border);
  border-radius: var(--rbu-radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .18); padding: 6px;
}
:where(html[data-skin]) .dropdown-menu > li > a { color: var(--rbu-text); border-radius: 6px; }
:where(html[data-skin]) .dropdown-menu > li > a:hover, :where(html[data-skin]) .dropdown-menu > li > a:focus { color: var(--rbu-primary); background: var(--rbu-surface-2); }
:where(html[data-skin]) .nav-tabs { border-bottom: 1px solid var(--rbu-border); }
:where(html[data-skin]) .nav-tabs > li > a, :where(html[data-skin]) .nav-tabs .nav-link {
  margin-bottom: -1px; color: var(--rbu-muted); font-weight: 700; background: transparent;
  border: 0; border-bottom: 3px solid transparent; border-radius: 0;
}
:where(html[data-skin]) .nav-tabs > li > a:hover { color: var(--rbu-primary); background: transparent; }
:where(html[data-skin]) .nav-tabs > li.active > a, :where(html[data-skin]) .nav-tabs > li.active > a:hover, :where(html[data-skin]) .nav-tabs > li.active > a:focus,
:where(html[data-skin]) .nav-tabs > li > a.active, :where(html[data-skin]) .nav-tabs .nav-link.active {
  color: var(--rbu-primary); background: transparent; border: 0; border-bottom: 3px solid var(--rbu-primary);
}
:where(html[data-skin]) .tab-content { color: var(--rbu-text); }
:where(html[data-skin]) .label, :where(html[data-skin]) .badge { color: var(--rbu-muted); background-color: var(--rbu-surface-2); }
html[data-skin] .label-primary, html[data-skin] .badge-primary { color: var(--rbu-on-btn) !important; background-color: var(--rbu-btn-bg) !important; }
html[data-skin] .label-success, html[data-skin] .badge-success { color: #fff !important; background-color: var(--rbu-success) !important; }
html[data-skin] .label-info, html[data-skin] .badge-info { color: #fff !important; background-color: var(--rbu-info) !important; }
html[data-skin] .label-warning, html[data-skin] .badge-warning { color: var(--rbu-on-warning) !important; background-color: var(--rbu-warning) !important; }
html[data-skin] .label-danger, html[data-skin] .badge-danger { color: #fff !important; background-color: var(--rbu-danger) !important; }
:where(html[data-skin]) .alert { border-radius: var(--rbu-radius); }
:where(html[data-skin]) .well { color: var(--rbu-text); background: var(--rbu-surface-2); border-color: var(--rbu-border); }
:where(html[data-skin]) .progress { background-color: var(--rbu-surface-2); border-radius: 999px; }
:where(html[data-skin]) .list-group-item { color: var(--rbu-text); background-color: var(--rbu-surface); border-color: var(--rbu-border); }

/* ---------- 12. Plugins ---------------------------------------------------- */
/* Select2 4.0 */
html[data-skin] .select2-container--default .select2-selection--single,
html[data-skin] .select2-container--default .select2-selection--multiple {
  min-height: 34px; color: var(--rbu-text); background-color: var(--rbu-surface); border: 1px solid var(--rbu-border); border-radius: var(--rbu-radius);
}
/* same height as the control it replaces (Bootstrap 3: 34px, input-sm 30px), so it lines up with buttons */
html[data-skin] .select2-container--default .select2-selection--single { height: 34px; }
html[data-skin] .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 32px; color: var(--rbu-text); }
html[data-skin] :is(select.input-sm, .form-group-sm select, .input-group-sm select) + .select2-container--default .select2-selection--single { height: 30px; min-height: 30px; }
html[data-skin] :is(select.input-sm, .form-group-sm select, .input-group-sm select) + .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 28px; }
html[data-skin] :is(select.input-sm, .form-group-sm select, .input-group-sm select) + .select2-container--default .select2-selection--single .select2-selection__arrow { height: 28px; }
html[data-skin] .select2-container--default .select2-selection--single .select2-selection__arrow { height: 32px; }
html[data-skin] .select2-container--default.select2-container--focus .select2-selection--multiple,
html[data-skin] .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--rbu-primary); }
html[data-skin] .select2-dropdown { color: var(--rbu-text); background-color: var(--rbu-surface); border-color: var(--rbu-border); border-radius: var(--rbu-radius); overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, .18); }
html[data-skin] .select2-container--default .select2-search--dropdown .select2-search__field { color: var(--rbu-text); background: var(--rbu-surface-2); border-color: var(--rbu-border); border-radius: 6px; }
html[data-skin] .select2-container--default .select2-results__option--highlighted[aria-selected] { color: var(--rbu-on-btn); background-color: var(--rbu-btn-bg); }
html[data-skin] .select2-container--default .select2-results__option[aria-selected="true"] { color: var(--rbu-text); background-color: var(--rbu-primary-soft); }
html[data-skin] .select2-container--default .select2-selection--multiple .select2-selection__choice { color: var(--rbu-on-btn); background-color: var(--rbu-btn-bg); border: 0; border-radius: 6px; }
html[data-skin] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: inherit; }

/* bootstrap-datepicker, bootstrap-datetimepicker, jQuery UI */
html[data-skin] .datepicker.dropdown-menu, html[data-skin] .bootstrap-datetimepicker-widget.dropdown-menu {
  color: var(--rbu-text); background: var(--rbu-surface); border: 1px solid var(--rbu-border); border-radius: var(--rbu-radius);
}
html[data-skin] .datepicker table tr td.day:hover, html[data-skin] .datepicker table tr td span:hover,
html[data-skin] .bootstrap-datetimepicker-widget td.day:hover, html[data-skin] .bootstrap-datetimepicker-widget td span:hover { background: var(--rbu-primary-soft); }
html[data-skin] .datepicker table tr td.active, html[data-skin] .datepicker table tr td.active:hover,
html[data-skin] .datepicker table tr td span.active, html[data-skin] .bootstrap-datetimepicker-widget td.active,
html[data-skin] .bootstrap-datetimepicker-widget td span.active { color: var(--rbu-on-btn) !important; background: var(--rbu-btn-bg) !important; text-shadow: none; }
html[data-skin] .datepicker table thead th, html[data-skin] .bootstrap-datetimepicker-widget table thead th { color: var(--rbu-text); background: transparent !important; border: 0 !important; }
html[data-skin] .datepicker table tr td.old, html[data-skin] .datepicker table tr td.new { color: var(--rbu-muted); }
html[data-skin] .ui-widget-content { color: var(--rbu-text); background: var(--rbu-surface); border-color: var(--rbu-border); }
html[data-skin] .ui-widget-header { color: var(--rbu-text); background: var(--rbu-surface-2); border-color: var(--rbu-border); }

/* alertify, SweetAlert, page loading overlay */
html[data-skin] .alertify .ajs-dialog { color: var(--rbu-text); background: var(--rbu-surface); border-radius: var(--rbu-radius-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
html[data-skin] .alertify .ajs-header { color: var(--rbu-text); background: var(--rbu-surface); border-color: var(--rbu-border); font-family: var(--rbu-head-font); }
html[data-skin] .alertify .ajs-body, html[data-skin] .alertify .ajs-body .ajs-content { color: var(--rbu-text); }
html[data-skin] .alertify .ajs-footer { background: var(--rbu-surface-2); border-color: var(--rbu-border); border-radius: 0 0 var(--rbu-radius-lg) var(--rbu-radius-lg); }
html[data-skin] .alertify .ajs-footer .ajs-buttons .ajs-button { min-width: 80px; font-weight: 600; color: var(--rbu-text); background: var(--rbu-surface); border: 1px solid var(--rbu-border); border-radius: var(--rbu-pill); }
html[data-skin] .alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok { color: var(--rbu-on-btn); background: var(--rbu-btn-bg); border-color: var(--rbu-btn-bg); }
html[data-skin] .sweet-alert { color: var(--rbu-text); background-color: var(--rbu-surface); border-radius: var(--rbu-radius-lg); }
html[data-skin] .sweet-alert h2, html[data-skin] .sweet-alert p { color: var(--rbu-text); }
html[data-skin] #overlay_Common { background-color: rgba(8, 10, 24, .5); }
html[data-skin] #overlay_Common .Spinner { border-color: rgba(255, 255, 255, .25); border-top-color: var(--rbu-accent); }

/* ---------- 13. Public and login pages (no side panel) --------------------- */
:where(html[data-skin]) #page-wrapper.m-0 { padding-top: 10px; }
:where(html[data-skin]) .header-text { margin: 18px 0 6px; font-family: Georgia, "Times New Roman", serif !important; letter-spacing: .04em; color: var(--rbu-primary); }
:where(html[data-skin]) .header-text img { border-radius: 50%; box-shadow: 0 0 0 3px var(--rbu-surface), 0 0 0 5px color-mix(in srgb, var(--rbu-accent) 70%, transparent); }
:where(html[data-skin]) .dashboard-header {
  margin: 14px 0; padding: 24px 20px; color: var(--rbu-text); background: var(--rbu-surface);
  border: 1px solid var(--rbu-border) !important; border-radius: var(--rbu-radius-lg); box-shadow: var(--rbu-shadow);
}
:where(html[data-skin]) .loginColumns { max-width: 920px; margin: 0 auto; padding: 16px 8px; }
:where(html[data-skin]) .loginColumns .ibox-content { position: relative; overflow: hidden; padding: 26px; box-shadow: 0 18px 44px rgba(0, 0, 0, .12); }
:where(html[data-skin]) .loginColumns .ibox-content::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--rbu-grad); }
:where(html[data-skin]) .loginColumns p { color: var(--rbu-muted); }

/* ---------- Landing page and login pages ------------------------------------
   Markup: Views/Home/Index.cshtml, Views/Home/*LoginUI.cshtml,
   Views/Shared/_AuthHero.cshtml and _EduArt.cshtml (the artwork). */
.rbu-home-hero, .rbu-auth-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--rbu-accent) 34%, transparent), transparent 42%),
    linear-gradient(140deg, var(--rbu-deep), color-mix(in srgb, var(--rbu-deep) 45%, var(--rbu-primary)));
}
html[data-bs-theme="dark"] :is(.rbu-home-hero, .rbu-auth-hero) {
  background:
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--rbu-accent) 22%, transparent), transparent 42%),
    linear-gradient(140deg, color-mix(in srgb, var(--rbu-deep) 70%, #000), color-mix(in srgb, var(--rbu-deep) 80%, var(--rbu-surface)));
}
.rbu-art { display: block; width: 100%; height: auto; }
.rbu-art-accent { fill: var(--rbu-accent); }
.rbu-art-line { fill: none; stroke: var(--rbu-accent); stroke-width: 3; stroke-linecap: round; }
.rbu-auth-brand { display: flex; align-items: center; gap: 12px; color: #fff !important; text-decoration: none; }
.rbu-auth-brand img { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 5px color-mix(in srgb, var(--rbu-accent) 70%, transparent); }
/* the emblem is a transparent PNG; give it a white disc so it reads on the dark hero and side panel */
.rbu-auth-brand img, html[data-skin] #side-menu > .nav-header .rbu-brand img { padding: 2px; background: #fff; object-fit: contain; }
.rbu-auth-brand span { display: flex; flex-direction: column; line-height: 1.25; }
.rbu-auth-brand b { font-family: Georgia, "Times New Roman", serif; font-size: 16px; letter-spacing: .06em; }
.rbu-auth-brand small { font-size: 12px; color: rgba(255, 255, 255, .75); }

/* login pages: artwork panel on the left, form on the right */
.rbu-auth {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); max-width: 1060px; min-height: 580px; margin: 34px auto 26px; overflow: hidden;
  color: var(--rbu-text); background: var(--rbu-surface); border: 1px solid var(--rbu-border); border-radius: 26px; box-shadow: 0 26px 64px rgba(0, 0, 0, .14);
}
.rbu-auth-hero { display: flex; flex-direction: column; padding: 36px 36px 22px; }
.rbu-auth-hero h1 { margin: 30px 0 0; font-family: var(--rbu-head-font); font-size: 27px; font-weight: 700; line-height: 1.25; color: #fff; }
.rbu-auth-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.rbu-auth-points li { padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; }
.rbu-auth-points .fa { margin-right: 4px; color: var(--rbu-accent); }
.rbu-auth-hero .rbu-art { max-width: 430px; margin: auto auto 0; padding-top: 18px; }
.rbu-auth-main { display: flex; flex-direction: column; justify-content: center; padding: 40px 46px; }
.rbu-auth-lead h2 { margin: 0 0 8px; font-size: 27px; font-weight: 700; color: var(--rbu-text); }
.rbu-auth-lead h2::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 10px; background: var(--rbu-grad); border-radius: 4px; }
.rbu-auth-lead p { margin: 0 0 6px; font-size: 14px !important; line-height: 1.55; color: var(--rbu-muted); }
.rbu-auth-lead br { display: none; }
.rbu-auth-lead label {
  display: inline-flex; margin: 8px 0 0; padding: 7px 12px; font-size: 13px; font-weight: 600;
  color: var(--rbu-text); background: var(--rbu-primary-soft); border-radius: 999px;
}
.rbu-auth-form { margin-top: 14px; }
.rbu-auth-form form { margin-top: 0; }
html[data-skin] .rbu-auth-form .form-group { margin-bottom: 14px; }
html[data-skin] .rbu-auth-form .form-control { height: 48px !important; padding: 0 16px !important; font-size: 14.5px !important; border-radius: 13px !important; }
html[data-skin] .rbu-auth-form form > .btn { height: 48px; margin-bottom: 12px; font-size: 15px; font-weight: 600; border-radius: 13px !important; }
/* "Create New account" / "Register Now": a link inside a button in the views */
html[data-skin] .rbu-auth-form form > button.btn:has(> a) { padding: 0; background: transparent !important; border: 1.5px solid var(--rbu-primary) !important; box-shadow: none; }
html[data-skin] .rbu-auth-form form > button.btn:has(> a) > a {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0;
  font-size: 15px; font-weight: 600; color: var(--rbu-primary) !important; text-decoration: none; background: transparent; border: 0;
}
html[data-skin] .rbu-auth-form form > button.btn:has(> a):hover { background: var(--rbu-primary-soft) !important; }
html[data-skin] .rbu-auth-form form > a.btn-white { display: flex; align-items: center; justify-content: center; margin: 4px 0 0; background: transparent; border-color: var(--rbu-border); }
html[data-skin] .rbu-auth-form form > a.btn-white::before { content: "\f060"; margin-right: 8px; font: normal 12px FontAwesome; }
.rbu-auth-form .lgn-msg { font-size: 14px; }
.rbu-auth-form form br { display: none; }
.rbu-auth-form form > a:not(.btn) { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.rbu-auth-contact { display: inline-flex; align-items: center; gap: 8px; align-self: center; margin-top: 22px; font-size: 13.5px; font-weight: 600; color: var(--rbu-muted) !important; }
.rbu-auth-contact:hover { color: var(--rbu-primary) !important; }

/* Login extras: scrolling notice, help-line list, notice links, active-post list */
.au-auth-notice { margin: -10px 0 18px; padding: 8px 12px; font-size: 13px; font-weight: 600; background: var(--rbu-primary-soft); border-radius: 12px; }
.au-auth-notice a { color: var(--rbu-danger) !important; }
.au-auth-help { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.5; color: var(--rbu-muted); }
.au-auth-help li { display: flex; gap: 8px; padding: 3px 0; }
.au-auth-help .fa { flex: 0 0 16px; margin-top: 3px; text-align: center; color: var(--rbu-primary); }
.au-auth-help b { color: var(--rbu-text); }
.au-auth-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
html[data-skin] .au-auth-links .blink, html[data-skin] .au-auth-links button.blink {
  display: inline-flex; align-items: center; padding: 6px 12px; font-family: inherit; font-size: 13px !important; font-weight: 700;
  color: var(--rbu-danger) !important; background: transparent; border: 1.5px solid var(--rbu-danger); border-radius: 999px; text-decoration: none;
}
.au-auth-posts { margin-top: 12px; }
.au-auth-posts h4 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--rbu-text); }
.au-auth-posts .table { margin: 0; }
.au-auth-posts tbody { display: block; max-height: 220px; overflow-y: auto; }
.au-auth-posts td { font-size: 13px; }
.au-auth-posts td h4 { display: inline; font-size: 13px; font-weight: 600; }

/* landing page */
.rbu-home { max-width: 1180px; margin: 0 auto; padding: 26px 16px 30px; }
.rbu-home-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 28px; padding: 44px 48px 92px; border-radius: 30px; box-shadow: 0 26px 64px rgba(0, 0, 0, .16); }
.rbu-home-hero h1 { margin: 30px 0 12px; font-family: var(--rbu-head-font); font-size: 44px; font-weight: 700; line-height: 1.1; color: #fff; }
.rbu-home-hero p { max-width: 520px; margin: 0; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .84); }
.rbu-home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.rbu-hero-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px; font-size: 14.5px; font-weight: 600;
  color: #fff !important; text-decoration: none; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .34); border-radius: 999px; transition: background .15s ease, transform .15s ease;
}
.rbu-hero-btn:hover { background: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.rbu-hero-btn-solid { color: var(--rbu-deep) !important; background: #fff; border-color: #fff; }
.rbu-hero-btn-solid:hover { background: rgba(255, 255, 255, .9); }
.rbu-home-hero .rbu-art { max-width: 470px; margin-left: auto; }
.rbu-home-title { position: relative; z-index: 1; margin: -64px 0 14px 48px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .86); }
.rbu-login-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 0 24px; }
.rbu-login-card {
  display: flex; flex-direction: column; padding: 22px; color: var(--rbu-text) !important; text-decoration: none;
  background: var(--rbu-surface); border: 1px solid var(--rbu-border); border-radius: 22px; box-shadow: 0 14px 34px rgba(0, 0, 0, .10);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rbu-login-card:hover { transform: translateY(-5px); border-color: var(--rbu-k); box-shadow: 0 22px 46px rgba(0, 0, 0, .16); }
.rbu-login-card > .fa {
  display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; font-size: 24px;
  color: var(--rbu-k); background: color-mix(in srgb, var(--rbu-k) 16%, transparent); border-radius: 16px;
}
.rbu-login-card h3 { margin: 16px 0 6px; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--rbu-text); }
.rbu-login-card p { flex: 1; margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--rbu-muted); }
.rbu-login-go { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--rbu-primary); }
.rbu-login-go .fa { font-size: 12px; transition: transform .18s ease; }
.rbu-login-card:hover .rbu-login-go .fa { transform: translateX(4px); }
.rbu-home-note {
  display: flex; align-items: center; gap: 14px; margin: 22px 24px 0; padding: 16px 20px; font-size: 14px; font-weight: 500; line-height: 1.5;
  color: var(--rbu-text) !important; text-decoration: none; background: var(--rbu-surface); border: 1px solid var(--rbu-border); border-left: 4px solid var(--rbu-accent); border-radius: 16px;
}
.rbu-home-note span { flex: 1; }
.rbu-home-note .fa { font-size: 20px; color: var(--rbu-primary); }
.rbu-home-note .fa-external-link { font-size: 14px; color: var(--rbu-muted); }
.rbu-home-note:hover { border-color: var(--rbu-primary); border-left-color: var(--rbu-accent); }

/* Landing: six login cards (3 per row) and the notice list under them */
.rbu-login-grid.au-login-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.au-home-notices {
  margin: 22px 24px 0; padding: 18px 22px; background: var(--rbu-surface); border: 1px solid var(--rbu-border);
  border-left: 4px solid var(--rbu-accent); border-radius: 16px;
}
.au-home-notices h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--rbu-text); }
.au-home-notices h3 .fa { margin-right: 6px; color: var(--rbu-primary); }
.au-home-notices ul { margin: 0; padding: 0; list-style: none; }
.au-home-notices ul:empty { display: none; }
.au-home-notices li { padding: 4px 0; }
/* the notice script writes inline underline/large text: keep it in the theme */
html[data-skin] .au-home-notices li a, html[data-skin] .au-home-notices li a.fa {
  font-family: inherit !important; font-size: 14px !important; font-weight: 600 !important; text-decoration: none !important; color: var(--rbu-primary) !important;
}
.au-home-notices li a:hover { text-decoration: underline !important; }
.Home_landingNotice li a.fa::before { margin-right: 4px; font-family: FontAwesome; }
.Home_landingNotice .mobile-nav-toggle { display: none; }
.au-home-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px !important; padding-top: 8px !important; border-top: 1px dashed var(--rbu-border); }
@media (max-width: 991.98px) { .rbu-login-grid.au-login-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .rbu-login-grid.au-login-grid-3 { grid-template-columns: 1fr; } .au-home-notices { margin: 18px 10px 0; } }

@media (max-width: 1280px) { .rbu-home { padding-top: 66px; } .rbu-auth { margin-top: 66px; } }
@media (max-width: 991.98px) {
  .rbu-login-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rbu-home-hero { grid-template-columns: 1fr; padding: 32px 28px 88px; }
  .rbu-home-hero .rbu-art { display: none; }
  .rbu-home-hero h1 { font-size: 34px; }
  .rbu-home-title { margin-left: 28px; }
}
@media (max-width: 767.98px) {
  .rbu-auth { grid-template-columns: minmax(0, 1fr); min-height: 0; margin: 66px 12px 20px; border-radius: 20px; }
  .rbu-auth-form .d-flex { flex-wrap: wrap; }
  .rbu-auth-hero { padding: 22px 22px 18px; }
  .rbu-auth-hero h1 { margin-top: 18px; font-size: 20px; }
  .rbu-auth-hero .rbu-art { display: none; }
  .rbu-auth-main { padding: 26px 22px; }
  .rbu-home { padding-left: 12px; padding-right: 12px; }
  .rbu-home-hero { border-radius: 22px; padding: 26px 20px 84px; }
  .rbu-home-hero h1 { font-size: 28px; }
  .rbu-home-title { margin-left: 20px; }
  .rbu-login-grid { grid-template-columns: 1fr; padding: 0 10px; }
  .rbu-home-note { margin: 18px 10px 0; }
}

/* ---------- 14. Colours that views set themselves follow the theme --------- */
/* Matching is case-insensitive ("i"): views write e.g. BACKGROUND:white.
   A text colour is recognised at the start of the style or after ";" / a space,
   so "background-color" is never mistaken for a text colour. */

/* Bootstrap status utilities and alerts */
:where(html[data-skin]) .text-success { color: var(--rbu-success-text) !important; }
:where(html[data-skin]) .text-info { color: var(--rbu-info-text) !important; }
:where(html[data-skin]) .text-warning { color: var(--rbu-warning-text) !important; }
:where(html[data-skin]) .text-danger { color: var(--rbu-danger-text) !important; }
:where(html[data-skin]) .bg-primary { color: var(--rbu-on-primary); background-color: var(--rbu-primary) !important; }
:where(html[data-skin]) .bg-success { color: #fff; background-color: var(--rbu-success) !important; }
:where(html[data-skin]) .bg-info { color: #fff; background-color: var(--rbu-info) !important; }
:where(html[data-skin]) .bg-warning { color: var(--rbu-on-warning); background-color: var(--rbu-warning) !important; }
:where(html[data-skin]) .bg-danger { color: #fff; background-color: var(--rbu-danger) !important; }
:where(html[data-skin]) .alert-success { --rbu-k: var(--rbu-success); } :where(html[data-skin]) .alert-info { --rbu-k: var(--rbu-info); }
:where(html[data-skin]) .alert-warning { --rbu-k: var(--rbu-warning); } :where(html[data-skin]) .alert-danger { --rbu-k: var(--rbu-danger); }
:where(html[data-skin]) :is(.alert-success, .alert-info, .alert-warning, .alert-danger) {
  color: var(--rbu-text); background-color: color-mix(in srgb, var(--rbu-k) 12%, var(--rbu-surface)); border-color: color-mix(in srgb, var(--rbu-k) 35%, transparent);
}

/* buttons coloured inline (e.g. style="background-color:cornflowerblue"): theme colour,
   with red / orange / green kept as the theme's danger / warning / success */
/* :not(:where()) keeps this rule less specific than the red / amber / green rules below */
html[data-skin] .btn[style*="background" i]:not(:where([style*="transparent" i], [style*="none" i])) {
  color: var(--rbu-on-btn) !important; background-color: var(--rbu-btn-bg) !important; background-image: none !important; border-color: var(--rbu-btn-bg) !important;
}
html[data-skin] .btn[style*="background" i]:is([style*="red" i], [style*="crimson" i], [style*="firebrick" i], [style*="maroon" i], [style*="tomato" i],
  [style*="#d9534f" i], [style*="#dc3545" i], [style*="#ed5565" i], [style*="#b22222" i], [style*="#c9302c" i], [style*="#e74c3c" i], [style*="#f44336" i]) {
  color: #fff !important; background-color: var(--rbu-danger) !important; border-color: var(--rbu-danger) !important;
}
html[data-skin] .btn[style*="background" i]:is([style*="orange" i], [style*="yellow" i], [style*="gold" i],
  [style*="#f0ad4e" i], [style*="#f8ac59" i], [style*="#ffc107" i], [style*="#ff9800" i], [style*="#f39c12" i]) {
  color: var(--rbu-on-warning) !important; background-color: var(--rbu-warning) !important; border-color: var(--rbu-warning) !important;
}
html[data-skin] .btn[style*="background" i]:is([style*="green" i], [style*="#5cb85c" i], [style*="#1ab394" i], [style*="#28a745" i],
  [style*="#198754" i], [style*="#4caf50" i], [style*="#27ae60" i]) {
  color: #fff !important; background-color: var(--rbu-success) !important; border-color: var(--rbu-success) !important;
}

/* table headers, panel / modal headers and ibox titles coloured inline */
/* they get a deep theme shade with white text, keeping the solid look the view intended */
html[data-skin] :is(th, thead td, thead tr, .panel-heading)[style*="background" i]:not([style*="transparent" i]) {
  color: #fff !important; background: var(--rbu-deep) !important;
}
html[data-skin] .modal-header[style*="background" i] { color: var(--rbu-mh-color) !important; background: var(--rbu-mh-bg) !important; }
html[data-skin] .ibox-title[style*="background" i] { color: var(--rbu-text) !important; background: var(--rbu-surface) !important; }

/* boxes coloured inline (other than buttons and table / panel headers, handled above):
   Inspinia teal-green / cyan header strips -> deep theme colour with white text,
   light-blue strips -> a light tint of the theme, muted rose boxes -> the second surface */
html[data-skin] :is(div, h1, h2, h3, h4, h5, tfoot)[style*="background" i]:not(.btn):is([style*="#1ab394" i], [style*="#10b9bf" i], [style*="#18a689" i], [style*="#1d84c6" i], [style*="#28c3bc" i], [style*="#6e9dbf" i], [style*="#4578a0" i]) {
  background-color: var(--rbu-deep) !important; border-color: var(--rbu-deep) !important; color: #fff !important;
}
html[data-skin] div[style*="background" i]:not(.btn):is([style*="#bce8f1" i], [style*="#e1eaf3" i]) {
  background-color: color-mix(in srgb, var(--rbu-primary) 14%, var(--rbu-surface)) !important; color: var(--rbu-text) !important;
}
html[data-skin] :is(div[style*="background" i]:is([style*="#c1aea7" i], [style*="#cad1d5" i]), tr[style*="background" i]:is([style*="#b4bfca" i], [style*="#c0c6ca" i])) {
  background-color: var(--rbu-surface-2) !important; color: var(--rbu-text);
}
/* text coloured inline: blue -> theme primary, red -> danger, green -> success, brown / orange / purple -> accent */
html[data-skin] :is([style^="color" i], [style*=";color" i], [style*=" color" i]):not([style*="background" i]):is([style*="blue" i], [style*="#337ab7" i], [style*="#0000ff" i], [style*="navy" i],
  [style*="#111180" i], [style*="#12258a" i], [style*="#3b4c8e" i], [style*="#0d0d6f" i], [style*="#04c" i], [style*="#626296" i], [style*="#1b1b9c" i], [style*="#177492" i]) { color: var(--rbu-primary) !important; }
html[data-skin] :is([style^="color" i], [style*=";color" i], [style*=" color" i]):not([style*="background" i]):is([style*="red" i], [style*="crimson" i], [style*="firebrick" i], [style*="#ff0000" i], [style*="#f00;" i],
  [style*="#fd0101" i], [style*="#ef4c4c" i], [style*="#ff3346" i]) { color: var(--rbu-danger-text) !important; }
html[data-skin] :is([style^="color" i], [style*=";color" i], [style*=" color" i]):not([style*="background" i]):is([style*="green" i], [style*="#008000" i], [style*="#468261" i]) { color: var(--rbu-success-text) !important; }
html[data-skin] :is([style^="color" i], [style*=";color" i], [style*=" color" i]):not([style*="background" i]):is([style*="brown" i], [style*="maroon" i], [style*="orange" i], [style*="purple" i],
  [style*="chocolate" i], [style*="#9e8422" i], [style*="#e8c101" i], [style*="#fba722" i], [style*="#757756" i]) { color: var(--rbu-accent-text) !important; }

/* dark mode: black text and white boxes set inline */
html[data-bs-theme="dark"] :is([style*="color: black" i], [style*="color:black" i], [style*="color: #000" i], [style*="color:#000" i]) { color: var(--rbu-text) !important; }
html[data-bs-theme="dark"] :is([style*="background-color: white" i], [style*="background-color:white" i], [style*="background: white" i],
  [style*="background:white" i], [style*="background-color: #fff" i], [style*="background-color:#fff" i], [style*="background: #fff" i],
  [style*="background:#fff" i]) { background-color: var(--rbu-surface) !important; }

/* per view (class-based colours found in the page-by-page check) */
html[data-skin] .profile-content .name { color: var(--rbu-primary) !important; }
/* RefundApplication/Index: its own grey "tableGrid" (light grey text on grey) */
html[data-skin] .tableGrid_header { color: var(--rbu-th-color) !important; background: var(--rbu-th-bg) !important; border-color: var(--rbu-border) !important; font-weight: 700; }
html[data-skin] .tableGrid_row > .tableGrid_small > .tableGrid_cell { color: var(--rbu-text) !important; border-color: var(--rbu-border) !important; }
html[data-skin] .tableGrid_row:nth-child(2n+3) { background: var(--rbu-surface-2) !important; }
/* headings that carry the icon class themselves (<h5 class="fa fa-user">Profile Detail</h5>)
   would set their words in the icon font, which falls back to a serif; only the icon keeps it */
html[data-skin] #page-wrapper :is(h1, h2, h3, h4, h5, h6).fa { font-family: var(--rbu-head-font); font-weight: 600; }
html[data-skin] #page-wrapper :is(h1, h2, h3, h4, h5, h6).fa::before { font-family: FontAwesome; font-weight: normal; }
/* charts never wider than their box (phone width) */
html[data-skin] #page-wrapper canvas { max-width: 100%; }
/* some dashboards give panels a fixed height (set by script) to match the panel
   beside them; once panels stack on a phone that only cuts their content off */
@media (max-width: 767.98px) {
  html[data-skin] #page-wrapper :is(.ibox-content, .panel-body, .ibox)[style*="height" i] { height: auto !important; }
}
/* error page (Shared/Error): long messages such as file paths wrap inside the box */
.middle-box .error-desc { overflow-wrap: anywhere; }
/* ---------- 15. Print: plain light page, no shell -------------------------- */
@media print {
  html[data-skin] body { color: #000 !important; background: #fff !important; }
  html[data-skin] nav.navbar-static-side, html[data-skin] .rbu-topbar, html[data-skin] #page-wrapper > .footer,
  .rbu-theme-pick, .rbu-fly, .rbu-side-backdrop { display: none !important; }
  html[data-skin] body.canvas-menu nav.navbar-static-side ~ #page-wrapper { margin: 0 !important; }
  html[data-skin] .ibox-content, html[data-skin] .panel { box-shadow: none !important; }
}
@media (prefers-reduced-motion: reduce) { html[data-skin] * { transition: none !important; } }
