/* Shared NRS design layer; each portal retains its own identical copy.
   Load after main.css and before portal-specific nrs-custom.css. */
:root {
  --nrs-primary: #963031;
  --nrs-primary-rgb: 150, 48, 49;
  --accent-color: var(--nrs-primary);
  --bs-primary: var(--nrs-primary);
  --bs-primary-rgb: var(--nrs-primary-rgb);
  --input-focus-ring: rgba(150, 48, 49, 0.25);
  --nrs-primary-hover: #802829;
  --nrs-primary-light: rgba(150, 48, 49, 0.08);
  --nrs-primary-border: rgba(150, 48, 49, 0.2);
  --nrs-primary-text: var(--nrs-primary);   /* the red as text; lighter in dark mode */
  --nrs-dark: #1e293b;
  --nrs-slate: #64748b;
  --nrs-light: #f8fafc;
  --nrs-border: #e2e8f0;
  --nrs-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --nrs-shadow-md: 0 8px 24px rgba(150, 48, 49, 0.06);
  --nrs-shadow-lg: 0 16px 36px rgba(150, 48, 49, 0.12);
}

/* ==========================================================================
   The danger red
   ==========================================================================
   There were two danger palettes in these portals, and the visible one was
   not the one anybody would think to change.

   Bootstrap's (--bs-danger) was stock #dc3545 and had never been touched.
   main.css carries its own (--danger-color) and redefines .text-danger,
   .bg-danger, .border-danger, .btn-danger, .btn-outline-danger,
   .alert-danger and the badge variants on top of Bootstrap's — 204 rules
   read it, and being the later stylesheet it is the one that painted.

   Both now descend from --nrs-danger, declared here and nowhere else.
   Change it in this block and every danger surface follows; the palettes
   cannot drift apart because neither owns a literal any more.

   The red is the same in both themes, by decision. Only the backdrops, red
   text and the emphasis tone vary — a tint that reads on white is a glare
   on a dark card, and vice versa. Derived values are Bootstrap's own
   recipes applied to the base (shade = mix toward black, tint = toward
   white), noted per line; recompute from those if the base moves.

   Note for whoever changes this next: --nrs-primary is #963031 and
   --nrs-danger is #963131. One digit apart, indistinguishable on screen,
   deliberately separate tokens. Destructive actions and brand chrome are
   the same colour here — that is the intent, not an oversight, so do not
   "fix" one to match the other without asking.
   -------------------------------------------------------------------------- */
:root,
[data-bs-theme="light"] {
  --nrs-danger: #963131;
  --nrs-danger-rgb: 150, 49, 49;
  --nrs-danger-soft: #ead6d6;          /* tint 80% */
  --nrs-danger-border: #d5adad;        /* tint 60% */
  --nrs-danger-emphasis: #3c1414;      /* shade 60% */
  --nrs-danger-hover-rgb: 120, 39, 39; /* shade 20% */
  --nrs-danger-focus-rgb: 166, 80, 80; /* tint 15% */
  --nrs-danger-text: var(--nrs-danger);

  /* main.css's palette — the one that paints most of the surface. */
  --danger-color: var(--nrs-danger);
  --danger-color-light: var(--nrs-danger-soft);

  /* Bootstrap's — reached by .text-bg-danger, .link-danger, .table-danger,
     .list-group-item-danger, the focus rings and the invalid-field styling,
     none of which main.css redefines. */
  --bs-danger: var(--nrs-danger);
  --bs-danger-rgb: var(--nrs-danger-rgb);
  --bs-danger-text-emphasis: var(--nrs-danger-emphasis);
  --bs-danger-bg-subtle: var(--nrs-danger-soft);
  --bs-danger-border-subtle: var(--nrs-danger-border);
  --bs-form-invalid-color: var(--nrs-danger);
  --bs-form-invalid-border-color: var(--nrs-danger);
}

/* theme.js stamps both attributes; main.css keys on data-theme and Bootstrap
   on data-bs-theme, so both are listed to override either. Every token is
   restated rather than inherited, so this does not depend on nrs-custom.css
   happening to load after main.css. */
[data-theme="dark"],
[data-bs-theme="dark"] {
  --input-focus-ring: rgba(var(--nrs-primary-rgb), 0.35);
  --nrs-danger-soft: rgba(150, 49, 49, 0.16);
  --nrs-danger-border: #5a1d1d;        /* shade 40% */
  --nrs-danger-emphasis: #c08383;      /* tint 40% */
  /* Red as text on a dark surface (user ruling 19-10-2026): 7:1 on the header, 5.8:1 on a
     card, where the brand red reads 2.4:1. Fills, borders of solid controls and table
     headers keep the brand red. */
  --nrs-primary-text: #ea8687;
  --nrs-danger-text: #ea8687;

  --danger-color: var(--nrs-danger);
  --danger-color-light: var(--nrs-danger-soft);

  --bs-danger: var(--nrs-danger);
  --bs-danger-rgb: var(--nrs-danger-rgb);
  --bs-danger-text-emphasis: var(--nrs-danger-emphasis);
  --bs-danger-bg-subtle: #1e0a0a;      /* shade 80% */
  --bs-danger-border-subtle: var(--nrs-danger-border);
  --bs-form-invalid-color: var(--nrs-danger-text);
  --bs-form-invalid-border-color: var(--nrs-danger);
}

/* main.css restates .btn-danger and .btn-outline-danger against
   --danger-color, so their fills already follow. It leaves the focus ring
   alone, and Bootstrap's is a literal tint of the old red. */
.btn-danger {
  --bs-btn-focus-shadow-rgb: var(--nrs-danger-focus-rgb);
}

.btn-outline-danger {
  --bs-btn-focus-shadow-rgb: var(--nrs-danger-rgb);
}

/* Disabled, Bootstrap paints the outline in its stock red; on a dark surface it takes the text tone. */
[data-theme="dark"] .btn-outline-danger,
[data-bs-theme="dark"] .btn-outline-danger {
  --bs-btn-disabled-color: var(--nrs-danger-text);
  --bs-btn-disabled-border-color: var(--nrs-danger-text);
}

.link-danger:focus,
.link-danger:hover {
  color: RGBA(var(--nrs-danger-hover-rgb), var(--bs-link-opacity, 1)) !important;
  -webkit-text-decoration-color: RGBA(var(--nrs-danger-hover-rgb), var(--bs-link-underline-opacity, 1)) !important;
  text-decoration-color: RGBA(var(--nrs-danger-hover-rgb), var(--bs-link-underline-opacity, 1)) !important;
}

