/* ============================================================================
   SCS — compatibility + shell layer
   ----------------------------------------------------------------------------
   Loads AFTER bootstrap.min.css and theme.css.

   What this file is for
   ---------------------
   The application's 580 views are written against Bootstrap 3 and AdminLTE 2.
   Rewriting that markup would mean touching ~2,900 sites across ~400 files, and
   every one of those is a chance to break a screen that used to work.

   So the markup stays and this file moves instead. It does two jobs:

     1. Rebuilds the AdminLTE shell (header, sidebar, content-wrapper, .box)
        from scratch on top of Bootstrap 5, so AdminLTE's own CSS — which is
        built on Bootstrap 3 and fights v5 — can be dropped entirely.

     2. Bridges the Bootstrap 3 class names the views use (.panel, .form-group,
        .btn-default, .pull-left, .col-xs-*, .label-*, .glyphicon-*) onto their
        Bootstrap 5 equivalents.

   Colours come from theme.css. Nothing here hardcodes a palette, so all four
   themes and both modes work from this one file.
   ========================================================================= */

/* ────────────────────────────────────────────────────────────────────────────
   1 · Base
   ──────────────────────────────────────────────────────────────────────── */

html, body { height: 100%; }

body {
  background: var(--scs-bg);
  color: var(--scs-ink);
  font-family: var(--scs-font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--scs-accent); text-decoration: none; }
a:hover { color: var(--scs-accent-hover); text-decoration: underline; }

::selection { background: var(--scs-accent-ring); }

/* Scrollbars follow the theme rather than staying stark white in dark mode. */
* { scrollbar-color: var(--scs-line) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--scs-line); border-radius: 6px;
  border: 2px solid var(--scs-bg);
}
*::-webkit-scrollbar-thumb:hover { background: var(--scs-ink-faint); }


/* ────────────────────────────────────────────────────────────────────────────
   2 · Shell — header, sidebar, content
   Replaces AdminLTE's layout CSS.
   ──────────────────────────────────────────────────────────────────────── */

.wrapper { min-height: 100%; position: relative; }

/* ── Header ── */
.main-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
  height: var(--scs-header-h);
  display: flex; align-items: stretch;
  background: var(--scs-panel);
  border-bottom: 1px solid var(--scs-line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
[data-mode="dark"] .main-header { box-shadow: none; }

.main-header .logo {
  width: var(--scs-sidebar-w);
  flex: 0 0 var(--scs-sidebar-w);
  display: flex; align-items: center; justify-content: center;
  background: var(--scs-sidebar-bg);
  color: #fff;
  font-weight: 600; font-size: 16px;
  text-decoration: none;
  overflow: hidden;
  transition: width var(--scs-speed) ease, flex-basis var(--scs-speed) ease;
}
.main-header .logo:hover { text-decoration: none; color: #fff; }
.main-header .logo img { max-height: 38px; max-width: 90%; object-fit: contain; }
.main-header .logo .logo-mini { display: none; }

.main-header .navbar {
  flex: 1 1 auto; min-width: 0;
  background: transparent; border: 0; margin: 0; padding: 0 6px 0 0;
  display: flex; align-items: center;
  min-height: var(--scs-header-h);
}
.main-header .main-header-tbl { width: 100%; }
/* A fixed-height header with visible overflow drops its contents onto the page
   below. Clipping horizontally only would cut off dropdowns, so the height is
   enforced on the row instead. */
.main-header .main-header-tbl > tbody > tr > td,
.main-header .main-header-tbl > tr > td { height: var(--scs-header-h); }

/* Sidebar toggle — AdminLTE shipped this as an empty <a>, so the icon is ours. */
.sidebar-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: var(--scs-header-h);
  color: var(--scs-ink-soft); text-decoration: none;
  border: 0; background: none; cursor: pointer;
}
.sidebar-toggle:hover { color: var(--scs-accent); background: var(--scs-panel-2); text-decoration: none; }
.sidebar-toggle::before {
  content: ""; width: 17px; height: 12px;
  border-top: 2px solid currentColor; border-bottom: 2px solid currentColor;
  position: relative;
}
.sidebar-toggle::after {
  content: ""; position: absolute; width: 17px; height: 2px; background: currentColor;
}

.navbar-custom-menu { margin-left: auto; }
.navbar-custom-menu > .nav.navbar-nav {
  /* flex-direction is the load-bearing part: Bootstrap 5's .navbar-nav sets
     flex-direction: column, so without this the header's icons stack on top of
     one another and spill out below the header. */
  display: flex; flex-direction: row; flex-wrap: nowrap;
  align-items: center; gap: 2px;
  list-style: none; margin: 0; padding: 0;
}
.navbar-custom-menu > .nav.navbar-nav > li { position: relative; }
.navbar-custom-menu > .nav.navbar-nav > li > a {
  display: flex; align-items: center; gap: 6px;
  padding: 0 11px; height: var(--scs-header-h);
  color: var(--scs-ink-soft); font-size: 13.5px; text-decoration: none;
  border-radius: 0;
}
.navbar-custom-menu > .nav.navbar-nav > li > a:hover,
.navbar-custom-menu > .nav.navbar-nav > li.open > a {
  color: var(--scs-accent); background: var(--scs-panel-2);
}
.navbar-custom-menu .label {
  position: absolute; top: 8px; right: 4px;
  font-size: 10px; padding: 2px 5px; line-height: 1;
}

/* ── Sidebar ── */
.main-sidebar {
  position: fixed; top: var(--scs-header-h); bottom: 0; left: 0;
  width: var(--scs-sidebar-w); z-index: 1020;
  background: var(--scs-sidebar-bg);
  overflow-x: hidden; overflow-y: auto;
  transition: width var(--scs-speed) ease;
}
.main-sidebar .sidebar { padding-bottom: 20px; }

.user-panel {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: var(--scs-sidebar-ink);
}
.user-panel .image img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.user-panel .info { min-width: 0; font-size: 13px; color: #fff; }
.user-panel .info p { margin: 0; font-weight: 600; }
.user-panel .info a { color: var(--scs-sidebar-ink); font-size: 11.5px; }

.sidebar-menu { list-style: none; margin: 0; padding: 8px 8px 0; }
.sidebar-menu > li { margin-bottom: 1px; }
.sidebar-menu > li > a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--scs-radius-sm);
  color: var(--scs-sidebar-ink); font-size: 13.5px; text-decoration: none;
  white-space: nowrap;
}
.sidebar-menu > li > a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.sidebar-menu > li.active > a,
.sidebar-menu > li.menu-open > a { background: rgba(255, 255, 255, .10); color: #fff; }
.sidebar-menu > li.active > a { box-shadow: inset 3px 0 0 var(--scs-sidebar-active); }
.sidebar-menu > li > a > i,
.sidebar-menu > li > a > .fa,
.sidebar-menu > li > a > .glyphicon { width: 18px; text-align: center; font-size: 14px; flex: 0 0 18px; }

.sidebar-menu .header {
  padding: 14px 12px 6px; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255, 255, 255, .38);
}

/* Treeview: the caret and the open/closed state. */
.sidebar-menu .treeview > a .pull-right,
.sidebar-menu .treeview > a .fa-angle-left { margin-left: auto; transition: transform var(--scs-speed) ease; }
.sidebar-menu .treeview.menu-open > a .fa-angle-left { transform: rotate(-90deg); }

/*
   Indent buys one thing — showing that these belong to the row above — and it
   was costing more than that. At 26px per level, a third-level item like
   "Transport Setup" had about 90px left for its label between the icon and the
   expand caret, so it wrapped onto two lines and the rail read as a wall of
   broken text. 16px still reads as nested, and the labels fit.
*/
.treeview-menu {
  list-style: none; margin: 2px 0 4px; padding: 0 0 0 16px;
  display: none;
}
/* Deeper levels indent less again: by the third level the containing rows have
   already established where you are. */
.treeview-menu .treeview-menu { padding-left: 12px; }
.menu-open > .treeview-menu, .treeview.active > .treeview-menu { display: block; }
.treeview-menu > li > a {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 8px; border-radius: var(--scs-radius-sm);
  color: rgba(255, 255, 255, .62); font-size: 12.8px; text-decoration: none;
  /* A label that still cannot fit wraps tightly instead of double-spacing. */
  line-height: 1.25;
}
.treeview-menu > li > a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.treeview-menu > li.active > a { color: #fff; }
.treeview-menu > li > a > i, .treeview-menu > li > a > .fa { width: 15px; text-align: center; font-size: 12px; }

/* ── Content ── */
.content-wrapper {
  margin-left: var(--scs-sidebar-w);
  padding-top: var(--scs-header-h);
  min-height: 100vh;
  background: var(--scs-bg);
  transition: margin-left var(--scs-speed) ease;
}
.content-header {
  padding: 18px 20px 4px;
}
.content-header > h1 {
  font-size: 21px; font-weight: 650; margin: 0; color: var(--scs-ink);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.content-header > h1 > small { font-size: 13px; font-weight: 400; color: var(--scs-ink-faint); }
.content-header .breadcrumb {
  background: none; padding: 4px 0 0; margin: 0; font-size: 12.5px;
}
.content { padding: 14px 20px 26px; }

.main-footer {
  margin-left: var(--scs-sidebar-w);
  padding: 12px 20px;
  background: var(--scs-panel);
  border-top: 1px solid var(--scs-line);
  color: var(--scs-ink-faint); font-size: 12px;
  transition: margin-left var(--scs-speed) ease;
}

/* ── Collapsed sidebar (sidebar-mini) ── */
body.sidebar-collapse .main-sidebar { width: var(--scs-sidebar-mini); }
body.sidebar-collapse .main-header .logo { width: var(--scs-sidebar-mini); flex-basis: var(--scs-sidebar-mini); }
body.sidebar-collapse .main-header .logo .logo-lg { display: none; }
body.sidebar-collapse .main-header .logo .logo-mini { display: block; }
body.sidebar-collapse .content-wrapper,
body.sidebar-collapse .main-footer { margin-left: var(--scs-sidebar-mini); }
body.sidebar-collapse .sidebar-menu > li > a > span,
body.sidebar-collapse .sidebar-menu .header,
body.sidebar-collapse .user-panel .info,
body.sidebar-collapse .treeview-menu { display: none; }
body.sidebar-collapse .sidebar-menu > li > a { justify-content: center; }

/* ── Small screens ── */
@media (max-width: 991px) {
  .main-sidebar { transform: translateX(-100%); }
  body.sidebar-open .main-sidebar { transform: translateX(0); }
  .content-wrapper, .main-footer { margin-left: 0; }
  .main-header .logo { width: auto; flex-basis: auto; padding: 0 14px; }
  .content, .content-header { padding-left: 12px; padding-right: 12px; }
}


/* ────────────────────────────────────────────────────────────────────────────
   3 · .box — AdminLTE's panel, used in 397 files. The single most important
   component in this file.
   ──────────────────────────────────────────────────────────────────────── */

.box {
  position: relative;
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius);
  box-shadow: var(--scs-shadow);
  margin-bottom: 18px;
}
.box.box-solid { box-shadow: var(--scs-shadow); }

.box-header {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px;
  border-bottom: 1px solid transparent;
}
.box-header.with-border { border-bottom-color: var(--scs-line-soft); }
.box-header > .box-title, .box-title {
  font-size: 15px; font-weight: 640; margin: 0; color: var(--scs-ink);
}
.box-header > .fa, .box-header > .glyphicon, .box-header > i { color: var(--scs-accent); }
.box-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.box-body { padding: 16px; }
.box-body.no-padding, .box-body.table-responsive { padding: 0; }
.box-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--scs-line-soft);
  background: var(--scs-panel-2);
  border-radius: 0 0 var(--scs-radius) var(--scs-radius);
}

/* Accent strip on top, the way AdminLTE marked box variants. */
.box.box-primary, .box.box-info, .box.box-success,
.box.box-warning, .box.box-danger, .box.box-default { border-top: 3px solid var(--scs-line); }
.box.box-primary { border-top-color: var(--scs-accent); }
.box.box-info    { border-top-color: var(--scs-info); }
.box.box-success { border-top-color: var(--scs-ok); }
.box.box-warning { border-top-color: var(--scs-warn); }
.box.box-danger  { border-top-color: var(--scs-danger); }