/* Bootstrap builds the table variant off the subtle background, mixing black
   in at 5 / 7.5 / 10 / 20% for striped, hover, active and border. Like
   Bootstrap's own, this stays light in both themes.

   Nothing renders it today: main.css forces
   `.table > :not(caption) > * > * { background-color: transparent }`, which
   neutralises every contextual row class, and no portal uses .table-danger.
   Kept so the value is the brand red on the day either of those changes,
   rather than a stale #f8d7da nobody thought to look at. */
.table-danger {
  --bs-table-bg: #ead6d6;
  --bs-table-striped-bg: #decbcb;
  --bs-table-hover-bg: #d8c6c6;
  --bs-table-active-bg: #d3c1c1;
  --bs-table-border-color: #bbabab;
}

/* The exclamation mark Bootstrap draws inside an invalid field is an inline
   SVG with the red written into the encoded markup, so there is no variable
   to point at — the file has to be restated whole to change one stroke. It
   needs saying only once, the red being the same in both themes. Selectors
   are copied verbatim from Bootstrap so the specificity matches and source
   order decides. */
.form-control.is-invalid,
.was-validated .form-control:invalid {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23963131'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23963131' stroke='none'/%3e%3c/svg%3e");
}

.form-select.is-invalid:not([multiple]):not([size]),
.form-select.is-invalid:not([multiple])[size="1"],
.was-validated .form-select:invalid:not([multiple]):not([size]),
.was-validated .form-select:invalid:not([multiple])[size="1"] {
  --bs-form-select-bg-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23963131'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23963131' stroke='none'/%3e%3c/svg%3e");
}

body.nrs-theme {
  background-color: #eaecec;
  background-image: url('../img/white-bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  color: var(--nrs-dark);
}

.noscript-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b1223;
  color: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  font-family: var(--default-font);
}

.noscript-overlay h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.noscript-overlay p {
  margin: 0.75rem auto;
  max-width: 44rem;
  line-height: 1.75;
  color: #d7e0ff;
}

.noscript-overlay a {
  color: #fff;
  text-decoration: underline;
}

.noscript-overlay .badge {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   2. HEADER & BRANDING COMPONENT OVERRIDES
   -------------------------------------------------------------------------- */
.nrs-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nrs-border);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
}

.nrs-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-logo-primary {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.header-logo-secondary {
  height: 44px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .header-logo-secondary {
    height: 40px;
  }
}

.logo-divider {
  width: 1px;
  height: 28px;
  background-color: rgba(203, 213, 225, 0.8);
  margin: 0 4px;
}

.nrs-brand-subtitle {
  color: var(--nrs-primary-text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nrs-brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--nrs-dark);
  letter-spacing: -0.02em;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nrs-primary), #b91c1c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(150, 48, 49, 0.25);
}

/* --------------------------------------------------------------------------
   3. HERO & SEARCH INPUT SYSTEM
   -------------------------------------------------------------------------- */
.nrs-hero {
  padding: 1.25rem 1.5rem 0.25rem 1.5rem;
  text-align: center;
  position: relative;
}

.nrs-hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.nrs-hero-title span {
  color: var(--nrs-primary-text);
}

.nrs-hero-desc {
  font-size: 1.05rem;
  color: var(--nrs-slate);
  max-width: 580px;
  margin: 0 auto 1.25rem auto;
}

.nrs-search-box {
  max-width: 640px;
  margin: 0 auto 1.25rem auto;
  position: relative;
}

.nrs-search-input {
  width: 100%;
  height: 50px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  border-radius: 25px;
  border: 2px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--nrs-shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nrs-search-input::placeholder {
  text-align: center;
  color: #94a3b8;
}

.nrs-search-input:focus {
  outline: none;
  border-color: var(--nrs-primary);
  box-shadow: 0 0 0 4px rgba(150, 48, 49, 0.12), var(--nrs-shadow-md);
  background: #ffffff;
}

/* --------------------------------------------------------------------------
   4. WORKSPACE MODULE CARDS GRID SYSTEM
   -------------------------------------------------------------------------- */
.workspace-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto 4rem auto;
  contain: layout style;
}

.module-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  width: 100%;
  max-width: 300px;
  min-height: 175px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  transform: translateZ(0);
}

.module-card:hover {
  transform: translateY(-6px);
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  color: inherit;
}

body.is-scrolling .module-card {
  pointer-events: none !important;
}

.module-card.card-assisted {
  background: rgba(255, 245, 245, 0.85);
  border-color: rgba(150, 48, 49, 0.3);
}

.module-card.card-assisted:hover {
  box-shadow: 0 20px 40px rgba(150, 48, 49, 0.15);
}

.module-card.disabled {
  opacity: 0.6;
  filter: grayscale(0.3);
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.module-card.disabled:hover {
  transform: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  border-color: #e2e8f0 !important;
}

.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.module-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.35rem;
  color: var(--nrs-primary-text);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* Multi-Color Card Icon Themes */
.module-icon-wrap.icon-emerald {
  background: #e6f4ea;
  color: #1e8e3e;
  border-color: #ceead6;
}

.module-icon-wrap.icon-blue {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: #d2e3fc;
}

.module-icon-wrap.icon-amber {
  background: #fef7e0;
  color: #b06000;
  border-color: #feefc3;
}

.module-icon-wrap.icon-crimson {
  background: #fce8e6;
  color: #d93025;
  border-color: #fad2cf;
}

.module-icon-wrap.icon-purple {
  background: #f3e8fd;
  color: #9334e6;
  border-color: #e9d2fd;
}

.module-icon-wrap.icon-teal {
  background: #e6f4f1;
  color: #00897b;
  border-color: #b2dfdb;
}

.module-icon-wrap.icon-rose {
  background: #fce4ec;
  color: #c2185b;
  border-color: #f8bbd0;
}

.module-icon-wrap.icon-indigo {
  background: #e8eaf6;
  color: #3f51b5;
  border-color: #c5cae9;
}

.module-icon-wrap.icon-orange {
  background: #ffe0b2;
  color: #e65100;
  border-color: #ffcc80;
}

.module-icon-wrap.icon-sapphire {
  background: #e1f5fe;
  color: #0288d1;
  border-color: #b3e5fc;
}

.module-icon-wrap.icon-violet {
  background: #ede7f6;
  color: #512da8;
  border-color: #d1c4e9;
}

.module-icon-wrap.icon-cyan {
  background: #e0f7fa;
  color: #0097a7;
  border-color: #b2ebf2;
}

.module-icon-wrap.icon-forest {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}

.module-icon-wrap.icon-cobalt {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #bbdefb;
}

.module-card:hover .module-icon-wrap.icon-emerald {
  background: #1e8e3e;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-blue {
  background: #1a73e8;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-amber {
  background: #b06000;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-crimson {
  background: #d93025;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-purple {
  background: #9334e6;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-teal {
  background: #00897b;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-rose {
  background: #c2185b;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-indigo {
  background: #3f51b5;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-orange {
  background: #e65100;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-sapphire {
  background: #0288d1;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-violet {
  background: #512da8;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-cyan {
  background: #0097a7;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-forest {
  background: #2e7d32;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap.icon-cobalt {
  background: #1565c0;
  color: #ffffff;
}

.module-card:hover .module-icon-wrap {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(150, 48, 49, 0.15);
}

.module-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.35rem;
  transition: all 0.3s ease;
}