/* Solid variants filled their header. */
.box-solid.box-primary > .box-header { background: var(--scs-accent); color: #fff; }
.box-solid.box-info    > .box-header { background: var(--scs-info);   color: #fff; }
.box-solid.box-success > .box-header { background: var(--scs-ok);     color: #fff; }
.box-solid.box-warning > .box-header { background: var(--scs-warn);   color: #fff; }
.box-solid.box-danger  > .box-header { background: var(--scs-danger); color: #fff; }
.box-solid > .box-header,
.box-solid > .box-header .box-title,
.box-solid > .box-header > i { color: #fff; border-radius: var(--scs-radius) var(--scs-radius) 0 0; }

.box.collapsed-box .box-body, .box.collapsed-box .box-footer { display: none; }

/* Dashboard widgets. */
.small-box {
  position: relative; border-radius: var(--scs-radius);
  background: var(--scs-panel); border: 1px solid var(--scs-line);
  box-shadow: var(--scs-shadow); margin-bottom: 18px; padding: 16px 18px 0;
  overflow: hidden;
}
.small-box > .inner > h3 { font-size: 27px; font-weight: 700; margin: 0; }
.small-box > .inner > p { color: var(--scs-ink-soft); margin: 2px 0 12px; }
.small-box > .icon { position: absolute; right: 14px; top: 14px; font-size: 44px; opacity: .16; }
.small-box > .small-box-footer {
  display: block; margin: 0 -18px; padding: 8px; text-align: center;
  background: var(--scs-panel-2); color: var(--scs-ink-soft); font-size: 12.5px;
}
.small-box > .small-box-footer:hover { color: var(--scs-accent); text-decoration: none; }

.info-box {
  display: flex; align-items: stretch; gap: 0;
  background: var(--scs-panel); border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius); box-shadow: var(--scs-shadow);
  margin-bottom: 18px; overflow: hidden; min-height: 78px;
}
.info-box-icon {
  display: grid; place-items: center; width: 74px; font-size: 30px;
  background: var(--scs-accent-soft); color: var(--scs-accent);
}
.info-box-content { padding: 12px 14px; }
.info-box-text { font-size: 12.5px; color: var(--scs-ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.info-box-number { font-size: 20px; font-weight: 700; }

.callout {
  border-radius: var(--scs-radius); padding: 13px 16px; margin-bottom: 16px;
  border: 1px solid var(--scs-line); border-left-width: 3px;
  background: var(--scs-panel);
}
.callout.callout-info    { border-left-color: var(--scs-info);   background: var(--scs-info-soft); }
.callout.callout-success { border-left-color: var(--scs-ok);     background: var(--scs-ok-soft); }
.callout.callout-warning { border-left-color: var(--scs-warn);   background: var(--scs-warn-soft); }
.callout.callout-danger  { border-left-color: var(--scs-danger); background: var(--scs-danger-soft); }
.callout h4 { font-size: 15px; margin: 0 0 4px; }

.nav-tabs-custom {
  background: var(--scs-panel); border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius); box-shadow: var(--scs-shadow); margin-bottom: 18px;
}
.nav-tabs-custom > .nav-tabs { border-bottom: 1px solid var(--scs-line); padding: 0 8px; }
.nav-tabs-custom > .tab-content { padding: 16px; }


/* ────────────────────────────────────────────────────────────────────────────
   4 · Bootstrap 3 → Bootstrap 5 bridges
   These class names appear throughout the views and no longer exist in v5.
   ──────────────────────────────────────────────────────────────────────── */

/* Floats — 236 sites. */
.pull-right { float: right !important; }
.pull-left  { float: left !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }

/* Visibility — v3 names. */
.hidden { display: none !important; }

/* .show is deliberately NOT redefined here.
   In Bootstrap 3 it was a visibility helper meaning "display: block". In
   Bootstrap 5 the same class is state, and the dropdown script puts it on the
   toggle button as well as on the menu — so a blanket
   `.show { display: block !important }` turned the header's user button from a
   flex row into a block the moment it was clicked, dropping the avatar to the
   top and the caret onto the line below it.

   Checked before removing: no view in this application uses .show as a v3
   helper. The only matches are the unrelated .show-print and .show-qr. */
.invisible { visibility: hidden; }
@media print { .hidden-print { display: none !important; } }
@media (max-width: 767px)  { .hidden-xs { display: none !important; } }
@media (min-width: 768px) and (max-width: 991px)  { .hidden-sm { display: none !important; } }
@media (min-width: 992px) and (max-width: 1199px) { .hidden-md { display: none !important; } }
@media (min-width: 1200px) { .hidden-lg { display: none !important; } }
.visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; }
@media (max-width: 767px)  { .visible-xs { display: block !important; } }
@media (min-width: 768px) and (max-width: 991px)  { .visible-sm { display: block !important; } }
@media (min-width: 992px) and (max-width: 1199px) { .visible-md { display: block !important; } }
@media (min-width: 1200px) { .visible-lg { display: block !important; } }

/* Grid: .col-xs-* lives in grid-compat.css, which loads BEFORE bootstrap so
   that .col-md-* can still override it on wider screens. */

/* Forms — 144 sites of .form-group alone. */
.form-group { margin-bottom: 14px; }
.form-group > label, .control-label {
  display: inline-block; margin-bottom: 5px;
  font-size: 12.8px; font-weight: 600; color: var(--scs-ink-soft);
}
.help-block { display: block; margin-top: 5px; font-size: 12px; color: var(--scs-ink-faint); }
.form-horizontal .control-label { padding-top: 7px; margin-bottom: 0; }

/* v3 wrapped checkboxes in .checkbox / .radio. */
.checkbox, .radio { position: relative; display: block; margin: 8px 0; }
.checkbox label, .radio label { padding-left: 22px; font-weight: 400; cursor: pointer; }
.checkbox input[type="checkbox"], .radio input[type="radio"] {
  position: absolute; margin-left: -22px; margin-top: 3px;
}

/* Input groups — .input-group-addon became .input-group-text. 61 sites. */
.input-group-addon {
  display: flex; align-items: center;
  padding: .375rem .75rem;
  font-size: 14px; color: var(--scs-ink-soft); text-align: center;
  background-color: var(--scs-panel-2);
  border: 1px solid var(--scs-line);
}
.input-group > .input-group-addon:first-child { border-radius: var(--scs-radius-sm) 0 0 var(--scs-radius-sm); border-right: 0; }
.input-group > .input-group-addon:last-child  { border-radius: 0 var(--scs-radius-sm) var(--scs-radius-sm) 0; border-left: 0; }
.input-group-btn { display: flex; }

/* Panels — 235 sites. Rendered as cards. */
.panel {
  background: var(--scs-panel); border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius); box-shadow: var(--scs-shadow); margin-bottom: 18px;
}
.panel-heading {
  padding: 12px 16px; border-bottom: 1px solid var(--scs-line-soft);
  border-radius: var(--scs-radius) var(--scs-radius) 0 0;
  font-weight: 640;
}
.panel-title { margin: 0; font-size: 15px; font-weight: 640; }
.panel-body { padding: 16px; }
.panel-footer {
  padding: 12px 16px; border-top: 1px solid var(--scs-line-soft);
  background: var(--scs-panel-2); border-radius: 0 0 var(--scs-radius) var(--scs-radius);
}
.panel-primary > .panel-heading { background: var(--scs-accent); color: #fff; }
.panel-success > .panel-heading { background: var(--scs-ok-soft);     color: var(--scs-ok); }
.panel-info    > .panel-heading { background: var(--scs-info-soft);   color: var(--scs-info); }
.panel-warning > .panel-heading { background: var(--scs-warn-soft);   color: var(--scs-warn); }
.panel-danger  > .panel-heading { background: var(--scs-danger-soft); color: var(--scs-danger); }

.well {
  background: var(--scs-panel-2); border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius); padding: 16px; margin-bottom: 16px;
}
.page-header {
  padding-bottom: 9px; margin: 8px 0 18px;
  border-bottom: 1px solid var(--scs-line);
}

/* v3 .label is v5 .badge. */
.label {
  display: inline-block; padding: .3em .55em; font-size: 11px; font-weight: 600;
  line-height: 1; text-align: center; white-space: nowrap;
  vertical-align: baseline; border-radius: 20px;
}
.label-default { background: var(--scs-line);        color: var(--scs-ink-soft); }
.label-primary { background: var(--scs-accent);      color: #fff; }
.label-success { background: var(--scs-ok-soft);     color: var(--scs-ok); }
.label-info    { background: var(--scs-info-soft);   color: var(--scs-info); }
.label-warning { background: var(--scs-warn-soft);   color: var(--scs-warn); }
.label-danger  { background: var(--scs-danger-soft); color: var(--scs-danger); }

/* v3 contextual text/background helpers. */
.text-muted   { color: var(--scs-ink-faint) !important; }
.text-primary { color: var(--scs-accent) !important; }
.text-success { color: var(--scs-ok) !important; }
.text-info    { color: var(--scs-info) !important; }
.text-warning { color: var(--scs-warn) !important; }
.text-danger, .text-red { color: var(--scs-danger) !important; }
.bg-primary { background: var(--scs-accent) !important; color: #fff !important; }
.bg-success { background: var(--scs-ok-soft) !important; }
.bg-info    { background: var(--scs-info-soft) !important; }
.bg-warning { background: var(--scs-warn-soft) !important; }
.bg-danger  { background: var(--scs-danger-soft) !important; }

.img-responsive { display: block; max-width: 100%; height: auto; }
.img-circle { border-radius: 50%; }
.caret {
  display: inline-block; width: 0; height: 0; margin-left: 3px; vertical-align: middle;
  border-top: 4px dashed; border-right: 4px solid transparent; border-left: 4px solid transparent;
}
.close {
  background: none; border: 0; font-size: 20px; font-weight: 600; line-height: 1;
  color: var(--scs-ink-faint); opacity: .8; cursor: pointer; padding: 0;
}
.close:hover { opacity: 1; color: var(--scs-ink); }


/* ────────────────────────────────────────────────────────────────────────────
   5 · Glyphicons → Font Awesome
   Bootstrap dropped glyphicons in v4. All 23 icons the views actually use are
   mapped onto Font Awesome 4, which the layout already loads.
   ──────────────────────────────────────────────────────────────────────── */

.glyphicon {
  display: inline-block; font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased;
}
.glyphicon-th::before            { content: "\f00a"; }
.glyphicon-plus::before          { content: "\f067"; }
.glyphicon-list-alt::before      { content: "\f022"; }
.glyphicon-user::before          { content: "\f007"; }
.glyphicon-remove::before        { content: "\f00d"; }
.glyphicon-trash::before         { content: "\f1f8"; }
.glyphicon-download::before      { content: "\f019"; }
.glyphicon-education::before     { content: "\f19d"; }
.glyphicon-modal-window::before  { content: "\f2d0"; }
.glyphicon-pencil::before        { content: "\f040"; }
.glyphicon-alert::before         { content: "\f071"; }
.glyphicon-search::before        { content: "\f002"; }
.glyphicon-comment::before       { content: "\f075"; }
.glyphicon-bullhorn::before      { content: "\f0a1"; }
.glyphicon-lock::before          { content: "\f023"; }
.glyphicon-briefcase::before     { content: "\f0b1"; }
.glyphicon-transfer::before      { content: "\f0ec"; }
.glyphicon-tasks::before         { content: "\f0ae"; }
.glyphicon-list::before          { content: "\f03a"; }
.glyphicon-hand-left::before     { content: "\f0a5"; }
.glyphicon-fire::before          { content: "\f06d"; }
.glyphicon-camera::before        { content: "\f030"; }
.glyphicon-blackboard::before    { content: "\f02d"; }


/* ────────────────────────────────────────────────────────────────────────────
   6 · Modern controls
   Bootstrap 5 styles .form-control and .btn already; this is the SCS character
   on top — softer radii, a visible focus ring, denser tables.
   ──────────────────────────────────────────────────────────────────────── */

.form-control, .form-select, select.form-control, textarea.form-control,
input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="date"], input[type="search"], select, textarea {
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius-sm);
  color: var(--scs-ink);
  font-size: 14px;
  padding: .45rem .7rem;
  transition: border-color var(--scs-speed), box-shadow var(--scs-speed);
}
.form-control:focus, .form-select:focus, select:focus, textarea:focus,
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
input[type="number"]:focus, input[type="date"]:focus, input[type="search"]:focus {
  border-color: var(--scs-accent);
  box-shadow: var(--scs-ring);
  outline: 0;
}
.form-control::placeholder { color: var(--scs-ink-faint); }
.form-control:disabled, .form-control[readonly] { background: var(--scs-panel-2); color: var(--scs-ink-faint); }
select, select.form-control {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--scs-ink-faint) 50%),
                    linear-gradient(135deg, var(--scs-ink-faint) 50%, transparent 50%);
  background-position: calc(100% - 15px) center, calc(100% - 10px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
select[multiple] { background-image: none; padding-right: .7rem; }

.btn {
  border-radius: var(--scs-radius-sm);
  font-size: 13.5px; font-weight: 550;
  padding: .45rem .9rem;
  transition: background var(--scs-speed), border-color var(--scs-speed), box-shadow var(--scs-speed);
}
.btn:focus-visible { box-shadow: var(--scs-ring); outline: 0; }
.btn-primary { background: var(--scs-accent); border-color: var(--scs-accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--scs-accent-hover); border-color: var(--scs-accent-hover); color: #fff; }
.btn-default {
  background: var(--scs-panel); border: 1px solid var(--scs-line); color: var(--scs-ink);
}
.btn-default:hover { background: var(--scs-panel-2); border-color: var(--scs-ink-faint); color: var(--scs-ink); }
.btn-success { background: var(--scs-ok); border-color: var(--scs-ok); color: #fff; }
.btn-info    { background: var(--scs-info); border-color: var(--scs-info); color: #fff; }
.btn-warning { background: var(--scs-warn); border-color: var(--scs-warn); color: #fff; }
.btn-danger  { background: var(--scs-danger); border-color: var(--scs-danger); color: #fff; }
.btn-link    { color: var(--scs-accent); }
.btn-flat    { border-radius: var(--scs-radius-sm); }
.btn-xs { padding: .2rem .5rem; font-size: 12px; }
.btn-sm { padding: .3rem .65rem; font-size: 12.5px; }
.btn-lg { padding: .6rem 1.2rem; font-size: 15px; }

/* Radio/checkbox button groups (`data-toggle="buttons"`).
   Bootstrap 3 hid the input with a clip rect and let the label carry the whole
   appearance; Bootstrap 5 dropped the plugin and its styling with it. compat.js
   restores the .active behaviour, and this restores the look — without it the
   raw radio dot sits inside the button, which is what "Yes ◯ / No ◯" was
   showing on the student form.

   Scoped to [data-toggle="buttons"] so ordinary labelled radios elsewhere on
   the form keep their visible control. */
.btn-group[data-toggle="buttons"] > label,
.btn-group[data-toggle="buttons"] > .btn {
  position: relative;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
}
.btn-group[data-toggle="buttons"] > label > input[type="radio"],
.btn-group[data-toggle="buttons"] > label > input[type="checkbox"],
.btn-group[data-toggle="buttons"] > .btn > input[type="radio"],
.btn-group[data-toggle="buttons"] > .btn > input[type="checkbox"] {
  /* Clipped rather than display:none — a hidden input cannot receive focus,
     which would take these groups off the keyboard-tab order entirely. */
  position: absolute;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
  opacity: 0;
}
.btn-group[data-toggle="buttons"] > label.active,
.btn-group[data-toggle="buttons"] > .btn.active {
  background: var(--scs-accent);
  border-color: var(--scs-accent);
  color: #fff;
  box-shadow: none;
}
.btn-group[data-toggle="buttons"] > label.active:hover,
.btn-group[data-toggle="buttons"] > .btn.active:hover {
  background: var(--scs-accent-hover);
  border-color: var(--scs-accent-hover);
  color: #fff;
}
/* Keyboard focus has to stay visible now that the input itself is clipped. */
.btn-group[data-toggle="buttons"] > label:focus-within {
  box-shadow: var(--scs-ring);
  z-index: 2;
}

.table { color: var(--scs-ink); margin-bottom: 0; --bs-table-bg: transparent; }
.table > thead > tr > th, .table > thead th {
  background: var(--scs-panel-2);
  border-bottom: 1px solid var(--scs-line);
  font-size: 12px; font-weight: 650; letter-spacing: .03em;
  text-transform: uppercase; color: var(--scs-ink-soft);
  padding: 10px 12px; white-space: nowrap;
}
.table > tbody > tr > td, .table > tbody td {
  padding: 9px 12px; border-bottom: 1px solid var(--scs-line-soft); vertical-align: middle;
}
/* .table-condensed — Bootstrap 3's compact table.
   Renamed to .table-sm in v4 and the old name dropped, so 185 views here ask
   for a dense table and silently get the roomy one. It matters most on exactly
   the screens where it was used deliberately: Fees > Generate Fees lists a
   whole batch, and at the default padding a class of 48 needs three screens
   instead of one.

   The selectors mirror the base rules above so they win on source order rather
   than needing !important. .table-sm is included so both spellings behave the
   same, whichever a view happens to use. */
.table-condensed > thead > tr > th, .table-condensed > thead th,
.table-sm > thead > tr > th, .table-sm > thead th {
  padding: 6px 9px;
}
.table-condensed > tbody > tr > td, .table-condensed > tbody td,
.table-condensed > tfoot > tr > td, .table-condensed > tfoot td,
.table-sm > tbody > tr > td, .table-sm > tbody td,
.table-sm > tfoot > tr > td, .table-sm > tfoot td {
  padding: 5px 9px;
}

/* .table-responsive put on the <table> itself.
   Bootstrap expects it on a wrapping div; on the table it does nothing, so a
   table wider than its column simply gets clipped and the right-hand columns
   are unreachable. On Fees > Generate Receipt that hid Total Paid and the
   balance — the two figures the screen exists to show.

   display:block turns the table into a scrollable box while thead/tbody keep
   their table display, so the columns still line up. Views that use the class
   correctly, on a wrapper, are unaffected — a div is not a table. */
table.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* AdminLTE utility, used by the views and lost with AdminLTE's stylesheet. */
.text-bold, .text-bold > td, .text-bold > th { font-weight: 700; }

/* Bootstrap 3's .has-feedback — an icon sitting inside the field.
   Dropped in v4/v5, so the icon fell to wherever it happened to land in the
   flow. Used on the login form and one other view. */
.has-feedback { position: relative; }
.has-feedback .form-control { padding-right: 36px; }
.has-feedback .form-control-feedback {
  position: absolute; top: 0; right: 0;
  width: 36px; height: 100%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;                 /* the icon must not eat the click */
  color: var(--scs-ink-faint);
  z-index: 2;
}

.table-hover > tbody > tr:hover > td { background: var(--scs-panel-2); }
.table-bordered, .table-bordered > :not(caption) > * > * { border-color: var(--scs-line); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: var(--scs-panel-2); color: var(--scs-ink); }

.modal-content {
  background: var(--scs-panel); color: var(--scs-ink);
  border: 1px solid var(--scs-line); border-radius: var(--scs-radius-lg);
  box-shadow: var(--scs-shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--scs-line-soft); padding: 15px 18px; }
.modal-title  { font-size: 16px; font-weight: 640; }
.modal-body   { padding: 18px; }
.modal-footer { border-top: 1px solid var(--scs-line-soft); padding: 13px 18px; }

.dropdown-menu {
  background: var(--scs-panel); border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius); box-shadow: var(--scs-shadow-lg);
  font-size: 13.5px; padding: 6px;
}
.dropdown-menu > li > a, .dropdown-item {
  display: block; padding: 7px 11px; border-radius: var(--scs-radius-sm);
  color: var(--scs-ink); text-decoration: none;
}
.dropdown-menu > li > a:hover, .dropdown-item:hover {
  background: var(--scs-accent-soft); color: var(--scs-accent); text-decoration: none;
}
.dropdown-menu .divider { height: 1px; margin: 5px 0; background: var(--scs-line); }

.nav-tabs { border-bottom: 1px solid var(--scs-line); gap: 2px; }
.nav-tabs > li > a, .nav-tabs .nav-link {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--scs-ink-soft); padding: 9px 14px; font-size: 13.5px; font-weight: 550;
}
.nav-tabs > li > a:hover, .nav-tabs .nav-link:hover { border-bottom-color: var(--scs-line); color: var(--scs-ink); }
.nav-tabs > li.active > a, .nav-tabs .nav-link.active {
  background: transparent; border-bottom-color: var(--scs-accent); color: var(--scs-accent);
}

.alert { border-radius: var(--scs-radius); border: 1px solid transparent; padding: 12px 15px; font-size: 13.5px; }
.alert-success { background: var(--scs-ok-soft);     border-color: var(--scs-ok);     color: var(--scs-ok); }
.alert-info    { background: var(--scs-info-soft);   border-color: var(--scs-info);   color: var(--scs-info); }
.alert-warning { background: var(--scs-warn-soft);   border-color: var(--scs-warn);   color: var(--scs-warn); }
.alert-danger  { background: var(--scs-danger-soft); border-color: var(--scs-danger); color: var(--scs-danger); }

.pagination { --bs-pagination-color: var(--scs-ink-soft); --bs-pagination-bg: var(--scs-panel);
              --bs-pagination-border-color: var(--scs-line);
              --bs-pagination-active-bg: var(--scs-accent);
              --bs-pagination-active-border-color: var(--scs-accent);
              --bs-pagination-hover-bg: var(--scs-panel-2); }

/* Bootstrap 3 shaped pagination.
   BS3 styled `.pagination > li > a` directly. BS5 dropped that selector and
   styles `.page-item` / `.page-link` instead, so any markup that predates it
   renders as bare inline text — no box, no padding, no gap. DataTables emits
   exactly that shape and puts no class at all on its <a>, which is why the
   student list showed a run-together "Previous1Next".

   Rewriting DataTables' output would mean patching the plugin; giving the old
   selector the new appearance costs one rule and leaves the plugin alone.
   `li:not(.page-item)` keeps genuine BS5 markup on Bootstrap's own path. */
.pagination > li:not(.page-item) { display: block; }
.pagination > li:not(.page-item) > a,
.pagination > li:not(.page-item) > span {
  position: relative;
  display: block;
  padding: var(--bs-pagination-padding-y, .375rem) var(--bs-pagination-padding-x, .75rem);
  font-size: 13px;
  color: var(--scs-ink-soft);
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.pagination > li:not(.page-item):not(:first-child) > a,
.pagination > li:not(.page-item):not(:first-child) > span { margin-left: -1px; }
.pagination > li:not(.page-item):first-child > a,
.pagination > li:not(.page-item):first-child > span {
  border-top-left-radius: var(--scs-radius); border-bottom-left-radius: var(--scs-radius);
}
.pagination > li:not(.page-item):last-child > a,
.pagination > li:not(.page-item):last-child > span {
  border-top-right-radius: var(--scs-radius); border-bottom-right-radius: var(--scs-radius);
}
.pagination > li:not(.page-item):hover > a { background: var(--scs-panel-2); color: var(--scs-ink); }

/* DataTables marks state on the <li>, not the <a>. */
.pagination > li.active > a,
.pagination > li.active > span,
.pagination > li.active:hover > a {
  background: var(--scs-accent); border-color: var(--scs-accent); color: #fff; z-index: 2;
}
.pagination > li.disabled > a,
.pagination > li.disabled > span,
.pagination > li.disabled:hover > a {
  background: var(--scs-panel); border-color: var(--scs-line);
  color: var(--scs-ink-faint); pointer-events: none; cursor: default;
}

/* DataTables' own wrapper bits: keep the footer row on one line and push the
   pager to the right, which its Bootstrap 3 stylesheet did with floats. */
.dataTables_wrapper .dataTables_paginate { float: right; padding-top: 4px; }
.dataTables_wrapper .dataTables_paginate .pagination { margin: 0; }
.dataTables_wrapper .dataTables_info { padding-top: 10px; font-size: 13px; color: var(--scs-ink-soft); }
.dataTables_wrapper .dataTables_filter { float: right; }
.dataTables_wrapper .dataTables_length { float: left; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select { display: inline-block; width: auto; }
.dataTables_wrapper::after { content: ""; display: table; clear: both; }

/* DataTables FixedColumns.
   The frozen left columns are a *clone* of the real table, laid over it. For
   the clone to hide what it sits on, FixedColumns paints it opaque white — a
   literal `background-color: white`, since it long predates theming.

   In light mode white happens to match the panel, so nobody noticed. In dark
   mode the student list came out with four white columns carrying the dark
   theme's light text: invisible. Repainting the clone from the same variables
   as the real table fixes both modes from one place. */
.DTFC_LeftWrapper, .DTFC_RightWrapper,
.DTFC_LeftBodyWrapper, .DTFC_RightBodyWrapper,
.DTFC_LeftBodyLiner, .DTFC_RightBodyLiner,
.DTFC_LeftHeadWrapper, .DTFC_RightHeadWrapper,
.DTFC_LeftFootWrapper, .DTFC_RightFootWrapper {
  background: var(--scs-panel);
}
table.DTFC_Cloned { background: var(--scs-panel); }
table.DTFC_Cloned > thead > tr > th,
table.DTFC_Cloned > tfoot > tr > th {
  background: var(--scs-panel-2);
  color: var(--scs-ink);
  border-color: var(--scs-line);
}
table.DTFC_Cloned > tbody > tr { background: var(--scs-panel); color: var(--scs-ink); }
table.DTFC_Cloned > tbody > tr > td {
  background: inherit;
  color: var(--scs-ink);
  border-color: var(--scs-line);
}
/* Keep the clone's zebra striping in step with the table underneath, or the
   frozen columns drift out of phase with the rows they belong to. */
table.DTFC_Cloned.table-striped > tbody > tr:nth-of-type(odd),
table.DTFC_Cloned.table-striped > tbody > tr:nth-of-type(odd) > td {
  background: var(--scs-panel-2);
}

.breadcrumb { --bs-breadcrumb-divider-color: var(--scs-ink-faint); font-size: 12.5px; }
.progress { background: var(--scs-line-soft); border-radius: 20px; height: 8px; }
.progress-bar { background: var(--scs-accent); }

/* Print — the shell disappears, the content stays. */
@media print {
  .main-header, .main-sidebar, .main-footer, .box-tools, .no-print { display: none !important; }
  .content-wrapper { margin-left: 0 !important; padding-top: 0 !important; background: #fff !important; }
  .box { box-shadow: none !important; border-color: #ccc !important; }
  body { background: #fff !important; color: #000 !important; }
}


/* ────────────────────────────────────────────────────────────────────────────
   7 · Header title strip
   The layout lays the header out with a table and puts the page title in a
   <ul>. Without this it renders as a bulleted list in the middle of the header.
   ──────────────────────────────────────────────────────────────────────── */

.main-header-tbl { width: 100%; border: 0; margin: 0; }
.main-header-tbl > tbody > tr > td,
.main-header-tbl > tr > td { border: 0; padding: 0; vertical-align: middle; }

.main-header .page-title ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
}
.main-header .page-title li.title {
  font-size: 15.5px; font-weight: 640; color: var(--scs-ink);
}
.main-header .page-title li.action {
  font-size: 12.5px; color: var(--scs-ink-faint);
}
.main-header .page-title li.action:not(:empty)::before {
  content: "/"; margin-right: 9px; color: var(--scs-line);
}

/* The user/notification menus in the header open as plain <ul> dropdowns.
 *
 * position:absolute is the load-bearing line. Bootstrap 5 ships
 *
 *     .navbar-nav .dropdown-menu { position: static }
 *
 * and only restores absolute inside a .navbar-expand-* container. AdminLTE's
 * header markup has .navbar-nav but no .navbar-expand-*, so it lands in the
 * static branch: the open menu joins the flow, the <li> grows to the menu's
 * full height, and everything in the header row is pushed down with it. On
 * Fees > Generate Receipt that dropped the ☰ and the breadcrumb from y=0 to
 * y=117, on top of the student's card.
 *
 * Same root cause as the flex-direction fix above — AdminLTE's .navbar-nav
 * markup colliding with what Bootstrap 5 now means by a navbar. */
.navbar-custom-menu .dropdown-menu,
.main-header .navbar-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  min-width: 260px;   /* 230 wrapped "Change Password" onto two lines */
  z-index: 1040;      /* above .main-header's own 1030 */
}
.navbar-custom-menu .dropdown-menu > li > a { white-space: normal; }
.navbar-custom-menu .user-header { padding: 14px; text-align: center; }
.navbar-custom-menu .user-header img { width: 62px; height: 62px; border-radius: 50%; }
.navbar-custom-menu .user-footer { display: flex; justify-content: space-between; padding: 10px; gap: 8px; }
.navbar-custom-menu .user-footer .btn { font-size: 12.5px; }
.navbar-custom-menu .menu { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.navbar-custom-menu .menu > li > a { display: block; padding: 9px 11px; border-bottom: 1px solid var(--scs-line-soft); }

/* ── Appearance preferences (Theme/Preferences) ─────────────────────────────
   The one screen in the application written against the new theme rather than
   bridged into it, so it uses the variables directly. */

.scs-pref-heading {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--scs-ink-faint); margin: 0 0 12px;
}
.scs-pref-heading + * { margin-bottom: 26px; }

.scs-palette {
  display: flex; align-items: center; gap: 10px; position: relative;
  width: 100%; padding: 12px 14px; margin-bottom: 12px;
  background: var(--scs-panel); border: 2px solid var(--scs-line);
  border-radius: var(--scs-radius); cursor: pointer; text-align: left;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.scs-palette:hover { border-color: var(--scs-ink-faint); }
.scs-palette:focus-visible { outline: 0; box-shadow: var(--scs-ring); }
.scs-palette.is-active { border-color: var(--scs-accent); }

/* The chip is the honest part of this control: it is the palette's actual
   accent colour, so all four can be compared at once without applying each. */
.scs-palette-chip {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.scs-palette-name { font-size: 14px; color: var(--scs-ink); }
.scs-palette-tick {
  margin-left: auto; color: var(--scs-accent); opacity: 0;
  transition: opacity .12s ease;
}
.scs-palette.is-active .scs-palette-tick { opacity: 1; }

.scs-mode-group { margin-bottom: 26px; }
.scs-mode-group .btn.active {
  background: var(--scs-accent); border-color: var(--scs-accent); color: #fff;
}

.scs-pref-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.scs-pref-note { font-size: 13px; color: var(--scs-ink-soft); }
.scs-pref-note.is-dirty { color: var(--scs-warn); }

.scs-pref-help { font-size: 13px; color: var(--scs-ink-soft); }
.scs-pref-help p { margin-bottom: 10px; }
.scs-pref-help strong { color: var(--scs-ink); }

.scs-appearance-link {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; font-size: 13.5px;
  color: var(--scs-ink-soft); text-decoration: none;
  border-top: 1px solid var(--scs-line-soft);
}
.scs-appearance-link:hover { background: var(--scs-panel-2); color: var(--scs-accent); text-decoration: none; }

/* ── AdminLTE colour utilities ─────────────────────────────────────────────
   .bg-blue / .text-yellow and friends came from AdminLTE's stylesheet, which
   was dropped. The views still use them heavily — around 90 uses of bg-* and
   nearly 300 of text-*.

   The bg-* ones were the visible failure: Bootstrap 5's .badge sets
   color:#fff, so a `badge bg-green` with no background rendered white on
   white. On Class/CreateClass that hid every amount on the screen.

   The text-* ones did not disappear, which is worse in its own way — they
   quietly fell back to ordinary body colour, so a figure marked as a warning
   or a shortfall read as if it were unremarkable.

   Mapped onto the theme's semantic colours rather than AdminLTE's fixed hues,
   so they follow the palette and stay legible in dark mode. Where the views
   use several of these to tell values apart (blue/orange/green on the fee
   screens), the distinct mapping is kept — collapsing them onto one colour
   would lose the distinction the author was drawing. */

.bg-blue, .bg-light-blue, .bg-primary { background-color: var(--scs-accent) !important; color: #fff !important; }
.bg-aqua, .bg-info                    { background-color: var(--scs-info)   !important; color: #fff !important; }
.bg-green, .bg-success, .bg-olive     { background-color: var(--scs-ok)     !important; color: #fff !important; }
.bg-yellow, .bg-orange, .bg-warning   { background-color: var(--scs-warn)   !important; color: #fff !important; }
.bg-red, .bg-danger, .bg-maroon       { background-color: var(--scs-danger) !important; color: #fff !important; }
.bg-purple                            { background-color: #7c3aed !important; color: #fff !important; }
.bg-navy                              { background-color: var(--scs-sidebar-bg) !important; color: #fff !important; }
.bg-teal                              { background-color: #0d9488 !important; color: #fff !important; }
.bg-black                             { background-color: #111827 !important; color: #fff !important; }
.bg-gray                              { background-color: var(--scs-panel-2) !important; color: var(--scs-ink) !important; }

/* Text colours read against the panel, not against a filled block, so they
   take the palette's own ink-safe values instead of the block colours above. */
.text-blue, .text-light-blue { color: var(--scs-accent) !important; }
.text-aqua, .text-info       { color: var(--scs-info)   !important; }
.text-green, .text-success   { color: var(--scs-ok)     !important; }
.text-yellow, .text-orange, .text-warning { color: var(--scs-warn) !important; }
.text-red, .text-danger, .text-maroon     { color: var(--scs-danger) !important; }
.text-purple { color: #7c3aed !important; }
.text-navy   { color: var(--scs-ink) !important; }
.text-muted  { color: var(--scs-ink-soft) !important; }
.text-white  { color: #fff !important; }
.text-black  { color: var(--scs-ink) !important; }

/* A filled block overrides the text utilities inside it — otherwise
   `bg-green text-white` and `bg-green` with a `text-red` child both end up
   unreadable on the fill. */
.bg-blue .text-white, .bg-green .text-white, .bg-red .text-white,
.bg-yellow .text-white, .bg-orange .text-white, .bg-aqua .text-white { color: #fff !important; }

/* ============================================================================
   HEADER APPEARANCE CONTROLS

   Brightness and colour, sitting immediately left of the user icon. Both are
   two clicks from anywhere in the application, which is the point — the
   Appearance page is where the choice is explained, this is where it is made.
   ========================================================================= */

.scs-hdr-tool > a {
  display: flex; align-items: center; justify-content: center;
  min-width: 42px;
}
.scs-hdr-tool > a > i { font-size: 15px; }

/* The swatch grid inside the colour dropdown. */
.scs-palette-menu { min-width: 0 !important; padding-bottom: 0; }
.scs-palette-menu > li.header {
  padding: 9px 12px 4px; font-size: 10.5px; letter-spacing: .09em;
  text-transform: uppercase; font-weight: 700; color: var(--scs-ink-faint);
}
.scs-swatches {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 6px 12px 12px;
}
.scs-swatch {
  width: 34px; height: 34px; border-radius: 9px; border: 0; padding: 0;
  cursor: pointer; position: relative;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .10);
}
/* The ring sits outside the swatch rather than inside it, so the colour being
   chosen is never partly covered by the mark that says it was chosen. */
.scs-swatch[aria-pressed="true"]::after {
  content: ""; position: absolute; inset: -4px;
  border: 2px solid var(--scs-accent); border-radius: 12px;
}
.scs-swatch:focus-visible { outline: 2px solid var(--scs-accent); outline-offset: 3px; }
.scs-palette-menu > li.footer > a {
  display: block; padding: 9px 12px; font-size: 12.5px; text-align: center;
  border-top: 1px solid var(--scs-line);
}

/* ============================================================================
   THE MODERN SKIN

   Applied through the classes the views already carry — .box, .btn-primary,
   .table, .small-box — so no .cshtml file has to change to receive it. That is
   deliberate: the moment a redesign starts editing views, it starts moving
   inputs, and a user who knew where a button was stops knowing.
   ========================================================================= */

/* Headings and figures on the display face. Restricted to headings and the
   dashboard's numbers: a serif is the right amount of weight for a title and
   the wrong amount for a form label repeated forty times down a page. */
h1, h2, h3, h4, .box-title, .small-box h3, .info-box-number, .description-header {
  font-family: var(--scs-font-display);
  font-weight: 600;
  letter-spacing: -.01em;
}

/* Figures line up in columns. Without tabular numerals the decimal points in a
   fee report wander, and a column of money becomes something to read rather
   than something to scan. */
.small-box h3, .info-box-number, .description-header,
table td.text-right, table th.text-right, .table .num {
  font-variant-numeric: tabular-nums;
}

/* The active menu item and the primary button carry the palette's gradient.
   Everything else stays flat — one lit surface reads as emphasis, six read as
   decoration. */
.sidebar-menu > li.active > a,
.sidebar-menu > li:hover > a {
  background: var(--scs-tint);
}
.sidebar-menu > li.active > a {
  background: var(--scs-sheen);
  color: #fff;
  box-shadow: var(--scs-glow);
}
.sidebar-menu > li.active > a > i { color: inherit; }

.btn-primary, .btn-primary:not(:disabled):not(.disabled) {
  background: var(--scs-sheen);
  border-color: transparent;
  box-shadow: var(--scs-glow);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--scs-sheen);
  filter: brightness(1.06);
  border-color: transparent;
}

/* A hairline of the palette down the left of each panel header. Enough to say
   the panels belong to the same product; not enough to compete with the data. */
.box > .box-header {
  border-bottom: 1px solid var(--scs-line);
}
.small-box, .info-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--scs-radius);
}
.small-box::before, .info-box::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--scs-sheen);
}

/* Sidebar icons. The views carry Font Awesome classes already; this only makes
   them consistent in size and alignment, which is most of what "sleek" means
   in a list of eighteen. */
.sidebar-menu > li > a > i:first-child,
.sidebar-menu .treeview-menu > li > a > i:first-child {
  width: 20px; text-align: center; font-size: 15px; opacity: .9;
}
.sidebar-menu > li.active > a > i:first-child { opacity: 1; }

/* ============================================================================
   BRINGING THE PAGES UP TO THE DESIGN

   Everything below works on the classes the views already carry — .box,
   .box-danger, .info-box, .box-header — so no .cshtml is edited and nothing a
   user knows how to use moves.

   Measured against the real dashboard rather than guessed at: it renders
   .info-box (not .small-box) for the three counters, .box-header.with-border
   for panel titles, and .box-danger / .box-info / .box-success / .box-warning
   for the panels themselves.
   ========================================================================= */

/* ── Panel colour: from a stripe on top to a hairline on the left ─────────── */
/*
   AdminLTE gives each panel a 3px coloured bar across the top, and views pick
   the colour from a fixed set. On a dashboard with six panels the result is six
   competing headlines and no hierarchy — red for a fee report says "danger" to
   the eye when it means nothing of the sort.

   The class stays honoured, so a view that wanted to distinguish two panels
   still does. It just says it quietly, down the left edge, at the weight of an
   accent rather than an alarm.
*/
.box.box-primary, .box.box-info, .box.box-success,
.box.box-warning, .box.box-danger, .box.box-default {
  border-top: 1px solid var(--scs-line);
  position: relative;
  overflow: hidden;
}
.box.box-primary::before, .box.box-info::before, .box.box-success::before,
.box.box-warning::before, .box.box-danger::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; z-index: 1;
}
/*
   Counted across every view: 281 panels are box-info, 135 box-warning, 60
   box-success, 44 box-primary, 34 box-danger. Those numbers are not a colour
   scheme, they are a copy-paste history — a fee entry form is box-info and a
   student list is box-warning for no reason either one could tell you.

   Honouring them as if they meant "information" and "warning" is what made the
   theme invisible: pick any work screen at random and its edge was blue or
   orange, never the colour the user chose. So they all take the theme now. The
   accent is the one colour on the page, which is the whole idea.

   Genuine state — a failed row, an overdue amount — is carried by the labels
   and badges inside the panel, where it belongs and where it is actually read.
*/
.box.box-primary::before, .box.box-info::before, .box.box-success::before,
.box.box-warning::before, .box.box-danger::before { background: var(--scs-sheen); }

/* ── Panel headings ──────────────────────────────────────────────────────── */
/*
   The heading is a <span> with an inline font-size, not an <h3>, so it cannot
   be reached by a heading selector. Styled here by position instead.

   The inline font-size on the span wins over any rule here, which is why the
   size is left alone and only the face, weight and colour are set — arguing
   with an inline style using !important would win the argument and lose the
   next person an hour.
*/
.box > .box-header.with-border {
  border-bottom: 1px solid var(--scs-line);
  padding: 12px 15px;
}
.box > .box-header > span:first-child,
.box > .box-header > .box-title {
  font-family: var(--scs-font-display);
  font-weight: 600;
  color: var(--scs-ink);
  letter-spacing: -.01em;
}
/* Panel titles are sometimes links to the report they summarise. They should
   read as a title, not as a line of underlined blue in the middle of a
   dashboard. */
.box > .box-header a,
.box > .box-header a:hover {
  color: var(--scs-ink);
  text-decoration: none;
}
.box > .box-header a:hover { color: var(--scs-accent); }

/* ── The counters along the top ──────────────────────────────────────────── */
/*
   .info-box-icon carries .bg-aqua / .bg-red / .bg-yellow — three saturated
   blocks side by side, each shouting a different colour for numbers that are
   simply counts. One accent, applied to all three, and the numbers get to be
   the thing that differs.
*/
.info-box {
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius);
  box-shadow: none;
  overflow: hidden;
  min-height: 78px;
}
.info-box .info-box-icon,
.info-box .info-box-icon.bg-aqua,
.info-box .info-box-icon.bg-red,
.info-box .info-box-icon.bg-yellow,
.info-box .info-box-icon.bg-green,
.info-box .info-box-icon.bg-blue,
.info-box .info-box-icon.bg-orange {
  background: var(--scs-sheen);
  color: #fff;
  width: 72px;
  border-radius: 0;
}
.info-box .info-box-content { padding: 10px 14px; }
.info-box .info-box-text {
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 700; color: var(--scs-ink-faint);
}
.info-box .info-box-number {
  font-family: var(--scs-font-display);
  font-size: 24px; font-weight: 600; letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
  color: var(--scs-ink);
}

/* ── Money badges ────────────────────────────────────────────────────────── */
/*
   Amounts inside the reports come through as .label / .badge in AdminLTE's
   colours — a bright red pill around "₹ 0.00" reads as an error rather than as
   a figure. Quietened to a chip, with the semantic colour kept for the text so
   a genuine warning still carries.
*/
.box .label, .box .badge {
  font-family: var(--scs-font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  padding: 2px 9px;
}
.box .label-danger,  .box .bg-red    { background: var(--scs-danger-soft) !important; color: var(--scs-danger) !important; }
.box .label-success, .box .bg-green  { background: var(--scs-ok-soft)     !important; color: var(--scs-ok)     !important; }
.box .label-warning, .box .bg-yellow { background: var(--scs-warn-soft)   !important; color: var(--scs-warn)   !important; }
.box .label-info,    .box .bg-aqua   { background: var(--scs-info-soft)   !important; color: var(--scs-info)   !important; }
.box .label-primary, .box .bg-blue   { background: var(--scs-accent-soft) !important; color: var(--scs-accent) !important; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.box table > thead > tr > th {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--scs-ink-faint);
  background: var(--scs-panel-2);
  border-bottom: 1px solid var(--scs-line);
}
.box table > tbody > tr:hover > td { background: var(--scs-tint); }
.box table td { font-variant-numeric: tabular-nums; }

/* ── The three coloured counter icons in the sidebar and elsewhere ───────── */
/*
   The menu marks each item's icon with .text-yellow / .text-aqua / .text-red.
   Eighteen items in four colours is confetti; the icon's job is to help someone
   find the row again, and shape does that better than hue. They keep their
   colour on hover and when active, where it is doing something.
*/
.sidebar-menu .treeview-menu > li > a > i.text-yellow,
.sidebar-menu .treeview-menu > li > a > i.text-aqua,
.sidebar-menu .treeview-menu > li > a > i.text-red,
.sidebar-menu .treeview-menu > li > a > i.text-green,
.sidebar-menu .treeview-menu > li > a > i.text-blue,
.sidebar-menu .treeview-menu > li > a > i.text-purple,
.sidebar-menu .treeview-menu > li > a > i.text-orange {
  color: inherit !important;
  opacity: .55;
}
.sidebar-menu .treeview-menu > li:hover > a > i,
.sidebar-menu .treeview-menu > li.active > a > i { opacity: 1; }

/* ============================================================================
   TYPE — the theme's faces win

   The layout writes the school's chosen font as an inline style on <body>:

       <body style="font-family:Comfortaa">

   An inline style outranks every stylesheet rule, so the only way past it is
   !important. That is normally a bad sign, and here it is a deliberate,
   documented exception rather than a habit: the setting still exists, still
   saves, and still drives the printed documents and the legacy skin — it just
   no longer decides the typography of a design that was drawn around a
   different pair of faces.

   Confined to .scs-modern so the old skin is untouched and the setting behaves
   exactly as it always did there.
   ========================================================================= */

body.scs-modern,
.scs-modern .content-wrapper,
.scs-modern .main-sidebar,
.scs-modern .main-header,
.scs-modern .box,
.scs-modern table,
.scs-modern .form-control,
.scs-modern .btn,
.scs-modern label,
.scs-modern input,
.scs-modern select,
.scs-modern textarea {
  font-family: var(--scs-font) !important;
}

/* Headings, panel titles and figures on the display face. */
.scs-modern h1, .scs-modern h2, .scs-modern h3, .scs-modern h4,
.scs-modern .box > .box-header > span:first-child,
.scs-modern .box > .box-header > .box-title,
.scs-modern .info-box-number,
.scs-modern .description-header {
  font-family: var(--scs-font-display) !important;
  font-weight: 600;
  letter-spacing: -.01em;
}

/* Printing keeps the school's font. A report that has gone out on letterhead
   in one face for years should not change because the screen did. */
@media print {
  .scs-modern body, .scs-modern .box, .scs-modern table { font-family: inherit !important; }
}

/* ============================================================================
   SIDEBAR — a light rail in light mode

   It was dark in both modes, which is AdminLTE's habit rather than a decision.
   In a light page a black column reads as a hole; the rail should be the
   quietest surface on screen, not the loudest.

   Only the surface changes. Every link, every role gate and every item's
   position is exactly where it was.
   ========================================================================= */

[data-mode="light"] .scs-modern .main-sidebar,
[data-mode="light"] .scs-modern .left-side,
:root:not([data-mode]) .scs-modern .main-sidebar {
  background: var(--scs-panel-2);
  border-right: 1px solid var(--scs-line);
}
[data-mode="light"] .scs-modern .sidebar-menu > li > a,
:root:not([data-mode]) .scs-modern .sidebar-menu > li > a {
  color: var(--scs-ink-soft);
}
[data-mode="light"] .scs-modern .sidebar-menu > li > a:hover {
  background: var(--scs-tint);
  color: var(--scs-ink);
}
[data-mode="light"] .scs-modern .sidebar-menu .treeview-menu {
  background: transparent;
}
[data-mode="light"] .scs-modern .sidebar-menu .treeview-menu > li > a {
  color: var(--scs-ink-soft);
}
[data-mode="light"] .scs-modern .sidebar-menu .treeview-menu > li > a:hover {
  color: var(--scs-accent);
  background: var(--scs-tint);
}
[data-mode="light"] .scs-modern .user-panel .info,
[data-mode="light"] .scs-modern .user-panel .info a { color: var(--scs-ink-soft); }

/* The active item keeps the gradient in both modes — it is the one lit surface
   and it should not lose that in the lighter of the two. */
.scs-modern .sidebar-menu > li.active > a,
.scs-modern .sidebar-menu > li.active > a:hover {
  background: var(--scs-sheen);
  color: #fff;
}

/* The school crest sits on the rail, so it needs the rail's background rather
   than the header's. */
[data-mode="light"] .scs-modern .main-header .logo {
  background: var(--scs-panel-2);
  border-right: 1px solid var(--scs-line);
}

/* Session line at the top of the rail: it was set to red or light-green inline
   to signal a locked session. The signal is worth keeping, the shade is not —
   inline colours cannot be reached, so this only fixes what surrounds it. */
[data-mode="light"] .scs-modern .sidebar-menu > li:first-child > a {
  border-bottom: 1px solid var(--scs-line);
}

/* ── Panel headings: the underline ───────────────────────────────────────── */
/*
   Six views carry style="...text-decoration:underline" on the .box-header
   itself. Underlined text inside a page full of links reads as a link, and
   these are not links — clicking a panel title does nothing, which is a small
   lie the interface tells several times per screen.

   Inline again, so !important again. Same reasoning as the font: the alternative
   is editing six views to remove a decoration, and every view edited is a view
   that can be got wrong.
*/
.scs-modern .box > .box-header[style] {
  text-decoration: none !important;
  background: transparent !important;
  text-align: left !important;
  color: var(--scs-ink) !important;
}
.scs-modern .box > .box-header > span:first-child {
  font-family: var(--scs-font-display);
  font-weight: 600;
}

/* ── btn-info is this application's primary button ───────────────────────── */
/*
   Not a judgement about the word "info": across these views btn-info is what
   Save, Go, Send and Search are marked with, while btn-primary barely appears.
   The palette's accent belongs on the button people are meant to press, so it
   follows the actual usage rather than the class name.

   Warning, danger and success keep their own colours — those carry meaning, and
   an accent that swallowed them would leave "Delete" looking like "Save".
*/
.scs-modern .btn-info,
.scs-modern .btn-info:not(:disabled):not(.disabled) {
  background: var(--scs-sheen);
  border-color: transparent;
  color: #fff;
}
.scs-modern .btn-info:hover,
.scs-modern .btn-info:focus {
  background: var(--scs-sheen);
  filter: brightness(1.07);
  border-color: transparent;
  color: #fff;
}

/* Collapse chevrons on panel headers: transparent buttons that only need to be
   findable, not seen. */
.scs-modern .box-tools > .btn { color: var(--scs-ink-faint); }
.scs-modern .box-tools > .btn:hover { color: var(--scs-accent); background: var(--scs-tint); }

/* ============================================================================
   LIGHT MODE — closing the gap with the design

   Everything below is spacing, radius and surface. No link moves, no control
   changes shape enough to be looked for in a new place, and nothing here exists
   in the legacy skin.
   ========================================================================= */

/* ── The rail ────────────────────────────────────────────────────────────── */
[data-mode="light"] .scs-modern .main-sidebar,
:root:not([data-mode]) .scs-modern .main-sidebar {
  background: var(--scs-panel);
  border-right: 1px solid var(--scs-line);
  padding: 8px 10px;
}

/* Items become spaced pills rather than a solid column of rows. The gap is
   what makes eighteen menu items readable as a list instead of a wall. */
[data-mode="light"] .scs-modern .sidebar-menu > li > a,
:root:not([data-mode]) .scs-modern .sidebar-menu > li > a {
  border-radius: 10px;
  padding: 9px 12px;
  margin: 1px 0;
  font-size: 14px;
  border-left: 0;
}
[data-mode="light"] .scs-modern .sidebar-menu > li.active > a,
:root:not([data-mode]) .scs-modern .sidebar-menu > li.active > a {
  border-radius: 10px;
  box-shadow: var(--scs-glow);
}
/* AdminLTE marks the active item with an inset bar on the left. With a filled
   pill behind it that reads as a seam down the middle of the fill. */
.scs-modern .sidebar-menu > li.active > a { box-shadow: var(--scs-glow) !important; }

[data-mode="light"] .scs-modern .sidebar-menu > li > a > i:first-child {
  font-size: 15px; width: 22px; opacity: .75;
}
[data-mode="light"] .scs-modern .sidebar-menu > li.active > a > i:first-child { opacity: 1; }

/* Submenus indent under their parent rather than filling the width. */
[data-mode="light"] .scs-modern .sidebar-menu .treeview-menu > li > a {
  border-radius: 8px; padding: 7px 10px 7px 34px; font-size: 13.3px; margin: 1px 0;
}

/* The crest block at the top of the rail. */
[data-mode="light"] .scs-modern .main-header .logo,
:root:not([data-mode]) .scs-modern .main-header .logo {
  background: var(--scs-panel);
  border-right: 1px solid var(--scs-line);
  border-bottom: 1px solid var(--scs-line);
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
[data-mode="light"] .scs-modern .main-header .navbar,
:root:not([data-mode]) .scs-modern .main-header .navbar {
  background: var(--scs-panel);
  border-bottom: 1px solid var(--scs-line);
}

/* The page title and its breadcrumb. AdminLTE puts these in the content area as
   .content-header; the design puts the title on the display face with the trail
   beneath it, quieter and smaller. */
.scs-modern .content-header > h1 {
  font-family: var(--scs-font-display);
  font-size: 21px; font-weight: 600; letter-spacing: -.015em;
  margin: 0 0 2px;
}
.scs-modern .content-header > h1 > small {
  display: block; font-size: 12.5px; color: var(--scs-ink-faint); margin: 0;
}
.scs-modern .content-header > .breadcrumb {
  position: static; float: none; background: transparent; padding: 0;
  margin: 0; font-size: 12.5px;
}
.scs-modern .content-header > .breadcrumb > li + li::before { color: var(--scs-ink-faint); }
.scs-modern .content-header > .breadcrumb a { color: var(--scs-ink-faint); }
.scs-modern .content-header { padding: 16px 18px 10px; }

/* ── Content surfaces ────────────────────────────────────────────────────── */
[data-mode="light"] .scs-modern .content-wrapper,
:root:not([data-mode]) .scs-modern .content-wrapper {
  background: var(--scs-bg);
}
.scs-modern .content { padding: 4px 18px 22px; }

.scs-modern .box {
  border-radius: var(--scs-radius);
  border: 1px solid var(--scs-line);
  box-shadow: var(--scs-shadow);
  margin-bottom: 16px;
}
.scs-modern .box > .box-body { padding: 15px 16px; }
.scs-modern .box > .box-header.with-border { padding: 13px 16px; }

/* ── Form controls ───────────────────────────────────────────────────────── */
/* Taller and rounder than Bootstrap's default, matching the design's fields.
   The height change is a couple of pixels — enough to breathe, not enough to
   reflow a form someone has learnt the shape of. */
.scs-modern .form-control,
.scs-modern select.form-control {
  border-radius: 8px;
  border-color: var(--scs-line);
  padding: 7px 11px;
  height: auto;
  min-height: 36px;
}
.scs-modern .form-control:focus {
  border-color: var(--scs-accent);
  box-shadow: var(--scs-ring);
}
.scs-modern label {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  font-weight: 700; color: var(--scs-ink-faint); margin-bottom: 5px;
}
/* Checkbox and radio labels are sentences, not field names — the uppercase
   treatment above would shout them. */
.scs-modern .checkbox label, .scs-modern .radio label,
.scs-modern label.checkbox-inline, .scs-modern label.radio-inline,
.scs-modern .custom-control label {
  font-size: 13.5px; letter-spacing: normal; text-transform: none;
  font-weight: 400; color: var(--scs-ink);
}

.scs-modern .btn { border-radius: 8px; font-weight: 600; }
.scs-modern .btn-sm, .scs-modern .btn-xs { border-radius: 7px; }

/* ============================================================================
   SIDEBAR ICONS — one line set, drawn from masks

   The .cshtml is untouched apart from a semantic marker class on the twenty-one
   top-level rows; every <i> keeps its original Font Awesome / glyphicon class,
   so with the modern theme switched off the sidebar renders exactly as before.

   Under .scs-modern the font glyph is hidden and the same box is painted from
   an SVG mask in currentColor — so the icon inherits the row's colour, its
   hover state and its active state without a second rule, and the whole column
   sits at one stroke weight instead of two icon fonts drawn a decade apart.
   ========================================================================= */

.scs-modern .sidebar-menu a > i {
  --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3C/svg%3E");
  width: 18px; height: 18px;
  flex: 0 0 18px;
  display: inline-block;
  vertical-align: -4px;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0;
  background-color: currentColor;
  -webkit-mask: var(--scs-mask) center / 18px 18px no-repeat;
          mask: var(--scs-mask) center / 18px 18px no-repeat;
}

/* Sub-rows sit a size down, which is most of the difference between a menu
   that reads as two levels and one that reads as a wall.

   Written out to the same depth as the older sizing rule further up this file,
   which is otherwise more specific and holds the width at 20px while this one
   sets the height — a 20x15 box that squashes every mask. */
.scs-modern .sidebar-menu .treeview-menu > li > a > i,
.scs-modern .sidebar-menu .treeview-menu a > i {
  width: 15px; height: 15px; flex: 0 0 15px;
  -webkit-mask-size: 15px 15px;
          mask-size: 15px 15px;
}

/* The expand caret points left when shut; the existing rule rotates it open. */
.scs-modern .sidebar-menu a > i.fa-angle-left {
  width: 14px; height: 14px; flex: 0 0 14px; opacity: .5;
  -webkit-mask-size: 14px 14px;
          mask-size: 14px 14px;
}

/* ── What each class draws ───────────────────────────────────────────────── */
.scs-modern .sidebar-menu a > i.fa-table { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18M3 15h18M9 3v18'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-circle-o { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-angle-left { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-angle-double-right { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 17 5-5-5-5M13 17l5-5-5-5'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-cubes { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.8 2.2a2 2 0 0 0-1.6 0L2.6 6.1a1 1 0 0 0 0 1.8l8.6 3.9a2 2 0 0 0 1.6 0l8.6-3.9a1 1 0 0 0 0-1.8z'/%3E%3Cpath d='m2.6 12.1 8.6 3.9a2 2 0 0 0 1.6 0l8.6-3.9'/%3E%3Cpath d='m2.6 16.1 8.6 3.9a2 2 0 0 0 1.6 0l8.6-3.9'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-plus { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-plus { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-list-alt { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-database { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v16a2 2 0 0 0 2 2h16'/%3E%3Cpath d='M7 16v-4M12 16V8M17 16v-6'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-rupee { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12M6 8h12M6 13h3M9 13c6.7 0 6.7-10 0-10M6 13l8.5 8'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-user { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-education { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 9 12 4 2 9l10 5z'/%3E%3Cpath d='M6 11.5V16c0 1.6 3 3 6 3s6-1.4 6-3v-4.5'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-map-o { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 4-6 3v13l6-3 6 3 6-3V4l-6 3z'/%3E%3Cpath d='M9 4v13M15 7v13'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-modal-window { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='8' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-retweet { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m17 2 4 4-4 4'/%3E%3Cpath d='M3 11v-1a4 4 0 0 1 4-4h14'/%3E%3Cpath d='m7 22-4-4 4-4'/%3E%3Cpath d='M21 13v1a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-comment { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22z'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-bullhorn { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 18-5v12L3 14z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-flag-checkered { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cpath d='M4 22v-7'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-files-o { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='13' height='13' rx='2'/%3E%3Cpath d='M4 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-comments { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z'/%3E%3Cpath d='M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-briefcase { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-leanpub { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-book { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-file-image-o { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-4.5-4.5L5 21'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-dashboard { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 14 4-4'/%3E%3Cpath d='M3.3 19a10 10 0 1 1 17.4 0'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-transfer { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 3 4 4-4 4M20 7H4M8 21l-4-4 4-4M4 17h16'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-tasks { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M12 11h4M12 16h4M8 11h.01M8 16h.01'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-camera { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.glyphicon-blackboard { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h20M3 3v11a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V3'/%3E%3Cpath d='m7 21 5-6 5 6'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-video-camera { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 13 5.2 3.5a.5.5 0 0 0 .8-.4V7.9a.5.5 0 0 0-.8-.4L16 10.5'/%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-life-ring { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='m4.9 4.9 4.2 4.2M14.8 14.8l4.3 4.3M14.8 9.2l4.3-4.3M4.9 19.1l4.2-4.2'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-cog { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M4.9 4.9 7 7M17 17l2.1 2.1M2 12h3M19 12h3M4.9 19.1 7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.fa-bus { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6v6M15 6v6M2 12h19.5'/%3E%3Cpath d='M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2s-.1-.8-.2-1.2l-1.4-5C20 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Cpath d='M9 18h5'/%3E%3Ccircle cx='16' cy='18' r='2'/%3E%3C/svg%3E"); }

/* ── The top-level rows, by what they actually are ───────────────────────── */
/* Same specificity as the block above, so source order decides — these come
   last and win. That is deliberate: three different sections had been given a
   rupee sign, and Library was one of them. */
.scs-modern .sidebar-menu a > i.scs-ic-dashboard { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-registration { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M19 8v6M22 11h-6'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-attendance { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3Cpath d='m9 15 2 2 4-4'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-messaging { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-student { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 9 12 4 2 9l10 5z'/%3E%3Cpath d='M6 11.5V16c0 1.6 3 3 6 3s6-1.4 6-3v-4.5'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-fees { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.4'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-expenses { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1.5L8 22l2-1.5L12 22l2-1.5L16 22l2-1.5L20 22V2l-2 1.5L16 2l-2 1.5L12 2l-2 1.5L8 2 6 3.5z'/%3E%3Cpath d='M8 8h8M8 12h6'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-upload { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 13v8'/%3E%3Cpath d='m8 17 4-4 4 4'/%3E%3Cpath d='M20 16.6A5 5 0 0 0 18 7h-1.3A8 8 0 1 0 4 15.3'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-library { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7v14'/%3E%3Cpath d='M3 18a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-payroll { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='M18.1 10.4A6 6 0 1 1 10.4 18.1'/%3E%3Cpath d='M8 7h1.6v4M11 11H7'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-stock { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7.5 4.3 9 5.1'/%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.7l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.7l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5M12 22V12'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-results { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.5 12.9 17 22l-5-3-5 3 1.5-9.1'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-gps { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-employee { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-users { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.7 9a1 1 0 0 1-.66 0C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.2-2.7a1.2 1.2 0 0 1 1.5 0C14.5 3.8 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-gallery { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-4.5-4.5L5 21'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-class { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h20M3 3v11a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V3'/%3E%3Cpath d='m7 21 5-6 5 6'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-transport { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6v6M15 6v6M2 12h19.5'/%3E%3Cpath d='M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2s-.1-.8-.2-1.2l-1.4-5C20 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Cpath d='M9 18h5'/%3E%3Ccircle cx='16' cy='18' r='2'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-school { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 22v-4a2 2 0 1 0-4 0v4'/%3E%3Cpath d='m18 10 3.4 1.7a1 1 0 0 1 .6.9V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7.4a1 1 0 0 1 .6-.9L6 10'/%3E%3Cpath d='M18 5v17M6 5v17'/%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Cpath d='M12 7v5'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-visitors { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 4h3a2 2 0 0 1 2 2v14M2 20h3M13 20h9M10 12v.01'/%3E%3Cpath d='M13 4.6v16.2a1 1 0 0 1-1.2 1L5 20V5.6a2 2 0 0 1 1.5-2l4-1A2 2 0 0 1 13 4.6'/%3E%3C/svg%3E"); }
.scs-modern .sidebar-menu a > i.scs-ic-support { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='m4.9 4.9 4.2 4.2M14.8 14.8l4.3 4.3M14.8 9.2l4.3-4.3M4.9 19.1l4.2-4.2'/%3E%3C/svg%3E"); }

/* Top-level icons carry the row; give them a touch more presence than the
   sub-rows and let the active row's accent through. */
.scs-modern .sidebar-menu > li > a > i.scs-ic {
  width: 19px; height: 19px; flex: 0 0 19px; opacity: .92;
  -webkit-mask-size: 19px 19px;
          mask-size: 19px 19px;
}
.scs-modern .sidebar-menu > li.active > a > i.scs-ic,
.scs-modern .sidebar-menu > li.menu-open > a > i.scs-ic { opacity: 1; }

/* Collapsed rail: the icon is the whole row, so it gets the space back. */
.scs-modern.sidebar-collapse .sidebar-menu > li > a > i.scs-ic {
  width: 21px; height: 21px; flex: 0 0 21px;
  -webkit-mask-size: 21px 21px;
          mask-size: 21px 21px;
}


/* ============================================================================
   COUNTER TILES — a panel with a hairline, not a slab of colour

   Overrides the block written earlier in this file. The markup is untouched:
   the views still emit <span class="info-box-icon bg-aqua"><i class="fa fa-user">
   and the colour class is simply not honoured any more, because four different
   saturated blocks for four counts was the loudest thing on the dashboard.
   ========================================================================= */

.scs-modern .info-box {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  min-height: 84px;
  padding: 0 18px 0 20px;
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius);
  box-shadow: none;
  overflow: hidden;
}

/* The gradient hairline is the only colour on the tile, and it is the theme's
   own — so all four read as one set and the numbers carry the difference. */
.scs-modern .info-box::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--scs-sheen);
}

/* The icon: a chip tinted from the accent rather than filled with it. The
   bg-* class the view supplies is deliberately overridden. */
.scs-modern .info-box > .info-box-icon,
.scs-modern .info-box > .info-box-icon.bg-aqua,
.scs-modern .info-box > .info-box-icon.bg-red,
.scs-modern .info-box > .info-box-icon.bg-green,
.scs-modern .info-box > .info-box-icon.bg-yellow,
.scs-modern .info-box > .info-box-icon.bg-blue,
.scs-modern .info-box > .info-box-icon.bg-orange,
.scs-modern .info-box > .info-box-icon.bg-purple {
  flex: 0 0 42px;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  float: none;
  margin: 0;
  border-radius: 13px;
  /* AdminLTE declares .bg-aqua and friends with !important, so overriding the
     colour needs it back — there is no selector specific enough otherwise. */
  background: var(--scs-tint) !important;
  color: var(--scs-accent) !important;
  font-size: 17px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px var(--scs-accent-ring);
}

/* Five drawings cover every tile in the views; the glyph is switched off only
   for those, so an icon added later still shows up as its font character. */
.scs-modern .info-box > .info-box-icon > i.fa-user,
.scs-modern .info-box > .info-box-icon > i.glyphicon-user,
.scs-modern .info-box > .info-box-icon > i.fa-users,
.scs-modern .info-box > .info-box-icon > i.fa-pencil-square-o,
.scs-modern .info-box > .info-box-icon > i.fa-calendar-check-o {
  width: 20px; height: 20px;
  font-size: 0;
  background-color: currentColor;
  -webkit-mask: var(--scs-mask) center / 20px 20px no-repeat;
          mask: var(--scs-mask) center / 20px 20px no-repeat;
}
.scs-modern .info-box > .info-box-icon > i.fa-user { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3C/svg%3E"); }
.scs-modern .info-box > .info-box-icon > i.glyphicon-user { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3C/svg%3E"); }
.scs-modern .info-box > .info-box-icon > i.fa-users { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E"); }
.scs-modern .info-box > .info-box-icon > i.fa-pencil-square-o { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5'/%3E%3Cpath d='M18.4 2.6a2 2 0 0 1 2.8 2.8L12 14.6l-4 1 1-4z'/%3E%3C/svg%3E"); }
.scs-modern .info-box > .info-box-icon > i.fa-calendar-check-o { --scs-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3Cpath d='m9 15 2 2 4-4'/%3E%3C/svg%3E"); }

/* The content sits in the flex row now, so AdminLTE's 90px gutter has to go. */
.scs-modern .info-box > .info-box-content {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.scs-modern .info-box .info-box-text {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--scs-ink-faint);
  margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scs-modern .info-box .info-box-number {
  display: block;
  font-family: var(--scs-font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--scs-ink);
}

/* "28 Jul, 2026" is a date in a slot sized for "1635"; let it step down rather
   than overflow the tile. */
.scs-modern .info-box .info-box-number { font-size: clamp(19px, 2.1vw, 28px); }

/* The progress strip AdminLTE puts under the number is empty on these tiles and
   was drawing a stray grey line across the bottom. */
.scs-modern .info-box .progress,
.scs-modern .info-box .progress-description:empty { display: none; }

/* Hover: the tiles are not links here, so this is feedback that the row is
   under the pointer and nothing more. */
.scs-modern .info-box:hover { border-color: var(--scs-accent-ring); }

/* ============================================================================
   EVERYTHING FROM THE ACCENT

   Up to here the theme coloured the accents and left the rest on a grey ramp
   and on Bootstrap's stock palette. Picking "Teal" changed a few buttons and a
   menu highlight; the window, the rails, the tables and most of the buttons
   looked the same whichever palette you chose. This block takes the rest.

   Two rules run through all of it:

     - the ground carries the colour, the paper does not. Window, rails, table
       headings and striped rows are tinted; the panel a ledger is read off
       stays near-white in light mode. Tinting what people read all day is
       where "themed" turns into "tiring".

     - the accent is the only hue on the page. Bootstrap's blue/green/orange
       set was never chosen here — btn-info marks Save on one screen and Search
       on the next — so those classes take accent tones that differ by weight
       instead of by hue.

   Red is the single exception and it is deliberate: on a Delete button the
   colour is the warning, and it is the last place to spend consistency.

   Nothing below needs a .cshtml touched. Every selector is a class the views
   already carry.
   ========================================================================= */

/* ── The window ──────────────────────────────────────────────────────────── */
/* AdminLTE paints .content-wrapper and .wrapper with its own flat grey and
   .skin-blue's own values, both of which sit on top of the body background. */
.scs-modern .wrapper,
.scs-modern .content-wrapper,
.scs-modern .right-side,
.scs-modern.skin-blue .wrapper,
.scs-modern.skin-blue .content-wrapper {
  background: var(--scs-bg);
  color: var(--scs-ink);
}

/* ── The rail, in light mode ─────────────────────────────────────────────── */
/*
   It was white, which made it read as an empty column rather than as part of
   the application. --scs-panel-2 is the accent-tinted surface, so the rail now
   says which palette is on without shouting it.
*/
[data-mode="light"] .scs-modern .main-sidebar,
[data-mode="light"] .scs-modern .main-header .logo,
:root:not([data-mode]) .scs-modern .main-sidebar,
:root:not([data-mode]) .scs-modern .main-header .logo {
  background: var(--scs-panel-2);
  border-right: 1px solid var(--scs-line);
}
[data-mode="light"] .scs-modern .sidebar-menu > li > a:hover,
[data-mode="light"] .scs-modern .sidebar-menu .treeview-menu > li > a:hover {
  background: color-mix(in oklab, var(--scs-accent) 14%, transparent);
  color: var(--scs-accent-ink);
}

/* The header bar sits above both and should belong to the same family. */
[data-mode="light"] .scs-modern .main-header .navbar,
:root:not([data-mode]) .scs-modern .main-header .navbar {
  background: var(--scs-panel);
  border-bottom: 1px solid var(--scs-line);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
/*
   Counted across the views: 456 btn-info, 349 btn-success, 233 btn-danger,
   138 btn-warning, 113 btn-primary. Those are not five meanings, they are five
   habits. They become four weights of one colour, so a screen reads as one
   application and the eye still separates the primary action from the rest.
*/

/* Primary — the action the screen exists for. Filled, gradient, only one of
   these should be on a screen at a time and usually is. */
.scs-modern .btn-info,
.scs-modern .btn-primary,
.scs-modern .btn-info:not(:disabled):not(.disabled),
.scs-modern .btn-primary:not(:disabled):not(.disabled) {
  background: var(--scs-sheen);
  border: 1px solid transparent;
  color: #fff;
  box-shadow: var(--scs-glow);
}
.scs-modern .btn-info:hover, .scs-modern .btn-info:focus,
.scs-modern .btn-primary:hover, .scs-modern .btn-primary:focus {
  background: var(--scs-accent-hover);
  color: #fff;
  box-shadow: var(--scs-glow);
}

/* Confirming — Save, Add, Update. Solid accent, no gradient, so it sits one
   step below the primary without changing hue. */
.scs-modern .btn-success,
.scs-modern .btn-success:not(:disabled):not(.disabled) {
  background: var(--scs-accent);
  border: 1px solid var(--scs-accent);
  color: #fff;
  box-shadow: none;
}
.scs-modern .btn-success:hover, .scs-modern .btn-success:focus {
  background: var(--scs-accent-hover);
  border-color: var(--scs-accent-hover);
  color: #fff;
}

/* Secondary — Edit, Export, Print. These were orange, which on a grid of forty
   rows was the loudest thing on the screen for the least important action.
   Tinted, with accent text: present, quiet, unmistakably the same family. */
.scs-modern .btn-warning,
.scs-modern .btn-warning:not(:disabled):not(.disabled),
.scs-modern .btn-default,
.scs-modern .btn-default:not(:disabled):not(.disabled) {
  background: color-mix(in oklab, var(--scs-accent) 13%, var(--scs-panel));
  border: 1px solid color-mix(in oklab, var(--scs-accent) 30%, transparent);
  color: var(--scs-accent-ink);
  box-shadow: none;
}
.scs-modern .btn-warning:hover, .scs-modern .btn-warning:focus,
.scs-modern .btn-default:hover, .scs-modern .btn-default:focus {
  background: color-mix(in oklab, var(--scs-accent) 22%, var(--scs-panel));
  border-color: var(--scs-accent);
  color: var(--scs-accent-ink);
}
[data-mode="dark"] .scs-modern .btn-warning,
[data-mode="dark"] .scs-modern .btn-default { color: var(--scs-accent); }

/* Destructive stays red. Everywhere else consistency is worth more than the
   hue; on the button that deletes a student's record it is not. */
.scs-modern .btn-danger,
.scs-modern .btn-danger:not(:disabled):not(.disabled) {
  background: var(--scs-danger);
  border: 1px solid var(--scs-danger);
  color: #fff;
  box-shadow: none;
}

/* Bootstrap's focus ring is its own blue; it has to follow the palette too or
   every keyboard user sees the old theme. */
.scs-modern .btn:focus, .scs-modern .btn:focus-visible,
.scs-modern .form-control:focus, .scs-modern .form-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--scs-accent-ring);
  border-color: var(--scs-accent);
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
/*
   The grid is where these users spend the day, so it gets the same treatment
   rather than being left on Bootstrap's greys.
*/
.scs-modern .table,
.scs-modern .table > thead > tr > th,
.scs-modern .table > tbody > tr > td {
  border-color: var(--scs-line-soft);
  color: var(--scs-ink);
}
.scs-modern .table > thead > tr > th {
  background: color-mix(in oklab, var(--scs-accent) 16%, var(--scs-panel));
  color: var(--scs-accent-ink);
  font-weight: 600;
  border-bottom: 1px solid var(--scs-line);
  white-space: nowrap;
}
[data-mode="dark"] .scs-modern .table > thead > tr > th { color: var(--scs-accent); }

/* Striped rows: faint, because their job is to help the eye track across a wide
   row, not to be noticed. */
.scs-modern .table-striped > tbody > tr:nth-of-type(odd) > td,
.scs-modern .table-striped > tbody > tr:nth-of-type(odd) {
  background: color-mix(in oklab, var(--scs-accent) 5%, transparent);
}
.scs-modern .table-hover > tbody > tr:hover > td,
.scs-modern .table-hover > tbody > tr:hover {
  background: color-mix(in oklab, var(--scs-accent) 11%, transparent);
}

/* jQuery DataTables ships its own chrome — search box, pager, "Showing 1 to 10"
   — none of which knows about the palette. */
.scs-modern .dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid var(--scs-line);
  background: var(--scs-panel);
  color: var(--scs-ink-soft) !important;
  border-radius: var(--scs-radius-sm);
}
.scs-modern .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.scs-modern .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--scs-sheen) !important;
  border-color: transparent;
  color: #fff !important;
}
.scs-modern .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--scs-tint) !important;
  border-color: var(--scs-accent);
  color: var(--scs-accent-ink) !important;
}
.scs-modern .dataTables_wrapper .dataTables_info,
.scs-modern .dataTables_wrapper .dataTables_length,
.scs-modern .dataTables_wrapper .dataTables_filter { color: var(--scs-ink-soft); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.scs-modern .form-control,
.scs-modern .form-select,
.scs-modern select.form-control,
.scs-modern textarea.form-control,
.scs-modern .input-group-addon {
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  color: var(--scs-ink);
  border-radius: var(--scs-radius-sm);
}
.scs-modern .form-control::placeholder { color: var(--scs-ink-faint); }
.scs-modern .input-group-addon {
  background: color-mix(in oklab, var(--scs-accent) 12%, var(--scs-panel));
  color: var(--scs-accent-ink);
}
.scs-modern label, .scs-modern .control-label { color: var(--scs-ink); }

/* The pickers these views use are third-party and each brings its own blue. */
.scs-modern .bootstrap-select .dropdown-toggle,
.scs-modern .select2-container .select2-selection {
  background: var(--scs-panel) !important;
  border: 1px solid var(--scs-line) !important;
  color: var(--scs-ink) !important;
  border-radius: var(--scs-radius-sm) !important;
}
.scs-modern .dropdown-menu {
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius);
  box-shadow: var(--scs-shadow);
}
.scs-modern .dropdown-menu > li > a,
.scs-modern .dropdown-menu .dropdown-item { color: var(--scs-ink); }
.scs-modern .dropdown-menu > li > a:hover,
.scs-modern .dropdown-menu .dropdown-item:hover,
.scs-modern .dropdown-menu > .active > a {
  background: var(--scs-tint);
  color: var(--scs-accent-ink);
}
[data-mode="dark"] .scs-modern .dropdown-menu > li > a:hover,
[data-mode="dark"] .scs-modern .dropdown-menu .dropdown-item:hover { color: var(--scs-accent); }

/* ── Tabs, pills, pagination ─────────────────────────────────────────────── */
.scs-modern .nav-tabs { border-bottom: 1px solid var(--scs-line); }
.scs-modern .nav-tabs > li > a,
.scs-modern .nav-tabs .nav-link { color: var(--scs-ink-soft); border: 0; }
.scs-modern .nav-tabs > li.active > a,
.scs-modern .nav-tabs .nav-link.active {
  color: var(--scs-accent-ink);
  background: transparent;
  border: 0;
  box-shadow: inset 0 -2px 0 var(--scs-accent);
}
[data-mode="dark"] .scs-modern .nav-tabs > li.active > a,
[data-mode="dark"] .scs-modern .nav-tabs .nav-link.active { color: var(--scs-accent); }

.scs-modern .pagination > li > a,
.scs-modern .pagination .page-link {
  color: var(--scs-ink-soft);
  background: var(--scs-panel);
  border-color: var(--scs-line);
}
.scs-modern .pagination > .active > a,
.scs-modern .pagination .page-item.active .page-link {
  background: var(--scs-sheen);
  border-color: transparent;
  color: #fff;
}

/* ── The stray flat fills ────────────────────────────────────────────────── */
/*
   .bg-aqua and .bg-blue are sprinkled through the views as decoration - a
   coloured strip behind a heading, a filled circle behind a count. They are
   declared !important by AdminLTE, so this has to be as well.
*/
.scs-modern .bg-aqua, .scs-modern .bg-blue,
.scs-modern .bg-light-blue, .scs-modern .bg-teal {
  background: var(--scs-sheen) !important;
  color: #fff !important;
}
.scs-modern .box.box-solid > .box-header {
  background: var(--scs-sheen);
  color: #fff;
  border: 0;
}
.scs-modern .box.box-solid > .box-header > span:first-child,
.scs-modern .box.box-solid > .box-header .box-title,
.scs-modern .box.box-solid > .box-header a { color: #fff; }

/* ── Modals and alerts ───────────────────────────────────────────────────── */
.scs-modern .modal-content {
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius-lg);
}
.scs-modern .modal-header, .scs-modern .modal-footer { border-color: var(--scs-line); }
.scs-modern .alert-info {
  background: color-mix(in oklab, var(--scs-accent) 12%, var(--scs-panel));
  border: 1px solid color-mix(in oklab, var(--scs-accent) 30%, transparent);
  color: var(--scs-accent-ink);
}
[data-mode="dark"] .scs-modern .alert-info { color: var(--scs-accent); }

/* ── Dark mode: filled buttons need dark ink ─────────────────────────────── */
/*
   Measured, not assumed. In dark mode the palettes use a light accent so it can
   carry on a dark ground — #B49BFF for Violet. A filled button in that colour
   with white text came out at 2.31:1, and the red Delete at 2.77:1. Both are
   below the 4.5:1 a body-sized label needs, and on the Delete button that is
   the one label nobody should have to squint at.

   Light mode is unaffected: there the accent is dark and white text on it is
   already well clear.
*/
.scs-modern .btn-info,
.scs-modern .btn-primary,
.scs-modern .btn-success,
.scs-modern .btn-info:hover,
.scs-modern .btn-primary:hover,
.scs-modern .btn-success:hover,
.scs-modern .pagination > .active > a,
.scs-modern .pagination .page-item.active .page-link,
.scs-modern .sidebar-menu > li.active > a,
.scs-modern .sidebar-menu > li.active > a:hover,
.scs-modern .box.box-solid > .box-header,
.scs-modern .box.box-solid > .box-header .box-title,
.scs-modern .box.box-solid > .box-header > span:first-child,
.scs-modern .box.box-solid > .box-header a,
.scs-modern .bg-aqua,
.scs-modern .bg-blue,
.scs-modern .bg-light-blue,
.scs-modern .bg-teal {
  color: var(--scs-on-accent) !important;
}
/* Delete keeps its red, and red is dark in light mode and light in dark mode,
   so its label follows the mode rather than the accent. */
[data-mode="dark"] .scs-modern .btn-danger,
[data-mode="dark"] .scs-modern .btn-danger:hover { color: #10141c !important; }

/* The icons inside those buttons are drawn in currentColor, so they follow. */
.scs-modern .btn-info > i,
.scs-modern .btn-primary > i,
.scs-modern .btn-success > i,
.scs-modern .btn-danger > i { color: inherit; }

/* ── <select> has to be taken off the native widget ──────────────────────── */
/*
   A <select> that still uses the operating system's control ignores the
   background and colour it is given and paints itself from the UA's own colour
   scheme — which is how the filter dropdowns stayed white boxes with dark text
   in the middle of a dark page, while getComputedStyle insisted they were dark.
   Turning the appearance off is what makes them honour the theme; once it is
   off the arrow has to be drawn back, which is the background-image below.
*/
.scs-modern select.form-control,
.scs-modern select.form-select,
.scs-modern select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-color: var(--scs-panel);
  color: var(--scs-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 15px 15px;
  padding-right: 30px;
}
/* The list that drops out of it is drawn by the OS and cannot be styled; giving
   it the right colour-scheme is the whole of the control we have over it. */
.scs-modern select option { background: var(--scs-panel); color: var(--scs-ink); }

/* Checkbox and radio ticks are drawn by the UA in its own accent colour. */
.scs-modern input[type="checkbox"],
.scs-modern input[type="radio"] { accent-color: var(--scs-accent); }

/* ── The session line at the top of the rail ─────────────────────────────── */
/*
   _MenuPartial writes it as an inline style — lightgreen when the session is
   open, red when it is locked. That was written for a dark rail. On the light
   rail lightgreen measures 1.04:1 against the background: the line is there,
   and nobody can read it.

   The signal is worth keeping and the shade is not, so the two inline values
   are matched by attribute and swapped for the theme's own success and danger
   colours, which are chosen per mode. Inline styles can only be beaten with
   !important; this is what that is for.
*/
.scs-modern .sidebar-menu a[style*="lightgreen"] { color: var(--scs-ok) !important; }
.scs-modern .sidebar-menu a[style*="color:red"]  { color: var(--scs-danger) !important; }
.scs-modern .sidebar-menu a[style*="lightgreen"],
.scs-modern .sidebar-menu a[style*="color:red"] { font-weight: 600; }

/* --scs-ok and --scs-danger are chosen to sit on a panel. The rail is tinted a
   good deal more than a panel, so on it they measured 3.67:1 — better than the
   1.04 they replaced, still short of the 4.5 a line of body text needs. These
   two are the same hues taken darker, for this one line, in light mode only. */
[data-mode="light"] .scs-modern .sidebar-menu a[style*="lightgreen"],
:root:not([data-mode]) .scs-modern .sidebar-menu a[style*="lightgreen"] { color: #0a5227 !important; }
[data-mode="light"] .scs-modern .sidebar-menu a[style*="color:red"],
:root:not([data-mode]) .scs-modern .sidebar-menu a[style*="color:red"] { color: #8c1111 !important; }

/* ============================================================================
   BOOTSTRAP 3 COLUMNS THAT NEVER GOT A ROW

   In Bootstrap 3 a .col-* was floated, so any element holding columns laid them
   out side by side whether it was a .row or not. Bootstrap 5 makes columns flex
   items and puts the layout on the parent — so wherever these views put
   something between the .row and its columns, the columns stopped flowing and
   stacked down the left edge with half the page empty beside them.

   /Student/Create is the clearest case: .row > .form-horizontal > .col-md-3,
   forty fields in a single 247px column.

   Swept across all 164 sidebar routes, the wrappers that actually do this are:

       form-horizontal   40      col-md-12    9      box-body   3
       form-group        27      col-md-7     6      content    2
       col-sm-6          18

   — so they are named here rather than matching every element with :has() and
   hoping. :has() is still needed to tell a .form-group that holds columns from
   the hundreds that hold a plain input, which must stay block.
   ========================================================================= */
.scs-modern .form-horizontal:has(> [class*="col-"]),
.scs-modern .form-group:has(> [class*="col-"]),
.scs-modern .box-body:has(> [class*="col-"]),
.scs-modern .content:has(> [class*="col-"]),
.scs-modern [class*="col-"]:has(> [class*="col-"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Anything in one of those wrappers that is NOT a column would otherwise become
   a flex item and try to share the line — a submit row, a hidden field's
   sibling, a stray <hr>. They take the full width, which is what they had when
   the columns were floated. */
.scs-modern .form-horizontal:has(> [class*="col-"]) > :not([class*="col-"]),
.scs-modern .form-group:has(> [class*="col-"]) > :not([class*="col-"]),
.scs-modern .box-body:has(> [class*="col-"]) > :not([class*="col-"]),
.scs-modern .content:has(> [class*="col-"]) > :not([class*="col-"]),
.scs-modern [class*="col-"]:has(> [class*="col-"]) > :not([class*="col-"]) {
  flex: 0 0 100%;
  max-width: 100%;
}

/* A label given a column class is a label, not a block: it should sit on its
   own line above the field the way the rest of the form does. */
.scs-modern .form-group:has(> [class*="col-"]) > label[class*="col-"] {
  align-self: center;
  margin-bottom: 0;
}

/* ============================================================================
   HEADER TOOL GROUP — pinned right, and steady

   Two faults, one cause each.

   Drifting to the middle: the header is a <table>, and the tools live in the
   third <td>. That cell measured 837px of a 1258px header, and the list inside
   it started at the cell's left edge — so the icons sat in the middle of the
   bar with 700px of empty cell to their right. `margin-left: auto` was already
   there and did nothing: the div is a block filling the cell, so there is no
   free space for auto margins to take. The list has to be told to pack right.

   The avatar jumping: it is a 34px image in a row of 15px glyphs. Sitting in
   the same 54px cell it is correctly centred and still reads as riding higher
   than its neighbours, because it is more than twice their size. Matching it to
   them settles the row.
   ========================================================================= */

/* Let the title cell take the slack so the tools cell shrinks onto its icons. */
.scs-modern .main-header-tbl td.page-title { width: 100%; }
.scs-modern .main-header-tbl td:last-child { width: 1%; white-space: nowrap; }

.scs-modern .navbar-custom-menu {
  display: flex;
  justify-content: flex-end;
}
.scs-modern .navbar-custom-menu > .nav.navbar-nav {
  margin-left: auto;
  justify-content: flex-end;
}

/* One size for everything in the group, so the row has a single optical line.
   _Layout writes style="width:34px;height:34px" on the avatar itself — three
   times, once per role — so this is one of the few places !important is the
   only thing that works. Scoped to the header button so the 62px portrait
   inside the dropdown is left alone. */
.scs-modern .navbar-custom-menu .user-menu > a > .user-image,
.scs-modern .navbar-custom-menu > .nav.navbar-nav > li > a > img {
  width: 26px !important; height: 26px !important;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 26px;
  /* The image is the only replaced element in the row; without this its
     baseline, not its box, decides where it sits. */
  vertical-align: middle;
  display: block;
}

/* Nothing in this group may change size or position on hover or when its
   dropdown opens — that is the movement being complained about, and a header
   control that shifts under the pointer is hard to hit. */
.scs-modern .navbar-custom-menu > .nav.navbar-nav > li > a,
.scs-modern .navbar-custom-menu > .nav.navbar-nav > li.open > a,
.scs-modern .navbar-custom-menu > .nav.navbar-nav > li > a:hover,
.scs-modern .navbar-custom-menu > .nav.navbar-nav > li > a:focus {
  height: var(--scs-header-h);
  align-items: center;
  transform: none;
  margin: 0;
  border: 0;
  transition: background var(--scs-speed) ease, color var(--scs-speed) ease;
}

/* The dropdown hangs off the right edge of its own button rather than running
   off the side of the window. */
.scs-modern .navbar-custom-menu > .nav.navbar-nav > li > .dropdown-menu {
  left: auto;
  right: 0;
}

/* ── Two boxes on /Student/CreateGroup that were painted for a light page ── */
/*
   The view carries "#recipient,#grouplist { background:#f7f7f7 }" in its own
   <style> block and "border:1px solid #eee" inline on #GroupDetail. Both were
   written when there was only a light theme; on the dark one the first is a
   white slab in the middle of the page and the second is invisible against the
   ground behind it.

   An id selector outranks any class, so these have to be matched by id too —
   and the inline border needs !important, because nothing else reaches it.
*/
.scs-modern #grouplist,
.scs-modern #recipient {
  background: var(--scs-panel);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius);
  color: var(--scs-ink);
}
/* The second box is a plain scroll pane, so it needs to read as a surface in
   its own right rather than as a rectangle drawn on the page behind it. */
.scs-modern #GroupDetail {
  background: var(--scs-panel-2) !important;
  border: 1px solid var(--scs-line) !important;
  border-radius: var(--scs-radius) !important;
  color: var(--scs-ink);
}

/* ── A .row placed straight inside a panel, with no .box-body ────────────── */
/*
   Bootstrap's .row carries margin-left/right of minus half a gutter, on the
   understanding that whatever contains it has padding to absorb that. .box-body
   does. Some views skip it and hang the .row directly off the .box — and then
   the row starts 12px outside the panel, where .box's overflow:hidden clips it.

   On /School/Details that took the first letter off every label: "SCHOOL NAME"
   rendered as "CHOOL NAME".

   Cancelling the negative margins is the fix; the columns keep their own 12px
   of gutter padding, and a little vertical padding gives the block the same
   breathing room a .box-body would have.
*/
.scs-modern .box > .row {
  margin-left: 0;
  margin-right: 0;
  padding: 14px 6px;
}
/* Same again for a column hung straight off the panel. */
.scs-modern .box > [class*="col-"] { padding-top: 14px; padding-bottom: 14px; }

/* ── "Change Image" ──────────────────────────────────────────────────────── */
/*
   Three of these on this page, each an absolutely-positioned <span> with
   inline "background: rgba(0,154,255,.65)" — a fixed blue that belongs to no
   palette, and a 20px strip at the foot of a 150px picture that you have to
   hit exactly.

   Stretching the span over the whole picture makes the picture the button,
   which is what anyone would try first. The label stays where it was: the
   background is a gradient with a hard stop, so it paints a solid bar across
   the bottom and nothing at all over the image itself.

   Inline styles, so !important is the only way in.
*/
.scs-modern #btnChangeLogo,
.scs-modern #btnChangeAppLogo,
.scs-modern #btnChangePrincipalSign {
  top: 0 !important;
  display: flex !important;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--scs-on-accent) !important;
  background: linear-gradient(to top,
                var(--scs-accent) 0,
                var(--scs-accent) 24px,
                transparent 24px) !important;
  transition: background var(--scs-speed) ease;
}
/* Hovering anywhere over the picture says the whole of it is the target. */
.scs-modern #btnChangeLogo:hover,
.scs-modern #btnChangeAppLogo:hover,
.scs-modern #btnChangePrincipalSign:hover {
  background: linear-gradient(to top,
                var(--scs-accent-hover) 0,
                var(--scs-accent-hover) 24px,
                color-mix(in oklab, var(--scs-accent) 22%, transparent) 24px) !important;
}

/* ============================================================================
   SWEETALERT2 — the dialogs the whole application talks through

   Loaded once in _Layout and called a thousand times across 175 views: every
   confirmation, every error, every "please wait" spinner. It ships its own CSS
   inside the .js and injects it into <head> at run time — after this file — so
   it was painting a white card with a stock blue OK button in the middle of a
   themed dark page.

   Injected last means source order cannot be won on equal specificity, so each
   rule here carries one class more than the one it is replacing. That is also
   why there is no !important: it is not needed, and it would take the page's
   own .swal2-popup tweaks (Fee/GenerateReceipt2 sets its padding) with it.

   The status icons keep their own colours. A red cross and a green tick are the
   message, not decoration.
   ========================================================================= */

.scs-modern .swal2-container { background: rgba(8, 11, 18, .55); }

.scs-modern .swal2-popup.swal2-modal {
  background: var(--scs-panel);
  color: var(--scs-ink);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius-lg);
  box-shadow: var(--scs-shadow-lg);
  font-family: var(--scs-font);
}
.scs-modern .swal2-popup .swal2-title {
  color: var(--scs-ink);
  font-family: var(--scs-font-display);
  font-weight: 600;
  letter-spacing: -.01em;
}
.scs-modern .swal2-popup .swal2-content,
.scs-modern .swal2-popup .swal2-footer { color: var(--scs-ink-soft); }
.scs-modern .swal2-popup .swal2-footer { border-top-color: var(--scs-line); }
.scs-modern .swal2-popup .swal2-close { color: var(--scs-ink-faint); }
.scs-modern .swal2-popup .swal2-close:hover { color: var(--scs-accent); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
/* Confirm was #3085d6, a blue belonging to no palette here. */
.scs-modern .swal2-popup .swal2-styled.swal2-confirm {
  background: var(--scs-sheen);
  color: var(--scs-on-accent);
  border: 0;
  border-radius: var(--scs-radius-sm);
  box-shadow: var(--scs-glow);
}
.scs-modern .swal2-popup .swal2-styled.swal2-confirm:hover {
  background: var(--scs-accent-hover);
  color: var(--scs-on-accent);
}
/* Cancel was a flat grey. It is the way out of a dialog, not a second action,
   so it reads as the quiet member of the same family. */
.scs-modern .swal2-popup .swal2-styled.swal2-cancel {
  background: color-mix(in oklab, var(--scs-accent) 13%, var(--scs-panel));
  color: var(--scs-accent-ink);
  border: 1px solid color-mix(in oklab, var(--scs-accent) 30%, transparent);
  border-radius: var(--scs-radius-sm);
}
[data-mode="dark"] .scs-modern .swal2-popup .swal2-styled.swal2-cancel { color: var(--scs-accent); }
.scs-modern .swal2-popup .swal2-styled.swal2-cancel:hover {
  background: color-mix(in oklab, var(--scs-accent) 22%, var(--scs-panel));
  border-color: var(--scs-accent);
}
.scs-modern .swal2-popup .swal2-styled:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--scs-accent-ring);
}

/* ── "Please wait" ───────────────────────────────────────────────────────── */
/*
   swal.showLoading() in this version turns the confirm button into a spinning
   ring: the button keeps its background and grows a rotating border. On the
   stock blue that read as a spinner; on the accent gradient the border was
   invisible, so the dialog looked frozen. Flat accent plus a contrasting ring
   while it spins.
*/
.scs-modern .swal2-popup.swal2-loading .swal2-styled.swal2-confirm {
  background: transparent;
  box-shadow: none;
  border-color: var(--scs-accent) transparent var(--scs-accent) transparent;
  border-width: 3px;
  border-style: solid;
}
.scs-modern .swal2-popup.swal2-loading .swal2-actions { gap: 0; }

/* ── Inputs inside a dialog ──────────────────────────────────────────────── */
.scs-modern .swal2-popup .swal2-input,
.scs-modern .swal2-popup .swal2-file,
.scs-modern .swal2-popup .swal2-textarea,
.scs-modern .swal2-popup .swal2-select {
  background: var(--scs-panel-2);
  color: var(--scs-ink);
  border: 1px solid var(--scs-line);
  border-radius: var(--scs-radius-sm);
  box-shadow: none;
}
.scs-modern .swal2-popup .swal2-input:focus,
.scs-modern .swal2-popup .swal2-textarea:focus,
.scs-modern .swal2-popup .swal2-select:focus {
  border-color: var(--scs-accent);
  box-shadow: 0 0 0 3px var(--scs-accent-ring);
}
.scs-modern .swal2-popup .swal2-validationerror {
  background: var(--scs-danger-soft);
  color: var(--scs-danger);
}

/* ── Buttons the views put inside a dialog's body ────────────────────────── */
/*
   The month grid on Fee/GenerateReceipt2 is .btn-default inside the popup, and
   a month already paid is disabled. Disabled has to stay legible — it is the
   difference between "paid" and "broken".
*/
.scs-modern .swal2-popup .btn:disabled,
.scs-modern .swal2-popup .btn.disabled {
  opacity: 1;
  background: var(--scs-panel-2);
  border-color: var(--scs-line);
  color: var(--scs-ink-faint);
}

/* ============================================================================
   PAGE-LEVEL COLOURS THAT THE THEME SHOULD BE SAYING INSTEAD

   Counted across all 581 views: 1520 hard-coded colour declarations, 654 of
   them in style="" attributes. They were written when there was one theme and a
   white page, and on a dark ground they are the last things that still look
   like a different application — a #dfdfdf panel, a #bbb hairline, a plain
   "red" that goes muddy.

   Three rules about what is left alone:

     1. Everything here is inside @media screen. Receipts, ID cards and admit
        cards are printed on white paper, and print must see exactly what it
        always saw. This is a guarantee, not a hope.

     2. Black borders are not touched at all. 72 of the 126 are in the receipt
        partials (Fee/_GetTemp*Receipt, _Temp*OBReceipt) and the admit cards,
        where a black rule on white paper is the whole design.

     3. Colours standing for a value are not touched: the fee grid's column
        bands, group tags, vehicle colours. Those carry meaning that no theme
        can supply.

   Views rendered with Layout = "" — ShowICard, Subscription/Inactive — never
   get .scs-modern on <body>, so none of this reaches them either.
   ========================================================================= */

@media screen {

  /* ── Status text ─────────────────────────────────────────────────────────
     "red" is 217 of these on its own: required-field asterisks and validation
     lines. The meaning stays; the shade becomes one that is legible on both
     grounds, which plain red is not on a dark one. */
  .scs-modern [style*="color:red" i],
  .scs-modern [style*="color: red" i],
  .scs-modern [style*="color:#dd4b39" i],
  .scs-modern [style*="color: #dd4b39" i]   { color: var(--scs-danger) !important; }

  .scs-modern [style*="color:green" i],
  .scs-modern [style*="color: green" i],
  .scs-modern [style*="color:#00a65a" i],
  .scs-modern [style*="color: #00a65a" i]   { color: var(--scs-ok) !important; }

  .scs-modern [style*="color:blue" i],
  .scs-modern [style*="color: blue" i],
  .scs-modern [style*="color:#0073b7" i],
  .scs-modern [style*="color: #0073b7" i]   { color: var(--scs-info) !important; }

  .scs-modern [style*="color:#ff851b" i],
  .scs-modern [style*="color: #ff851b" i]   { color: var(--scs-warn) !important; }

  /* ── Plain text ──────────────────────────────────────────────────────────
     Black on a dark panel is the one that actually disappears. */
  .scs-modern [style*="color:black" i],
  .scs-modern [style*="color: black" i],
  .scs-modern [style*="color:#000" i],
  .scs-modern [style*="color: #000" i]      { color: var(--scs-ink) !important; }

  .scs-modern [style*="color:#808080" i],
  .scs-modern [style*="color:#8d8d8d" i],
  .scs-modern [style*="color:#444" i],
  .scs-modern [style*="color:gray" i],
  .scs-modern [style*="color:grey" i]       { color: var(--scs-ink-soft) !important; }

  /* ── Surfaces ────────────────────────────────────────────────────────────
     Every one of these is a panel drawn by hand in a light grey. */
  .scs-modern [style*="background-color:#dfdfdf" i],
  .scs-modern [style*="background-color: #dfdfdf" i],
  .scs-modern [style*="background-color:#d8d8d8" i],
  .scs-modern [style*="background-color:#e8e8e8" i],
  .scs-modern [style*="background-color:#f6f6f6" i],
  .scs-modern [style*="background-color:#ede7e7" i],
  .scs-modern [style*="background-color:#eee" i],
  .scs-modern [style*="background-color:#efefef" i],
  .scs-modern [style*="background:#eee" i],
  .scs-modern [style*="background:#efefef" i],
  .scs-modern [style*="background:#f7f7f7" i],
  .scs-modern [style*="background:#fff" i],
  .scs-modern [style*="background: #fff" i],
  .scs-modern [style*="background:white" i],
  .scs-modern [style*="background: white" i],
  .scs-modern [style*="background-color:white" i],
  .scs-modern [style*="background-color: white" i],
  .scs-modern [style*="background-color:whitesmoke" i] {
    background-color: var(--scs-panel-2) !important;
    background-image: none !important;
  }

  /* ── Hairlines ───────────────────────────────────────────────────────────
     Same width, same position, a colour that belongs to the page. */
  .scs-modern [style*="solid #bbb" i],
  .scs-modern [style*="solid #b6b6b6" i],
  .scs-modern [style*="solid #ccc" i],
  .scs-modern [style*="solid #ddd" i],
  .scs-modern [style*="solid #eee" i],
  .scs-modern [style*="solid #a7a7a7" i],
  .scs-modern [style*="border-color:#bebebe" i],
  .scs-modern [style*="border-color: #bebebe" i] {
    border-color: var(--scs-line) !important;
  }
}

/* ============================================================================
   THE FEE GRID — same four colours, taken down to a whisper

   GenerateReceipt2 bands its columns with #ffe5aa, #c8ffb1, #fcc and #cbf1ff,
   and the totals row with a solid #ffc644. Those are pastels chosen for a white
   page, where a pale wash behind black digits is exactly right. Put the same
   five on a dark ground and they become saturated mid-tones — a wall of amber,
   green, pink and blue with pale figures on top. That is what was stabbing.

   The hues stay. Amber is Total, green is Paid, pink is Due, blue is Cumulative
   — anyone who uses this screen daily reads it by those colours and taking them
   away would cost more than it gained. What changes is how much of each is
   used: every band is now that same colour mixed into the panel, so it lands as
   a tint of the page rather than a block laid on top of it.

   One mix percentage drives all five, and dark mode uses roughly half of what
   light mode does. A dark ground shows colour far sooner than a white one — the
   percentage that reads as "a hint" on paper reads as "painted" on charcoal.

   Kept out of print: on paper the original pastels are correct, and they still
   print exactly as they always did.
   ========================================================================= */

@media screen {

  .scs-modern #report {
    /* The same four meanings, in versions that survive being diluted. The
       originals are too pale to mix — #fcc at 20% is indistinguishable from the
       panel — so each is the same hue at full strength. */
    --fee-tot:  #E8A33D;   /* amber  — Total       */
    --fee-paid: #46A758;   /* green  — Paid        */
    --fee-due:  #D9646A;   /* pink   — Due         */
    --fee-cumm: #4C9DC7;   /* blue   — Cumulative  */

    --fee-mix:     22%;    /* the bands            */
    --fee-mix-sum: 34%;    /* the totals row       */
  }
  [data-mode="dark"] .scs-modern #report {
    --fee-mix:     13%;
    --fee-mix-sum: 20%;
  }

  .scs-modern #report td.col-tot {
    background-color: color-mix(in oklab, var(--fee-tot) var(--fee-mix), var(--scs-panel)) !important;
  }
  .scs-modern #report td.col-paid {
    background-color: color-mix(in oklab, var(--fee-paid) var(--fee-mix), var(--scs-panel)) !important;
  }
  .scs-modern #report td.col-due {
    background-color: color-mix(in oklab, var(--fee-due) var(--fee-mix), var(--scs-panel)) !important;
  }
  .scs-modern #report td.col-cumm {
    background-color: color-mix(in oklab, var(--fee-cumm) var(--fee-mix), var(--scs-panel)) !important;
  }

  /* The figures were the real casualty — pale text on a mid-tone band. They go
     back to the page's own ink, which is near-black on light and near-white on
     dark, so the number is legible and the band stays in the background where
     it belongs. */
  .scs-modern #report td.col-tot,
  .scs-modern #report td.col-paid,
  .scs-modern #report td.col-due,
  .scs-modern #report td.col-cumm { color: var(--scs-ink); }

  /* The totals row was a solid amber slab across the full width. Same amber,
     one step stronger than the bands, with a rule above it doing the work the
     saturation used to do. */
  .scs-modern #report tr.total-row > td,
  .scs-modern #report .total-row td {
    background-color: color-mix(in oklab, var(--fee-tot) var(--fee-mix-sum), var(--scs-panel)) !important;
    color: var(--scs-ink);
    font-weight: 700;
    border-top: 2px solid color-mix(in oklab, var(--fee-tot) 60%, var(--scs-panel)) !important;
  }
  /* Within that row the Paid and Due cells keep their own hue, or the summary
     loses the one distinction the rest of the table is built on. */
  .scs-modern #report tr.total-row > td.col-paid,
  .scs-modern #report .total-row td.col-paid {
    background-color: color-mix(in oklab, var(--fee-paid) var(--fee-mix-sum), var(--scs-panel)) !important;
  }
  .scs-modern #report tr.total-row > td.col-due,
  .scs-modern #report .total-row td.col-due {
    background-color: color-mix(in oklab, var(--fee-due) var(--fee-mix-sum), var(--scs-panel)) !important;
  }
  .scs-modern #report tr.total-row > td.col-cumm,
  .scs-modern #report .total-row td.col-cumm {
    background-color: color-mix(in oklab, var(--fee-cumm) var(--fee-mix-sum), var(--scs-panel)) !important;
  }

  /* #9a7a7a is a brown hairline from the same era as the pastels; a grid this
     dense is calmer with the lighter of the theme's two rules. */
  .scs-modern #report table,
  .scs-modern #report .table-bordered > thead > tr > th,
  .scs-modern #report .table-bordered > tbody > tr > th,
  .scs-modern #report .table-bordered > tfoot > tr > th,
  .scs-modern #report .table-bordered > thead > tr > td,
  .scs-modern #report .table-bordered > tbody > tr > td,
  .scs-modern #report .table-bordered > tfoot > tr > td {
    border-color: var(--scs-line-soft) !important;
  }

  /* Twenty rows of figures across twenty-odd columns: picking out the row under
     the pointer costs nothing and saves the eye tracking across by itself. */
  .scs-modern #report tbody tr:hover > td {
    box-shadow: inset 0 0 0 999px color-mix(in oklab, var(--scs-accent) 7%, transparent);
  }

  /* Columns of money only line up if the digits are the same width. */
  .scs-modern #report td, .scs-modern #report th { font-variant-numeric: tabular-nums; }
}