.module-card:hover .module-arrow {
  color: var(--nrs-primary-text);
  transform: translateX(8px);
}

.module-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.module-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
  text-align: left;
  transition: color 0.2s ease;
}

.module-card:hover .module-title {
  color: var(--nrs-primary-text);
}

.module-desc {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 0;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   5. GLOBAL TEMPLATE DATATABLE DESIGN SYSTEM

   Column headers are a blush tab on a maroon rule. Only the header cells
   paint: thead and its rows stay transparent, or their square fill would
   show behind the rounded top corners. The corners are clipped rather than
   given a border-radius because these tables collapse their borders, and
   border-radius does not apply to the cells of a collapsed table. The
   bottom stays square so the 2px rule runs straight under the row, and the
   clip reaches past the inner and bottom edges so it cannot leave an
   anti-aliased seam there.
   -------------------------------------------------------------------------- */
.table thead,
.table thead tr,
.nrs-datatable thead,
.nrs-datatable thead tr {
  background: transparent !important;
}

.table thead th,
.nrs-datatable thead th {
  background-color: #EFDCDC !important;
  color: #5A1D1D !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #963031 !important;
}

.table thead > tr:first-child > th:first-child,
.nrs-datatable thead > tr:first-child > th:first-child {
  clip-path: inset(0 -2px -2px 0 round 8px 0 0 0);
}

.table thead > tr:first-child > th:last-child,
.nrs-datatable thead > tr:first-child > th:last-child {
  clip-path: inset(0 0 -2px -2px round 0 8px 0 0);
}

.table thead > tr:first-child > th:only-child,
.nrs-datatable thead > tr:first-child > th:only-child {
  clip-path: inset(0 0 -2px 0 round 8px 8px 0 0);
}

/* Global Datatable Page Size Selector Compact Standard */
#pageSizeSelect,
.page-size-select,
.datatable-page-size-select,
.nrs-page-size-select,
.nrs-datatable-select,
.table-page-size-select {
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
  padding-left: 0.6rem !important;
  padding-right: 1.75rem !important;
  font-size: 0.75rem !important;
}

/* --------------------------------------------------------------------------
   6. SHORTCUTS & NOTIFICATION DROPDOWN TILES
   -------------------------------------------------------------------------- */
.shortcut-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.7);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.shortcut-tile:hover {
  background: #ffffff;
  border-color: rgba(150, 48, 49, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(150, 48, 49, 0.08);
}

.shortcut-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 6px;
  transition: transform 0.25s ease;
}

.shortcut-tile:hover .shortcut-icon-box {
  transform: scale(1.1);
}

.shortcut-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--nrs-dark);
}

.notification-item {
  width: 100%;
  transition: background-color 0.2s ease;
  background: #ffffff;
  text-decoration: none;
}

.notification-item:hover {
  background-color: #f8fafc;
}

.notif-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
}

.notif-desc {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
  display: block;
  margin-top: 3px;
}

.notif-time {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   7. 404 ERROR PAGE & ANIMATIONS
   -------------------------------------------------------------------------- */
.text-gradient-crimson {
  background: linear-gradient(135deg, #9A3636 0%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-icon-box {
  width: 96px;
  height: 96px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.error-icon-box:hover {
  transform: scale(1.08) rotate(6deg);
}

.error-badge-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(154, 54, 54, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.25);
    opacity: 1;
  }
}

.nrs-footer {
  background-color: #ffffff;
  border-top-color: var(--nrs-border) !important;
  color: #64748b;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* --------------------------------------------------------------------------
   8. DARK MODE OVERRIDES ([data-theme="dark"])
   -------------------------------------------------------------------------- */
[data-theme="dark"] body.nrs-theme,
[data-bs-theme="dark"] body.nrs-theme {
  background-color: #0b1329 !important;
  background-image: url('../img/dark-bg.jpg') !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .bg-body,
[data-bs-theme="dark"] .bg-body,
[data-theme="dark"] .card,
[data-bs-theme="dark"] .card,
[data-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-header,
[data-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-white {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .bg-body-tertiary,
[data-bs-theme="dark"] .bg-body-tertiary,
[data-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .border,
[data-bs-theme="dark"] .border,
[data-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-bottom,
[data-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-top {
  border-color: #334155 !important;
}

[data-theme="dark"] .auth-card,
[data-bs-theme="dark"] .auth-card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .text-body,
[data-bs-theme="dark"] .text-body {
  color: #f8fafc !important;
}

[data-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-secondary {
  color: #94a3b8 !important;
}

[data-theme="dark"] .nrs-header,
[data-bs-theme="dark"] .nrs-header {
  background: rgba(15, 23, 42, 0.92) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .nrs-header .nrs-brand-title,
[data-bs-theme="dark"] .nrs-header .nrs-brand-title,
[data-theme="dark"] .nrs-header .text-dark,
[data-bs-theme="dark"] .nrs-header .text-dark,
[data-theme="dark"] .nrs-header #userMenu .text-dark,
[data-bs-theme="dark"] .nrs-header #userMenu .text-dark,
[data-theme="dark"] #userMenu .text-dark,
[data-bs-theme="dark"] #userMenu .text-dark,
[data-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-dark,
[data-theme="dark"] h1,
[data-bs-theme="dark"] h1,
[data-theme="dark"] h2,
[data-bs-theme="dark"] h2,
[data-theme="dark"] h3,
[data-bs-theme="dark"] h3,
[data-theme="dark"] h4,
[data-bs-theme="dark"] h4,
[data-theme="dark"] h5,
[data-bs-theme="dark"] h5,
[data-theme="dark"] h6,
[data-bs-theme="dark"] h6 {
  color: #ffffff !important;
}

[data-theme="dark"] .nrs-header .text-muted,
[data-bs-theme="dark"] .nrs-header .text-muted,
[data-theme="dark"] .nrs-header .extra-small.text-muted,
[data-bs-theme="dark"] .nrs-header .extra-small.text-muted,
[data-theme="dark"] #userMenu .text-muted,
[data-bs-theme="dark"] #userMenu .text-muted {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .nrs-header .btn-icon {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .nrs-header .btn-icon:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .nrs-header .dropdown-menu {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .nrs-header .dropdown-menu .dropdown-header {
  color: #94a3b8 !important;
}

[data-theme="dark"] .nrs-header .dropdown-menu .text-dark,
[data-theme="dark"] .nrs-header .dropdown-menu h6,
[data-theme="dark"] .nrs-header .dropdown-item {
  color: #f8fafc !important;
}

[data-theme="dark"] .nrs-header .dropdown-item:hover,
[data-theme="dark"] .nrs-header .dropdown-item:focus {
  background-color: #334155 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .nrs-header .dropdown-divider,
[data-theme="dark"] .nrs-header .border-bottom,
[data-theme="dark"] .nrs-header .border-top {
  border-color: #334155 !important;
}

[data-theme="dark"] .nrs-hero-title {
  color: #ffffff;
}

[data-theme="dark"] .nrs-hero-desc {
  color: #94a3b8;
}

[data-theme="dark"] .nrs-search-input {
  background: rgba(30, 41, 59, 0.95);
  border-color: #334155;
  color: #ffffff;
  border-radius: 25px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nrs-search-input::placeholder {
  color: #64748b;
}

[data-theme="dark"] .nrs-search-input:focus {
  background: #1e293b;
  border-color: var(--nrs-primary);
  border-radius: 25px !important;
  box-shadow: 0 0 0 6px rgba(150, 48, 49, 0.3), 0 16px 36px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .module-card {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .module-card:hover {
  background: #1e293b;
  border-color: rgba(150, 48, 49, 0.6);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .module-card.disabled {
  background: #0f172a !important;
  border-color: #334155 !important;
  opacity: 0.5;
}

[data-theme="dark"] .module-icon-wrap {
  background: rgba(150, 48, 49, 0.18);
  border-color: rgba(150, 48, 49, 0.3);
  color: #f87171;
}

[data-theme="dark"] .module-card:hover .module-icon-wrap {
  background: var(--nrs-primary);
  color: #ffffff;
  border-color: var(--nrs-primary);
}

[data-theme="dark"] .module-title {
  color: #f8fafc;
}

[data-theme="dark"] .module-desc {
  color: #94a3b8;
}

/* Dark Mode Icon Specific Overrides */
[data-theme="dark"] .module-icon-wrap.icon-emerald {
  background: rgba(30, 142, 62, 0.25);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-blue {
  background: rgba(26, 115, 232, 0.25);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-amber {
  background: rgba(176, 96, 0, 0.25);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-crimson {
  background: rgba(217, 48, 37, 0.25);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-purple {
  background: rgba(147, 52, 230, 0.25);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-teal {
  background: rgba(0, 137, 123, 0.25);
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-rose {
  background: rgba(194, 24, 91, 0.25);
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-indigo {
  background: rgba(63, 81, 181, 0.25);
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-orange {
  background: rgba(230, 81, 0, 0.25);
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-sapphire {
  background: rgba(2, 136, 209, 0.25);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-violet {
  background: rgba(81, 45, 168, 0.25);
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-cyan {
  background: rgba(0, 151, 167, 0.25);
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-forest {
  background: rgba(46, 125, 50, 0.25);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
}

[data-theme="dark"] .module-icon-wrap.icon-cobalt {
  background: rgba(21, 101, 192, 0.25);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

/* Dark Mode DataTables & Cards Overrides */
[data-theme="dark"] .table thead th,
[data-theme="dark"] .nrs-datatable thead th {
  background-color: #46262B !important;
  color: #F5E1E1 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #C08383 !important;
}

[data-theme="dark"] .table,
[data-theme="dark"] .nrs-datatable {
  color: #ffffff !important;
  background-color: #1e293b !important;
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td,
[data-theme="dark"] .table .text-dark,
[data-theme="dark"] .table .text-secondary,
[data-theme="dark"] .table strong,
[data-theme="dark"] .table span:not(.badge),
[data-theme="dark"] .table div,
[data-theme="dark"] .nrs-datatable th,
[data-theme="dark"] .nrs-datatable td {
  color: #ffffff !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .table tbody tr:hover td,
[data-theme="dark"] .nrs-datatable tbody tr:hover td {
  background-color: #334155 !important;
  color: #ffffff !important;
}

[data-theme="dark"] #searchResultsForm {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

[data-theme="dark"] #resultsTableCard,
[data-theme="dark"] #resultsTableContainer {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] #pageSizeSelect {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] #paginationRangeText,
[data-theme="dark"] #paginationSummaryText,
[data-theme="dark"] #resultsTableCard label,
[data-theme="dark"] #resultsTableCard span.extra-small,
[data-theme="dark"] #activeQueryLabel {
  color: #cbd5e1 !important;
}

[data-theme="dark"] #activeQueryLabel strong,
[data-theme="dark"] #activeQueryLabel .active-query-term,
[data-theme="dark"] #activeQueryLabel .text-dark {
  color: #ffffff !important;
}

[data-theme="dark"] #paginationButtons .page-link {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] #paginationButtons .page-item.active .page-link {
  background-color: var(--nrs-primary) !important;
  border-color: var(--nrs-primary) !important;
  color: #ffffff !important;
}

[data-theme="dark"] #paginationButtons .page-item.disabled .page-link {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #64748b !important;
}

[data-theme="dark"] .nrs-dropdown-shortcuts,
[data-theme="dark"] .nrs-dropdown-notifications {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .shortcut-tile {
  background: rgba(15, 23, 42, 0.6);
  border-color: #334155;
}

[data-theme="dark"] .shortcut-tile:hover {
  background: #334155;
  border-color: var(--nrs-primary);
}

[data-theme="dark"] .shortcut-label {
  color: #f8fafc;
}

[data-theme="dark"] .notification-item {
  background-color: #1e293b;
  border-color: #334155 !important;
}

[data-theme="dark"] .notification-item:hover {
  background-color: #334155;
}

[data-theme="dark"] .notif-title {
  color: #ffffff;
}

[data-theme="dark"] .notif-desc {
  color: #94a3b8;
}

[data-theme="dark"] .nrs-footer {
  background-color: rgba(15, 23, 42, 0.95);
  border-top-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8;
}

[data-theme="dark"] .nrs-footer p,
[data-theme="dark"] .nrs-footer span {
  color: #94a3b8;
}

[data-theme="dark"] .nrs-footer a {
  color: #cbd5e1;
}

[data-theme="dark"] .nrs-footer a:hover {
  color: #f87171;
}

[data-theme="dark"] .error-icon-box {
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .text-gradient-crimson {
  background: linear-gradient(135deg, #f87171 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   Simple DataTables Layout & Search Input Pull-Right Styling
   -------------------------------------------------------------------------- */
.datatable-top {
  padding: 0.75rem 0.5rem 1rem 0.5rem !important;
}

.datatable-top>div:first-child,
.datatable-dropdown {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: var(--nrs-text-secondary, #64748b) !important;
}

.datatable-top>div:last-child,
.datatable-search {
  float: none !important;
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
}

.datatable-input {
  border: 1px solid var(--nrs-border, #e2e8f0) !important;
  border-radius: 0.5rem !important;
  padding: 0.4rem 0.85rem !important;
  font-size: 0.8125rem !important;
  font-family: inherit !important;
  outline: none !important;
  min-width: 240px !important;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.datatable-input:focus {
  border-color: var(--nrs-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--nrs-primary-rgb), 0.15) !important;
}

/* On a phone the search takes the width left beside Export, so Export stays inside the card. */
@media (max-width: 575.98px) {
  .datatable-top>div:last-child {
    flex: 1 1 100%;
    min-width: 0;
    justify-content: flex-end;
  }

  .datatable-search {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0 !important;
  }

  .datatable-input {
    min-width: 0 !important;
    width: 100%;
  }
}

.datatable-selector {
  border: 1px solid var(--nrs-border, #cbd5e1) !important;
  border-radius: 0.375rem !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.75rem !important;
  background-color: #ffffff !important;
}

.datatable-bottom {
  gap: 0.75rem !important;
}

.datatable-bottom>div:first-child,
.datatable-info {
  float: none !important;
  font-size: 0.75rem !important;
  color: #64748b !important;
  font-family: var(--bs-font-monospace, monospace) !important;
}

.datatable-bottom>nav:last-child,
.datatable-pagination {
  float: none !important;
  margin-left: auto !important;
}

[data-theme="dark"] .datatable-input {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .datatable-selector {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .datatable-info {
  color: #94a3b8 !important;
}

/* ==========================================================================
   Per-Module Notification Components & Badges
   ========================================================================== */

.module-icon-wrap {
  position: relative;
}

.module-notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background-color: #d93025;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  font-family: 'JetBrains Mono', monospace;
  z-index: 2;
}

.module-notif-badge.badge-danger {
  background-color: #d93025;
}

.module-notif-badge.pulse-ring::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 999px;
  border: 2px solid currentColor;
  animation: moduleBadgePulse 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
  opacity: 0.75;
}

@keyframes moduleBadgePulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Modal & Modal Sub-Module Cards Theme Support */
.module-modal-card {
  transition: all 0.25s ease-in-out;
  background-color: #ffffff;
  border: 1px solid #e2e8f0 !important;
}

.module-modal-card .modal-card-title {
  color: #0f172a !important;
}

.module-modal-card .text-muted {
  color: #64748b !important;
}

.module-modal-card:hover {
  transform: translateY(-3px);
  border-color: #d93025 !important;
  box-shadow: 0 12px 24px -6px rgba(217, 48, 37, 0.15) !important;
}

/* Dark Mode Modal & Sub-Module Card Support */
[data-theme="dark"] .modal-content,
[data-bs-theme="dark"] .modal-content {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
}

[data-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer,
[data-bs-theme="dark"] .modal-footer {
  border-color: #334155 !important;
}

[data-theme="dark"] .modal-content .modal-title,
[data-bs-theme="dark"] .modal-content .modal-title,
[data-theme="dark"] .modal-content h1,
[data-bs-theme="dark"] .modal-content h1,
[data-theme="dark"] .modal-content h2,
[data-bs-theme="dark"] .modal-content h2,
[data-theme="dark"] .modal-content h3,
[data-bs-theme="dark"] .modal-content h3,
[data-theme="dark"] .modal-content h4,
[data-bs-theme="dark"] .modal-content h4,
[data-theme="dark"] .modal-content h5,
[data-bs-theme="dark"] .modal-content h5,
[data-theme="dark"] .modal-content h6,
[data-bs-theme="dark"] .modal-content h6,
[data-theme="dark"] .modal-content .fw-bold,
[data-bs-theme="dark"] .modal-content .fw-bold,
[data-theme="dark"] .modal-content .text-dark,
[data-bs-theme="dark"] .modal-content .text-dark {
  color: #f8fafc !important;
}

[data-theme="dark"] .modal-content .text-muted,
[data-bs-theme="dark"] .modal-content .text-muted,
[data-theme="dark"] .modal-content .text-secondary,
[data-bs-theme="dark"] .modal-content .text-secondary {
  color: #94a3b8 !important;
}

[data-theme="dark"] .modal-content .bg-body-tertiary,
[data-bs-theme="dark"] .modal-content .bg-body-tertiary,
[data-theme="dark"] .bg-body-tertiary,
[data-bs-theme="dark"] .bg-body-tertiary {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .modal-content .text-body,
[data-bs-theme="dark"] .modal-content .text-body {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .modal-content .border,
[data-bs-theme="dark"] .modal-content .border {
  border-color: #334155 !important;
}

[data-theme="dark"] .modal-content .btn-close,
[data-bs-theme="dark"] .modal-content .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="dark"] .module-modal-card,
[data-bs-theme="dark"] .module-modal-card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .module-modal-card .modal-card-title,
[data-bs-theme="dark"] .module-modal-card .modal-card-title {
  color: #ffffff !important;
}

[data-theme="dark"] .module-modal-card .text-muted,
[data-theme="dark"] .module-modal-card p,
[data-bs-theme="dark"] .module-modal-card .text-muted,
[data-bs-theme="dark"] .module-modal-card p {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .module-modal-card:hover,
[data-bs-theme="dark"] .module-modal-card:hover {
  border-color: #f87171 !important;
  background-color: #1e293b !important;
  box-shadow: 0 12px 24px -6px rgba(248, 113, 113, 0.25) !important;
}

.module-alert-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-size: 0.725rem;
  font-weight: 700;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
}

.module-alert-strip.alert-strip-amber {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.module-alert-strip.alert-strip-crimson {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.module-alert-strip.alert-strip-blue {
  background-color: #e0f2fe;
  color: #075985;
  border: 1px solid #7dd3fc;
}

.module-alert-strip.alert-strip-emerald {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

[data-theme="dark"] .module-notif-badge {
  border-color: #1e293b;
}

[data-theme="dark"] .module-alert-strip.alert-strip-amber {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .module-alert-strip.alert-strip-crimson {
  background-color: rgba(217, 48, 37, 0.15);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

[data-theme="dark"] .module-alert-strip.alert-strip-blue {
  background-color: rgba(26, 115, 232, 0.15);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .module-alert-strip.alert-strip-emerald {
  background-color: rgba(30, 142, 62, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

/* Custom Vector Naira Coin Icons matching Bootstrap Icons styling */
.bi-naira-coin,
.bi-naira-coin-fill {
  display: inline-block !important;
  width: 1em !important;
  height: 1em !important;
  vertical-align: -0.125em !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  background-position: center !important;
}

.bi-naira-coin::before,
.bi-naira-coin-fill::before {
  content: "" !important;
  display: none !important;
}

.bi-naira-coin {
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z'/%3E%3Cpath d='M5.2 4.5h1.2l3.4 5.3V4.5h1.2v7H9.8L6.4 6.2v5.3H5.2v-7z'/%3E%3Cpath d='M4 6.8h8v.9H4v-.9zm0 1.6h8v.9H4v-.9z'/%3E%3C/svg%3E") no-repeat center / contain !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z'/%3E%3Cpath d='M5.2 4.5h1.2l3.4 5.3V4.5h1.2v7H9.8L6.4 6.2v5.3H5.2v-7z'/%3E%3Cpath d='M4 6.8h8v.9H4v-.9zm0 1.6h8v.9H4v-.9z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

.bi-naira-coin-fill {
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm-2.8-11.5h1.2l3.4 5.3V4.5h1.2v7H9.8L6.4 6.2v5.3H5.2v-7zM4 6.8h8v.9H4v-.9zm0 1.6h8v.9H4v-.9z'/%3E%3C/svg%3E") no-repeat center / contain !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm-2.8-11.5h1.2l3.4 5.3V4.5h1.2v7H9.8L6.4 6.2v5.3H5.2v-7zM4 6.8h8v.9H4v-.9zm0 1.6h8v.9H4v-.9z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

/* --------------------------------------------------------------------------
   HERO BANNER TITLE — the row of icon, words, and any pill
   --------------------------------------------------------------------------
   Every banner title is a flex row of an icon, the words, and sometimes a
   pill. The markup sets gap-2 on each of them; this rule is the floor, so a
   banner written without it still spaces its parts rather than rendering
   them flush, and flex-wrap keeps a long title and its pill on the page
   instead of pushing the pill out of the card. */
.banner-title {
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   SHARED CARD BANNER THEME STYLING
   -------------------------------------------------------------------------- */
:is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) {
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
}
:is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-title { color: #0f172a !important; }
:is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-desc { color: #334155 !important; font-weight: 600; }
:is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-btn { background-color: #0f172a !important; color: #ffffff !important; border-color: #0f172a !important; }
:is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-btn:hover { background-color: #963031 !important; color: #ffffff !important; border-color: #963031 !important; }
[data-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner),
[data-bs-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) {
  border-color: rgba(255, 255, 255, 0.15) !important;
}
[data-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-title,
[data-bs-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-title { color: #ffffff !important; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-desc,
[data-bs-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-desc { color: rgba(255, 255, 255, 0.9) !important; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-btn,
[data-bs-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-btn { background-color: #ffffff !important; color: #0f172a !important; border-color: #ffffff !important; }
[data-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-btn:hover,
[data-bs-theme="dark"] :is(.tssp-card-banner, .gtp-card-banner, .urcw-card-banner) .banner-btn:hover { background-color: #f8fafc !important; color: #963031 !important; border-color: #f8fafc !important; }
/* --------------------------------------------------------------------------
   TABS AS BUTTONS IN A CARD

   Bootstrap's default .nav-tabs is a row of underlined text with a hairline
   rule — it reads as page furniture rather than as a control, and on a dark
   surface the active tab is nearly invisible.

   This restyles the same markup (`nav nav-tabs nav-fill`) into a segmented
   control: a recessed card holding one button per tab, the selected one
   filled with the NRS red. No page markup changes — every tab strip in the
   portal picks this up, including the officer profile modal.
   -------------------------------------------------------------------------- */
.nav-tabs {
  display: flex;
  gap: 0.375rem;
  padding: 0.375rem;
  border: 1px solid var(--nrs-border);
  border-radius: 1rem;
  background-color: #f1f5f9;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nav-tabs .nav-item {
  margin-bottom: 0;   /* Bootstrap lifts tabs onto the removed bottom rule */
}

.nav-tabs .nav-link {
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.5rem 0.875rem;
  /* Slate-600, not the lighter --nrs-slate: at this text size the token
     lands at 4.35:1 on the strip, just under the 4.5:1 AA threshold.
     This is 6.9:1. */
  color: #475569;
  background-color: transparent;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-tabs .nav-link:hover {
  color: var(--nrs-primary-text);
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-link.active:hover {
  color: #ffffff;
  background-color: var(--nrs-primary);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(150, 48, 49, 0.28);
}

/* The icons most tabs carry read better slightly dimmed when unselected. */
.nav-tabs .nav-link i {
  opacity: 0.75;
}
.nav-tabs .nav-link.active i {
  opacity: 1;
}

.nav-tabs .nav-link:focus-visible {
  outline: 2px solid var(--nrs-primary);
  outline-offset: 2px;
}

/* Narrow screens: let the strip wrap instead of squeezing labels to nothing. */
@media (max-width: 575.98px) {
  .nav-tabs {
    flex-wrap: wrap;
  }
  .nav-tabs .nav-item {
    flex: 1 1 45%;
  }
}

/* Dark mode: the strip sits BELOW the card surface (#1e293b), so it uses the
   page's deepest tone to read as recessed rather than floating. */
[data-theme="dark"] .nav-tabs,
[data-bs-theme="dark"] .nav-tabs {
  background-color: #0f172a;
  border-color: #334155;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .nav-tabs .nav-link,
[data-bs-theme="dark"] .nav-tabs .nav-link {
  color: #94a3b8;
}

[data-theme="dark"] .nav-tabs .nav-link:hover,
[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
  color: #f8fafc;
  background-color: rgba(248, 250, 252, 0.08);
  box-shadow: none;
}

[data-theme="dark"] .nav-tabs .nav-link.active,
[data-bs-theme="dark"] .nav-tabs .nav-link.active,
[data-theme="dark"] .nav-tabs .nav-link.active:hover,
[data-bs-theme="dark"] .nav-tabs .nav-link.active:hover {
  color: #ffffff;
  background-color: var(--nrs-primary);
  box-shadow: 0 4px 14px rgba(150, 48, 49, 0.45);
}

/* =============================================================================
   MODAL AND DRAWER HEADERS — the ecosystem rule.
   Every modal's and every drawer's (offcanvas) title bar is NRS maroon
   (#872D2C) with white text, in light and dark alike. The dark-theme
   overrides above set only borders and heading colours, so the !important
   here is what keeps a header maroon under [data-theme="dark"] and under
   any per-panel utility class (border-0, pb-0, py-2 …) a page may carry.
   Icons tinted NRS red for a light header would vanish on the band, so they
   go white too, and the close button is inverted the way Bootstrap's
   btn-close-white is.
   ============================================================================= */
.modal-header,
.offcanvas-header {
  background-color: #872D2C !important;
  color: #ffffff !important;
  padding: 0.75rem 1.25rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.modal-header .modal-title, .offcanvas-header .offcanvas-title,
.modal-header h1, .modal-header h2, .modal-header h3, .modal-header h4, .modal-header h5, .modal-header h6,
.offcanvas-header h1, .offcanvas-header h2, .offcanvas-header h3, .offcanvas-header h4, .offcanvas-header h5, .offcanvas-header h6,
.modal-header p, .modal-header small, .modal-header .small, .modal-header .extra-small,
.offcanvas-header p, .offcanvas-header small, .offcanvas-header .small, .offcanvas-header .extra-small,
.modal-header .text-muted, .modal-header .text-secondary, .modal-header .text-body, .modal-header .text-dark,
.offcanvas-header .text-muted, .offcanvas-header .text-secondary, .offcanvas-header .text-body, .offcanvas-header .text-dark,
.modal-header .text-danger, .modal-header .bi,
.offcanvas-header .text-danger, .offcanvas-header .bi {
  color: #ffffff !important;
}
.modal-header .btn-close,
.offcanvas-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.85;
}
.modal-header .btn-close:hover,
.offcanvas-header .btn-close:hover { opacity: 1; }
[data-theme="dark"] .modal-header .modal-title, [data-bs-theme="dark"] .modal-header .modal-title,
[data-theme="dark"] .offcanvas-header .offcanvas-title, [data-bs-theme="dark"] .offcanvas-header .offcanvas-title,
[data-theme="dark"] .modal-header h1, [data-theme="dark"] .modal-header h2, [data-theme="dark"] .modal-header h3,
[data-theme="dark"] .modal-header h4, [data-theme="dark"] .modal-header h5, [data-theme="dark"] .modal-header h6,
[data-bs-theme="dark"] .modal-header h1, [data-bs-theme="dark"] .modal-header h2, [data-bs-theme="dark"] .modal-header h3,
[data-bs-theme="dark"] .modal-header h4, [data-bs-theme="dark"] .modal-header h5, [data-bs-theme="dark"] .modal-header h6,
[data-theme="dark"] .offcanvas-header h1, [data-theme="dark"] .offcanvas-header h2, [data-theme="dark"] .offcanvas-header h3,
[data-theme="dark"] .offcanvas-header h4, [data-theme="dark"] .offcanvas-header h5, [data-theme="dark"] .offcanvas-header h6,
[data-bs-theme="dark"] .offcanvas-header h1, [data-bs-theme="dark"] .offcanvas-header h2, [data-bs-theme="dark"] .offcanvas-header h3,
[data-bs-theme="dark"] .offcanvas-header h4, [data-bs-theme="dark"] .offcanvas-header h5, [data-bs-theme="dark"] .offcanvas-header h6 {
  color: #ffffff !important;
}

/* Data tables read left to right: every column header and every cell is
   left-aligned — numbers included — so a column's figures sit under its
   heading and the eye never changes direction mid-table. */
.table th, .table td,
.datatable-wrapper .datatable-table th, .datatable-wrapper .datatable-table td { text-align: left; }

/* --------------------------------------------------------------------------
   INNER-PAGE BANNER

   One line deep: the description sits beside the title rather than under it,
   and whatever the page offers from its banner is pushed to the right edge.
   The wash is the theme's own primary over the card surface — color-mix where
   the browser has it, the same colour as rgba where it does not.
   -------------------------------------------------------------------------- */
[class*="-card-banner"] {
  background: linear-gradient(120deg, rgba(150, 48, 49, 0.1) 0%, rgba(150, 48, 49, 0.03) 45%, rgba(15, 23, 42, 0.04) 100%) !important;
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--nrs-primary) 10%, transparent) 0%,
    color-mix(in srgb, var(--nrs-primary) 3%, transparent) 45%,
    color-mix(in srgb, var(--nrs-dark) 4%, transparent) 100%) !important;
}

[data-theme="dark"] [class*="-card-banner"],
[data-bs-theme="dark"] [class*="-card-banner"] {
  background: linear-gradient(120deg, rgba(150, 48, 49, 0.3) 0%, rgba(150, 48, 49, 0.1) 45%, rgba(255, 255, 255, 0.04) 100%) !important;
  background: linear-gradient(120deg,
    color-mix(in srgb, var(--nrs-primary) 30%, transparent) 0%,
    color-mix(in srgb, var(--nrs-primary) 10%, transparent) 45%,
    rgba(255, 255, 255, 0.04) 100%) !important;
}

[class*="-card-banner"] > .card-body,
[class*="-card-banner"] > .card-body > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.65rem;
  row-gap: 0.15rem;
}

[class*="-card-banner"] > .card-body > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

[class*="-card-banner"] > .card-body {
  padding-top: 0.7rem !important;
  padding-bottom: 0.7rem !important;
}

[class*="-card-banner"] .banner-title {
  flex: 0 0 auto;
}

/* The description is a tag line on the title's own row, not a paragraph. */
[class*="-card-banner"] .banner-desc {
  margin-top: 0 !important;
  flex: 1 1 14rem;
  min-width: 0;
}

/* What the page offers from its banner (its actions, the help link, and a
   pill standing in for an action, such as Read-Only where a write button
   would be) is one group after the title block, held at the right edge; on a
   row too narrow for both it drops below, still on the right. Never put
   actions inside the title: it is only as wide as its words. A badge that
   describes the title stays in the title. Each item is as wide as its
   content, and an empty slot (a pending-approvals chip with nothing pending)
   takes no gap. */
[class*="-card-banner"] .banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

[class*="-card-banner"] .banner-actions > * {
  flex: 0 1 auto;
}

[class*="-card-banner"] .banner-actions > :empty {
  display: none;
}

/* On TSSP, URCW, GTP and the Developers Portal's inner pages the banner keeps
   only its Help link: the router moves the rest of its actions to the right
   of the breadcrumb row (.page-toolbar > .page-actions), where they
   follow the same rules. The row takes the breadcrumb's bottom margin, so the
   breadcrumb sits centred on it. */
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.5rem;
}

/* The breadcrumb gives up width first: it wraps its own trail down to 14rem
   before the actions drop to a line of their own. */
.page-toolbar > nav {
  flex: 1 1 0;
  min-width: min(14rem, 100%);
  margin-bottom: 0 !important;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

.page-actions > * {
  flex: 0 1 auto;
}

/* !important: an empty slot hides even when it carries a Bootstrap d-flex. */
.page-actions > :empty {
  display: none !important;
}

/* --------------------------------------------------------------------------
   SELECTED ITEM IN A SIDE LIST

   The side lists that choose what a page shows (how an assessment arose, a
   sanction, a relief, a rule branch, a KYC section or field) mark the chosen
   item with a quiet slate fill and dark text, not a block of NRS red: the
   item's own icon, code badge and count stay legible, and the red is left
   to table headers, actions and alerts. Text inside a selected item keeps
   its unselected colours, so a module marks the item .active and changes
   nothing else. The hairline ring is what tells the selected item from a
   hovered one: Bootstrap's hover wash is almost the same slate.
   -------------------------------------------------------------------------- */
.list-group-item.active {
  color: #0f172a;
  background-color: #f1f5f9;
  border-color: var(--border-color);
  box-shadow: inset 0 0 0 1px #cbd5e1;
}

[data-theme="dark"] .list-group-item.active,
[data-bs-theme="dark"] .list-group-item.active {
  color: #f1f5f9;
  background-color: #2a374c;
  box-shadow: inset 0 0 0 1px #475569;
}

/* --------------------------------------------------------------------------
   THE DARK BUTTON IN THE DARK THEME

   main.css paints .btn-dark in the heading colour with white text. In the
   light theme that is a dark button; in the dark theme the heading colour is
   near-white, so the label vanished (white on white), and the hover wash was
   no better. The dark theme keeps the button's weight as its inverse: the
   light heading colour with the page's own dark colour as the label, and the
   softer default colour for hover, focus and press. Bootstrap draws those
   states from its --bs-btn-* variables, so they are set here too; the plain
   color lines beat main.css's own .btn-dark rules. A disabled one sits on the
   dark page colour (main.css's dark .btn:disabled), so its label goes back
   to the light heading colour.
   -------------------------------------------------------------------------- */
[data-theme="dark"] .btn-dark,
[data-bs-theme="dark"] .btn-dark {
  --bs-btn-color: var(--background-color);
  --bs-btn-bg: var(--heading-color);
  --bs-btn-border-color: var(--heading-color);
  --bs-btn-hover-color: var(--background-color);
  --bs-btn-hover-bg: var(--default-color);
  --bs-btn-hover-border-color: var(--default-color);
  --bs-btn-active-color: var(--background-color);
  --bs-btn-active-bg: var(--default-color);
  --bs-btn-active-border-color: var(--default-color);
  --bs-btn-disabled-color: var(--heading-color);
  color: var(--background-color);
}

[data-theme="dark"] .btn-dark:hover,
[data-bs-theme="dark"] .btn-dark:hover {
  color: var(--background-color);
}

[data-theme="dark"] .btn-dark:disabled,
[data-theme="dark"] .btn-dark.disabled,
[data-bs-theme="dark"] .btn-dark:disabled,
[data-bs-theme="dark"] .btn-dark.disabled {
  color: var(--heading-color);
}

/* --------------------------------------------------------------------------
   9. WAITING (js_utilities/wait-states.js)
   A skeleton fades in only when an answer takes longer than a blink; its
   caption follows at two seconds and the "longer than usual" note at
   fifteen. A busy control keeps its colour, since it is working, not
   unavailable. Reduced motion and Pause Motion stop the shimmer and the
   page bar's run; the skeleton, caption and bar still show.
   -------------------------------------------------------------------------- */
.wait-region {
  color: var(--bs-secondary-color);
  animation: wait-appear 0.2s ease-out 0.2s backwards;
}

.wait-region .placeholder {
  border-radius: 0.375rem;
}

.wait-block,
.wait-table {
  padding: 0.25rem 0;
}

.wait-block .placeholder-wave > div + div {
  margin-top: 0.6rem;
}

.wait-table .table {
  pointer-events: none;
}

.wait-caption,
.wait-slow {
  font-size: 0.75rem;
  line-height: 1.5;
}

.wait-caption {
  margin-top: 0.75rem;
  animation: wait-appear 0.3s ease-out 2s backwards;
}

.wait-slow {
  visibility: hidden;
  animation: wait-reveal 0.3s ease-out 15s forwards;
}

/* On a dark hero or a filled surface a skeleton takes that surface's own text colour. */
.dp-hero .wait-region,
.tcp-hero .wait-region,
.text-white .wait-region,
.text-bg-danger .wait-region {
  color: inherit;
}

.wait-inline {
  display: inline-block;
  min-width: 4.5em;
  vertical-align: middle;
}

.wait-inline .placeholder {
  width: 100%;
}

.btn.is-busy {
  cursor: progress;
}

.btn.is-busy:disabled,
.btn.is-busy.disabled,
[data-theme="dark"] .btn.is-busy:disabled,
[data-bs-theme="dark"] .btn.is-busy:disabled {
  color: var(--bs-btn-color);
  background-color: var(--bs-btn-bg);
  border-color: var(--bs-btn-border-color);
  opacity: 1;
}

.btn.is-busy .spinner-border {
  margin-right: 0.4rem;
  vertical-align: -0.15em;
}

.btn.is-busy .spinner-border:only-child {
  margin-right: 0;
}

.btn.is-uploading {
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.24) var(--wait-progress, 0%),
    transparent var(--wait-progress, 0%));
}

.wait-route {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1035;
  width: 0;
  height: 3px;
  background: var(--nrs-primary-text);
  box-shadow: 0 0 6px rgba(var(--nrs-primary-rgb), 0.45);
  opacity: 0;
  pointer-events: none;
}

.wait-route.is-active {
  width: 35%;
  opacity: 1;
  animation: wait-appear 0.2s ease-out 0.15s backwards,
    wait-route-run 12s cubic-bezier(0.08, 0.6, 0.2, 1) 0.15s both;
}

.wait-route.is-done {
  width: 100%;
  opacity: 0;
  transition: width 0.2s ease-out, opacity 0.3s ease-out 0.15s;
}

@keyframes wait-appear {
  from { opacity: 0; }
}

@keyframes wait-reveal {
  from { visibility: visible; opacity: 0; }
  to { visibility: visible; opacity: 1; }
}

@keyframes wait-route-run {
  from { width: 0; }
  to { width: 90%; }
}

@media (prefers-reduced-motion: reduce) {
  .wait-region .placeholder-wave {
    animation: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .wait-route.is-active {
    animation: wait-appear 0.2s ease-out 0.15s backwards;
  }
}
