/*
 * Modern UI for RMS2015 - second trial (2026-09-20), in the design language of
 * the login page (login.php lx-* tokens, light "rcheva" set): system font, navy
 * ink, soft blue-white page, white cards with large radii and hairline strokes,
 * the original red top bar, navy icon rail, red gradient for "you are here",
 * blue gradient for primary actions.
 *   - shape / type / motion rules apply to both themes
 *   - colour rules are scoped to html[data-theme="light"]; the dark theme keeps
 *     its own colours (css-theme-dark.css)
 *   - motion only answers the pointer / focus; nothing loops
 *   - the login pages do not load this file
 * Loaded by sys_css.php right after css-theme-dark.css; to undo everything,
 * remove that one <link> line. Wrapped in @media screen: print is unchanged.
 */
@media screen {

  html {
    --ux-r-lg: 8px;    /* all radii halved 2026-09-20 (were 16 / 12 / 10, tile + alerts 14, labels pill) */
    --ux-r-md: 6px;
    --ux-r-sm: 5px;
  }
  html[data-theme="light"] {
    --ux-ink:     #0f1b3d;
    --ux-ink2:    rgba(15, 27, 61, 0.62);
    --ux-bg1:     #f6f9ff;
    --ux-bg2:     #e6eeff;
    --ux-card:    #ffffff;
    --ux-tint:    #eef3ff;
    --ux-stroke:  rgba(15, 27, 61, 0.10);
    --ux-stroke2: rgba(15, 27, 61, 0.18);
    --ux-shadow:  0 6px 20px rgba(15, 27, 61, 0.06);
    --ux-shadow2: 0 12px 28px rgba(15, 27, 61, 0.12);
    --ux-header:  #9c0909;   /* original skin red */
    --ux-a1:      #2563eb;
    --ux-a1d:     #1d4ed8;
    --ux-red1:    #ff4d6d;
    --ux-red2:    #c0122f;
  }

  /* ================= type =================
     No font-family here on purpose: the typeface is the system setting
     $config_value[168] (loaded and applied by sys_css.php / css-rcheva.php),
     so changing that setting changes the whole site. */
  body:not(.login-page) {
    -webkit-font-smoothing: antialiased;
  }

  /* ================= page ================= */
  /* page background: left to the original skin (#ecf0f5 + bg-rcheva.png artwork) */
  html[data-theme="light"] body:not(.login-page) {
    color: var(--ux-ink);
  }
  .content-header { padding: 22px 22px 0; }
  .content { padding-left: 22px; padding-right: 22px; }
  .content-header > h1 { font-weight: 600; letter-spacing: -0.2px; }
  html[data-theme="light"] .content-header > h1,
  html[data-theme="light"] .box-title { color: var(--ux-ink); }
  html[data-theme="light"] .content-header > h1 > small { color: var(--ux-ink2); }

  /* ================= top bar ================= */
  .main-header { box-shadow: 0 4px 18px rgba(8, 14, 40, 0.22); }
  /* top bar keeps the original skin red (user request 2026-09-20) */
  html[data-theme="light"] .main-header {
    background: var(--ux-header);
  }
  /* the bar colour sits on the navbar and logo themselves (as in the skin), not only on
     .main-header: on narrow screens the icon row is taller than the header box */
  html[data-theme="light"] .main-header .navbar,
  html[data-theme="light"] .main-header .logo,
  html[data-theme="light"] .main-header .logo:hover {
    background-color: var(--ux-header);
  }
  /* stacked header on small screens (menu button row + icon row): the skin caps it at
     max-height 90px while the two rows need ~102px, so the icons hung below the bar */
  @media (max-width: 767px) {
    .main-header { max-height: none; }
  }
  html[data-theme="light"] .main-header li.user-header { background-color: var(--ux-header); }
  .main-header .navbar .nav > li > a,
  .main-header .navbar .sidebar-toggle {
    transition: background-color 0.15s ease;
  }
  .main-header .navbar .nav > li > a:hover,
  .main-header .navbar .sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.10) !important;
    color: #fff !important;
  }
  .dropdown-menu {
    border-radius: var(--ux-r-md);
    border-color: rgba(15, 27, 61, 0.08);
    box-shadow: 0 14px 34px rgba(15, 27, 61, 0.18);
    overflow: hidden;
  }

  /* ================= left icon rail ================= */
  html[data-theme="light"] .wrapper,
  html[data-theme="light"] .main-sidebar,
  html[data-theme="light"] .left-side,
  html[data-theme="light"] .sidebar-menu > li.header {
    background-color: #314c58;   /* original skin grey (css-skin-rcheva.css) */
  }
  .sidebar-menu > li > a { transition: background-color 0.15s ease, border-color 0.15s ease; }
  html[data-theme="light"] .sidebar-menu > li:hover > a,
  html[data-theme="light"] .sidebar-menu > li.active > a {
    /* dark slate teal (deep shade of the rail #314c58), dark to lighter, like the current module (2026-09-29, user; was the red gradient) */
    background-color: #1c2d34;
    background-image: linear-gradient(90deg, #1c2d34, #2c4550);
    border-left-color: transparent;   /* no pink stripe on the left (2026-09-29, user) */
    color: #fff;
  }
  /* the label that flies out of the collapsed rail takes background-color: inherit from the
     link - a gradient alone left it transparent (white text on the white page).
     Collapsed rail: the 50px link stays plain #1c2d34 and the label carries the dark-to-lighter
     gradient from that same colour, so link + label read as one smooth bar (2026-09-29, user) */
  html[data-theme="light"] .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a {
    background-image: none;
    background-color: #1c2d34;
  }
  html[data-theme="light"] .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right) {
    background-color: #1c2d34 !important;
    background-image: linear-gradient(90deg, #1c2d34, #2c4550) !important;
    color: #fff !important;
    font-weight: 500;
  }
  html[data-theme="light"] .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
    background-color: #2c3b41 !important;
  }
  /* the current module is marked by an inline background-color:black on the <li> */
  html[data-theme="light"] .sidebar-menu > li[style*="black"] {
    background: linear-gradient(90deg, #1c2d34, #2c4550) !important;   /* dark slate teal (2026-09-29, user; was red, grey, black, module colour) */
  }
  html[data-theme="light"] .sidebar-menu > li > .treeview-menu { background: #2c3b41; }
  .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
  .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
    border-radius: 0 var(--ux-r-md) var(--ux-r-md) 0;
    box-shadow: 8px 8px 22px rgba(8, 14, 40, 0.28);
  }

  /* ================= cards ================= */
  .box,
  .menu-box,
  .info-box,
  .small-box,
  .panel,
  html[data-theme] .box,
  html[data-theme] .menu-box,
  html[data-theme] .info-box,
  html[data-theme] .small-box,
  html[data-theme] .panel {
    border-radius: var(--ux-r-lg);
  }
  html[data-theme="light"] .box,
  html[data-theme="light"] .menu-box,
  html[data-theme="light"] .info-box,
  html[data-theme="light"] .panel {
    background: var(--ux-card);
    border: 1px solid var(--ux-stroke);
    box-shadow: var(--ux-shadow);
  }
  html[data-theme="light"] .box-header.with-border,
  html[data-theme="light"] .box-footer { border-color: var(--ux-stroke); }
  .box-header { padding: 14px 18px; }
  .box-header .box-title { font-weight: 600; }
  .box-body:not(.no-padding) { padding: 14px 18px; }
  .box-footer { border-radius: 0 0 var(--ux-r-lg) var(--ux-r-lg); }

  /* collapse button of every .box (2026-09-21): the minus.png picture becomes the
     chevron button of the home widgets (.wg-fold in css-ui-widget.css).
     Markup is untouched - <button data-widget="collapse"><img src="minus.png"> -
     and the skin script (java-app.min.js) still does the folding: it puts
     fa-minus / fa-plus on the <img> at the click and .collapsed-box on the box
     when the slide ends, so both are read here and the chevron turns at once. */
  html {
    --ux-m-chev: 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.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  }
  html[data-theme="light"] { --ux-fold-ink: rgba(15, 27, 61, 0.42);    --ux-fold-bg: rgba(15, 27, 61, 0.08); }
  html[data-theme="dark"]  { --ux-fold-ink: rgba(230, 230, 230, 0.45); --ux-fold-bg: rgba(255, 255, 255, 0.10); }

  .box                                { --ux-fold-acc: #2563eb; }
  .box.box-success                    { --ux-fold-acc: #16a34a; }
  .box.box-warning, .box.box-orange   { --ux-fold-acc: #d97706; }
  .box.box-danger, .box.box-red       { --ux-fold-acc: #dc2626; }
  .box.box-info                       { --ux-fold-acc: #0d9488; }
  .box.box-pink                       { --ux-fold-acc: #db2777; }
  html[data-theme="dark"] .box                              { --ux-fold-acc: #60a5fa; }
  html[data-theme="dark"] .box.box-success                  { --ux-fold-acc: #4ade80; }
  html[data-theme="dark"] .box.box-warning,
  html[data-theme="dark"] .box.box-orange                   { --ux-fold-acc: #fbbf24; }
  html[data-theme="dark"] .box.box-danger,
  html[data-theme="dark"] .box.box-red                      { --ux-fold-acc: #f87171; }
  html[data-theme="dark"] .box.box-info                     { --ux-fold-acc: #2dd4bf; }
  html[data-theme="dark"] .box.box-pink                     { --ux-fold-acc: #f472b6; }

  .btn-box-tool[data-widget="collapse"] {
    width: 28px; height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--ux-r-md);
    background: transparent;
    position: relative;
    vertical-align: middle;
  }
  .btn-box-tool[data-widget="collapse"] > img { display: none; }
  .btn-box-tool[data-widget="collapse"]::after {
    content: "";
    position: absolute; left: 4px; top: 4px;
    width: 18px; height: 18px;
    background-color: var(--ux-fold-ink);
    -webkit-mask-image: var(--ux-m-chev); mask-image: var(--ux-m-chev);
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center;  mask-position: center;
    -webkit-mask-size: contain;     mask-size: contain;
    transition: transform 0.25s ease, background-color 0.2s ease;
  }
  .btn-box-tool[data-widget="collapse"]:hover,
  .btn-box-tool[data-widget="collapse"]:focus-visible { background: var(--ux-fold-bg); }
  .btn-box-tool[data-widget="collapse"]:hover::after,
  .btn-box-tool[data-widget="collapse"]:focus-visible::after { background-color: var(--ux-fold-acc); }
  .btn-box-tool[data-widget="collapse"]:focus-visible { outline: 2px solid var(--ux-fold-acc); outline-offset: 1px; }

  /* folded: chevron points right, like .wg-card.is-folded */
  .box.collapsed-box > .box-header .btn-box-tool[data-widget="collapse"]::after,
  .btn-box-tool[data-widget="collapse"]:has(> .fa-plus)::after { transform: rotate(-90deg); }
  .box.collapsed-box > .box-header .btn-box-tool[data-widget="collapse"]:has(> .fa-minus)::after { transform: none; }

  /* coloured solid headers carry white text - the chevron follows */
  .box.box-solid.box-primary > .box-header .btn-box-tool[data-widget="collapse"],
  .box.box-solid.box-success > .box-header .btn-box-tool[data-widget="collapse"],
  .box.box-solid.box-warning > .box-header .btn-box-tool[data-widget="collapse"],
  .box.box-solid.box-danger  > .box-header .btn-box-tool[data-widget="collapse"],
  .box.box-solid.box-info    > .box-header .btn-box-tool[data-widget="collapse"] {
    --ux-fold-ink: rgba(255, 255, 255, 0.80);
    --ux-fold-bg:  rgba(255, 255, 255, 0.18);
    --ux-fold-acc: #ffffff;
  }

  /* the tools sit on the header's centre line, the video link beside the button */
  .box-header > .box-tools:has(> [data-widget="collapse"]) {
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .box-header > .box-tools:has(> [data-widget="collapse"]) > small { line-height: 1; }

  @media (prefers-reduced-motion: reduce) {
    .btn-box-tool[data-widget="collapse"]::after { transition: none; }
  }

  /* menu cards: the full-height grey strip becomes a rounded icon tile */
  .menu-box {
    min-height: 90px;   /* all cards equal height: the float grid snags on a taller one */
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  }
  .menu-box-icon,
  html[data-theme] .menu-box-icon {
    width: 56px;
    height: 56px;
    min-height: 56px;
    line-height: 52px;
    margin: 16px 0 16px 14px;
    border-radius: 7px;
  }
  .menu-box .info-box-content {
    margin-left: 82px;
    padding: 12px 12px 6px 0;
    font-weight: 500;
  }
  html[data-theme="light"] .menu-box-icon { background: var(--ux-tint); }
  html[data-theme="light"] .menu-box-icon.bg-red,
  html[data-theme="light"] .menu-box-icon.bg-pink { background: linear-gradient(135deg, #ffe1e7, #ffc9d3) !important; }
  html[data-theme="light"] .menu-box-icon.bg-aqua { background: linear-gradient(135deg, #dff1ff, #c4e3ff) !important; }
  .menu-box:hover { transform: translateY(-3px); }
  /* the card grid is one long float row; a card with a longer title is taller and the next
     card snags on it and jumps columns. Lay that row out with flex: rows stay aligned and
     the cards of one row share the same height. */
  .content .row:has(> .col-md-menu) {
    display: flex;
    flex-wrap: wrap;
  }
  .content .row:has(> .col-md-menu)::before,
  .content .row:has(> .col-md-menu)::after { display: none; }
  /* section titles (bare <h1>, nested .row / <section>) keep a full line of their own.
     Bootstrap columns are left alone: they keep their own widths (the report home puts
     .col-lg-3 stat widgets in the same row - forcing them to 100% stacked them full width). */
  .content .row:has(> .col-md-menu) > :not([class*="col-"]) { flex: 0 0 100%; max-width: 100%; }
  .content .row > .col-md-menu { display: flex; }
  .content .row > .col-md-menu > a { display: block; width: 100%; }
  .content .row > .col-md-menu .menu-box { height: calc(100% - 15px); }
  html[data-theme="light"] .menu-box:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--ux-shadow2);
  }
  html[data-theme="dark"] .menu-box:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6); }
  html[data-theme="light"] .menu-box-content a,
  html[data-theme="light"] a.text-black .menu-box { color: var(--ux-ink); }

  /* ================= module sub-menu (left list on sub pages) ================= */
  html[data-theme] .box .nav-stacked { padding: 8px; }
  html[data-theme] .box .nav-stacked > li > a {
    border-radius: var(--ux-r-md);
    border-left: 0;
    padding: 10px 12px;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  html[data-theme] .box .nav-stacked > li { border-bottom: 0; }
  html[data-theme="light"] .nav-stacked > li > a { color: var(--ux-ink); }
  html[data-theme="light"] .nav-stacked > li > a:hover { background-color: var(--ux-tint); }
  html[data-theme="light"] .nav-stacked > li.active > a,
  html[data-theme="light"] .nav-stacked > li.active > a:hover,
  html[data-theme="light"] .nav-stacked > li.active > a:focus {
    background: #244186;   /* original skin blue (user request 2026-09-20) */
    color: #fff;
  }

  /* ================= buttons ================= */
  body:not(.login-page) .btn,
  body:not(.login-page) .btn.btn-flat {
    border-radius: var(--ux-r-sm);
    font-weight: 500;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, filter 0.15s ease;
  }
  body:not(.login-page) .btn:hover { box-shadow: 0 4px 12px rgba(15, 27, 61, 0.16); }
  body:not(.login-page) .btn:active { transform: translateY(1px); box-shadow: none; }
  /* .btn-primary keeps the original skin green (#27903a); only shape and hover shadow are ours */
  html[data-theme="light"] body:not(.login-page) .btn-default {
    background: #fff;
    border-color: var(--ux-stroke2);
    color: var(--ux-ink);
  }
  html[data-theme="light"] body:not(.login-page) .btn-default:hover { background: var(--ux-tint); }

  /* ================= form fields ================= */
  body:not(.login-page) .form-control,
  body:not(.login-page) select,
  body:not(.login-page) textarea,
  body:not(.login-page) input[type="text"],
  body:not(.login-page) input[type="password"],
  body:not(.login-page) input[type="number"],
  body:not(.login-page) input[type="email"],
  body:not(.login-page) input[type="date"],
  body:not(.login-page) input[type="search"] {
    border-radius: var(--ux-r-sm) !important;   /* AdminLTE forces .form-control to 0 !important */
    font-family: inherit;   /* follow the system font ($config_value[168]) */
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  }
  html[data-theme="light"] body:not(.login-page) .form-control,
  html[data-theme="light"] body:not(.login-page) select,
  html[data-theme="light"] body:not(.login-page) textarea,
  html[data-theme="light"] body:not(.login-page) input[type="text"],
  html[data-theme="light"] body:not(.login-page) input[type="password"],
  html[data-theme="light"] body:not(.login-page) input[type="number"] {
    border-color: var(--ux-stroke2);
    color: var(--ux-ink);
    box-shadow: none;
  }
  body:not(.login-page) .form-control:focus,
  body:not(.login-page) select:focus,
  body:not(.login-page) textarea:focus,
  body:not(.login-page) input[type="text"]:focus,
  body:not(.login-page) input[type="password"]:focus,
  body:not(.login-page) input[type="number"]:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16) !important;
    outline: none;
  }
  /* input groups: joined inner edges stay square */
  body:not(.login-page) .input-group > .form-control:first-child,
  body:not(.login-page) .input-group > .input-group-btn:first-child > .btn,
  body:not(.login-page) .input-group > .input-group-addon:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }
  body:not(.login-page) .input-group > .form-control:last-child,
  body:not(.login-page) .input-group > .input-group-btn:last-child > .btn,
  body:not(.login-page) .input-group > .input-group-addon:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
  }
  body:not(.login-page) .input-group > .form-control:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
  }

  /* ================= tables ================= */
  .table > thead > tr > th { font-weight: 600; }
  .table > tbody > tr { transition: background-color 0.12s ease; }
  html[data-theme="light"] .table > thead > tr > th,
  html[data-theme="light"] .table > tbody > tr > td,
  html[data-theme="light"] .table > tbody > tr > th { border-color: rgba(15, 27, 61, 0.07); }
  html[data-theme="light"] .table > thead > tr > th {
    background: var(--ux-tint);
    color: var(--ux-ink);
    border-bottom: 1px solid var(--ux-stroke);
  }
  html[data-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) { background-color: #f8faff; }
  html[data-theme="light"] .table-hover > tbody > tr:hover { background-color: #edf3ff; }

  /* ================= alerts ================= */
  .alert, .callout,
  html[data-theme] .alert,
  html[data-theme] .callout { border-radius: 7px; }
  /* red banners (.alert-danger / .alert.small-box.bg-pink) keep the original skin look:
     solid #dd4b39 with white text (user request 2026-09-20) */
  html[data-theme="light"] .alert.small-box.bg-purple {
    background: #f3f0ff !important;
    border: 1px solid #ddd6fe !important;
    border-left: 4px solid #7c3aed !important;
    color: #4c1d95 !important;
    box-shadow: var(--ux-shadow);
  }
  html[data-theme="light"] .alert-info    { background: #eff6ff !important; border: 1px solid #bfdbfe !important; border-left: 4px solid #2563eb !important; color: #1e3a8a !important; }
  html[data-theme="light"] .alert-success { background: #ecfdf3 !important; border: 1px solid #bbf7d0 !important; border-left: 4px solid #16a34a !important; color: #14532d !important; }
  html[data-theme="light"] .alert-warning { background: #fffbeb !important; border: 1px solid #fde68a !important; border-left: 4px solid #d97706 !important; color: #78350f !important; }
  /* helpers for the soft (non-red) alerts only */
  html[data-theme="light"] .alert.small-box.bg-purple font[color="white" i],
  html[data-theme="light"] .alert.small-box.bg-purple font[color="#ffffff" i] { color: inherit; }
  html[data-theme="light"] .alert.bg-purple a,
  html[data-theme="light"] .alert-info a,
  html[data-theme="light"] .alert-success a,
  html[data-theme="light"] .alert-warning a { color: inherit !important; font-weight: 600; }
  html[data-theme="light"] .alert.bg-purple .close,
  html[data-theme="light"] .alert-info .close,
  html[data-theme="light"] .alert-success .close,
  html[data-theme="light"] .alert-warning .close { color: inherit; opacity: 0.55; }

  /* ================= small parts ================= */
  .pagination > li > a,
  .pagination > li > span { border-radius: var(--ux-r-sm) !important; margin: 0 2px; }
  .label, .badge { border-radius: 5px; font-weight: 500; }
  .main-footer { padding: 12px 22px; font-size: 13px; }
  /* footer colours: left to the original skin (solid white). A translucent white let the
     grey .wrapper behind it show through. */

  /* thin rounded scrollbars (Chrome / Edge) */
  html { scrollbar-width: thin; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background-color: rgba(15, 27, 61, 0.24);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
  }
  ::-webkit-scrollbar-thumb:hover { background-color: rgba(15, 27, 61, 0.4); }
  html[data-theme="dark"] ::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.22); }
  html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.35); }
}

/*
 * Page-entrance animation (2026-09-20). One shot when a page opens, then still:
 * nothing loops. animation-fill-mode is "backwards" on purpose - when it ends the
 * element has NO transform left, so position:fixed children (modals) are not
 * re-anchored. 2026-09-20: slowed x1.6 and travel distances widened (user: slower, more visible). Switched off for users who ask the OS for reduced motion.
 */
@media screen and (prefers-reduced-motion: no-preference) {
  /* 2026-09-20: fade only (user request) - the three names are kept so the rules below stay as they are */
  @keyframes rmsInUp    { from { opacity: 0; } to { opacity: 1; } }
  @keyframes rmsInDown  { from { opacity: 0; } to { opacity: 1; } }
  @keyframes rmsInLeft  { from { opacity: 0; } to { opacity: 1; } }
  @keyframes rmsInFade  { from { opacity: 0; } to { opacity: 1; } }

  /* page title, then banners */
  .content-wrapper > .content-header { animation: rmsInDown 0.56s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .content .alert                    { animation: rmsInDown 0.64s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s backwards; }

  /* module menu cards + section titles (pms_home etc.): a quick cascade */
  .content .row > .col-md-menu,
  .content .row > h1,
  .content .row > .col-md-12 { animation: rmsInUp 0.61s cubic-bezier(0.2, 0.7, 0.2, 1) 0.67s backwards; }
  .content .row > :nth-child(1)  { animation-delay: 0.06s; }
  .content .row > :nth-child(2)  { animation-delay: 0.11s; }
  .content .row > :nth-child(3)  { animation-delay: 0.16s; }
  .content .row > :nth-child(4)  { animation-delay: 0.21s; }
  .content .row > :nth-child(5)  { animation-delay: 0.26s; }
  .content .row > :nth-child(6)  { animation-delay: 0.3s; }
  .content .row > :nth-child(7)  { animation-delay: 0.35s; }
  .content .row > :nth-child(8)  { animation-delay: 0.4s; }
  .content .row > :nth-child(9)  { animation-delay: 0.45s; }
  .content .row > :nth-child(10) { animation-delay: 0.48s; }
  .content .row > :nth-child(11) { animation-delay: 0.51s; }
  .content .row > :nth-child(12) { animation-delay: 0.54s; }
  .content .row > :nth-child(13) { animation-delay: 0.58s; }
  .content .row > :nth-child(14) { animation-delay: 0.61s; }
  .content .row > :nth-child(15) { animation-delay: 0.64s; }

  /* content boxes: side menu first, main box right after */
  .content .box                     { animation: rmsInUp 0.64s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s backwards; }
  .content .col-md-9 .box,
  .content .col-md-8 .box           { animation-delay: 0.22s; }

  /* module sub-menu items slide in from the left */
  .box .nav-stacked > li            { animation: rmsInLeft 0.48s ease-out 0.8s backwards; }
  .box .nav-stacked > li:nth-child(1)  { animation-delay: 0.19s; }
  .box .nav-stacked > li:nth-child(2)  { animation-delay: 0.24s; }
  .box .nav-stacked > li:nth-child(3)  { animation-delay: 0.29s; }
  .box .nav-stacked > li:nth-child(4)  { animation-delay: 0.34s; }
  .box .nav-stacked > li:nth-child(5)  { animation-delay: 0.38s; }
  .box .nav-stacked > li:nth-child(6)  { animation-delay: 0.43s; }
  .box .nav-stacked > li:nth-child(7)  { animation-delay: 0.48s; }
  .box .nav-stacked > li:nth-child(8)  { animation-delay: 0.53s; }
  .box .nav-stacked > li:nth-child(9)  { animation-delay: 0.58s; }
  .box .nav-stacked > li:nth-child(10) { animation-delay: 0.62s; }
  .box .nav-stacked > li:nth-child(11) { animation-delay: 0.67s; }
  .box .nav-stacked > li:nth-child(12) { animation-delay: 0.72s; }

  /* first screenful of table rows fades in (opacity only: rows do not take transforms well) */
  .box .table > tbody > tr:nth-child(-n+14) { animation: rmsInFade 0.56s ease-out 0.48s backwards; }
}

/*
 * Page-loading indicator (2026-09-20). index.php prints <body style="opacity: 0.5"> and its
 * closing script sets opacity to 1 on window load. Instead of the washed-out page we keep
 * the page at full opacity and use that inline style as the "still loading" flag:
 * while it says 0.5 a thin bar runs along the top edge; when the script rewrites it the bar
 * fades out. No change to index.php. The bar is the only looping motion and only exists
 * while the page loads; as a safety net it hides itself after 20 s even if "load" never fires.
 */
@media screen {
  body { opacity: 1 !important; }

  @keyframes rmsLoadRun  { from { background-position: -100% 0; } to { background-position: 200% 0; } }   /* left -> right */
  @keyframes rmsLoadHide { to { opacity: 0; visibility: hidden; } }

  body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 100000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    background-color: rgba(255, 255, 255, 0.25);
    background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%, #ffffff 35%, #7dd3fc 50%, #ffffff 65%, rgba(255, 255, 255, 0) 100%);
    background-size: 45% 100%;
    background-repeat: no-repeat;
    box-shadow: 0 0 8px rgba(125, 211, 252, 0.8);
  }
  body[style*="opacity: 0.5"]::before {
    opacity: 1;
    animation: rmsLoadRun 1.1s linear infinite, rmsLoadHide 0.3s linear 20s forwards;
  }
  /* ---- .table-responsive: the stray frame of a narrow window (2026-09-21) --
     css-bootstrap-rcheva.css frames EVERY .table-responsive with a fixed
     1px #ddd line (plus 15px margin) below 768px, and index.php wraps almost
     every page in one of those divs, so narrowing the window drew a light-grey
     box round pages that have nothing to scroll sideways - and because the
     colour is fixed, the dark theme showed it as a bright line.
     The frame is dropped here and handed back only while the wrapper really
     does scroll sideways: the block in sys_css.php sets .uix-scrollx on it
     (and takes it off again) whenever the page loads or the window resizes.
     The line colour is deliberately theme-neutral - it has to read on white
     and on the dark card alike. */
  @media (max-width: 767px) {
    .table-responsive { margin-bottom: 0; border: 0; }
    .table-responsive.uix-scrollx {
      margin-bottom: 15px;
      border: 1px solid rgba(128, 132, 145, 0.45);
      border-radius: var(--ux-r-md);
    }
  }
}

/* ===========================================================================
   Mail icon (2026-09-22): the circular envelope button of sms_home (mail_ux.css
   a.mbx-stdmail) now stands wherever mail_comp.png / sms_writemail.png used to
   be printed. common_function.php rms_mail_icon() prints the markup (8 places:
   sendmailto, sendmailtostd, people_name format 2, mail_read, mail_reply,
   mms_check, sms_writemail). Both themes; exports keep the old picture.
   Revert: restore bak\*.bak_20260922_mailico and drop this block.
   =========================================================================== */
@media screen {
  .rms-mailico { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 2px; vertical-align: middle; box-sizing: border-box; color: rgba(15, 27, 61, 0.62); background: #ffffff; border: 1px solid rgba(15, 27, 61, 0.22); border-radius: 50%; -webkit-transition: background-color .12s, border-color .12s, color .12s; transition: background-color .12s, border-color .12s, color .12s; }
  .rms-mailico svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .rms-mailico-lg { width: 32px; height: 32px; }   /* 2026-09-22: base size raised to 32px = a.mbx-stdmail of mail_ux.css, so the mail and QR buttons of the sms_home picture grid match; -lg kept for the call sites */
  ul.users-list .rms-mailico { margin: 4px 0 0; vertical-align: baseline; }   /* sits beside a.mbx-stdmail (margin 4px 0 0, inline-flex baseline) */
  a:hover > .rms-mailico, a:focus > .rms-mailico, a.rms-maillink:hover .rms-mailico, a.rms-maillink:focus .rms-mailico { color: #ffffff; background: #244186; border-color: #244186; }
  a.rms-maillink { display: inline-flex; align-items: center; gap: 6px; }
  html[data-theme="dark"] .rms-mailico { color: rgba(230, 230, 230, 0.66); background: #2b2b2b; border-color: #5a5a5a; }
  html[data-theme="dark"] a:hover > .rms-mailico, html[data-theme="dark"] a:focus > .rms-mailico, html[data-theme="dark"] a.rms-maillink:hover .rms-mailico, html[data-theme="dark"] a.rms-maillink:focus .rms-mailico { color: #ffffff; background: #3a5ca8; border-color: #3a5ca8; }
  /* QR icon (2026-09-22): rms_qr_icon() prints the same circle with a QR-code glyph; rms-qrico-nav = the 40px picture of the top bar (white ring on the red / dark bar) */
  .rms-qrico svg { stroke-width: 1.8; }
  .rms-qrico-nav, html[data-theme="dark"] .rms-qrico-nav { display: flex; width: 36px; height: 36px; margin: 5px 8px 0 0;   /* block (no line-box strut) inside the floated link: 3px logo padding + 5px = centre at 26px, level with the theme toggle (15px link padding + 22px icon) */ color: #ffffff; background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.55); }
  .rms-qrico-nav svg { width: 18px; height: 18px; }
  a:hover > .rms-qrico-nav, a:focus > .rms-qrico-nav, html[data-theme="dark"] a:hover > .rms-qrico-nav, html[data-theme="dark"] a:focus > .rms-qrico-nav { color: #ffffff; background: rgba(255, 255, 255, 0.28); border-color: #ffffff; }
}
@media print { .rms-mailico { display: none !important; } }

/* ===========================================================================
   Frame notices - .rms-note (2026-09-22, replaces .rms-oldb of the same day)

   One shape for every banner the frame puts above a page: icon + title + one
   explaining line + the action that clears it, in three levels

       .rms-note-bad    red    something is blocked right now
       .rms-note-warn   amber  act on it soon
       .rms-note-info   blue   good to know

   It replaces the old idiom - div.alert.small-box.bg-pink|bg-purple with
   center + font color=white + b + big inside it - which painted a reminder
   and a blocked screen in the same loud red, hid its own link inside the
   sentence, and could be closed on every level.
   Printed by rms_note() in rms_note.php. Call sites 2026-09-22:
     page-header.php     old database (bad)
     index.php           unanswered poll (info) x2, old OS (warn), old password (warn)
     sms_home_login.php  old password (warn)
     pms_home.php        teaching licence about to expire (warn / bad)
   Revert: restore bak\*.bak_20260922_231500 + bak\*.bak_20260922_234500.
   =========================================================================== */
@media screen {
  .rms-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid transparent; border-left-width: 4px; border-radius: 8px; box-shadow: 0 1px 2px rgba(15, 27, 61, 0.06); animation: rms-note-in .34s ease-out both; }
  .rms-note-ico { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
  .rms-note-txt { flex: 1 1 260px; min-width: 0; line-height: 1.45; }
  .rms-note-t { display: block; font-weight: 700; font-size: 14.5px; }
  .rms-note-s { display: block; font-size: 12.5px; opacity: .82; }
  .rms-note-code { font-family: Consolas, monospace; font-size: 11.5px; padding: 1px 5px; border-radius: 4px; }
  .rms-note-txt a { color: inherit; text-decoration: underline; }
  @keyframes rms-note-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

  /* the action of the banner - a real button, not a link buried in the text */
  .rms-note a.rms-note-btn, .rms-note a.rms-note-btn:link, .rms-note a.rms-note-btn:visited { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid transparent; color: #ffffff; font-size: 13.5px; font-weight: 600; line-height: 1.3; text-decoration: none; white-space: nowrap; -webkit-transition: background-color .15s, box-shadow .15s, transform .12s; transition: background-color .15s, box-shadow .15s, transform .12s; }
  .rms-note a.rms-note-btn:hover, .rms-note a.rms-note-btn:focus { color: #ffffff; text-decoration: none; transform: translateY(-1px); }
  .rms-note a.rms-note-btn:active { transform: none; }
  .rms-note a.rms-note-btn-ghost, .rms-note a.rms-note-btn-ghost:link, .rms-note a.rms-note-btn-ghost:visited { background: transparent; color: inherit; border-color: currentColor; }
  .rms-note a.rms-note-btn-ghost:hover, .rms-note a.rms-note-btn-ghost:focus { background: rgba(255, 255, 255, 0.6); color: inherit; box-shadow: none; }
  html[data-theme="dark"] .rms-note a.rms-note-btn-ghost:hover { background: rgba(255, 255, 255, 0.10); }

  /* close button - only the level that prints one (info) gets it */
  .rms-note .rms-note-x { flex: 0 0 auto; padding: 0 2px; border: 0; background: none; color: inherit; opacity: .45; font-size: 20px; line-height: 1; cursor: pointer; }
  .rms-note .rms-note-x:hover { opacity: .9; }

  .rms-note-bad  { border-color: #f3c2c2; border-left-color: #d64545; background: #fdf1f1; color: #7f1d1d; }
  .rms-note-bad  .rms-note-ico { background: #f9dcdc; color: #d64545; }
  .rms-note-bad  .rms-note-code { background: #f9dcdc; color: #7f1d1d; }
  .rms-note-bad  a.rms-note-btn { background: #d64545; border-color: #d64545; }
  .rms-note-bad  a.rms-note-btn:hover, .rms-note-bad a.rms-note-btn:focus { background: #b83636; border-color: #b83636; box-shadow: 0 2px 6px rgba(214, 69, 69, 0.35); }

  .rms-note-warn { border-color: #fae0b0; border-left-color: #d97706; background: #fffaf0; color: #7c3a06; }
  .rms-note-warn .rms-note-ico { background: #fdeccd; color: #c67c00; }
  .rms-note-warn .rms-note-code { background: #fdeccd; color: #7c3a06; }
  .rms-note-warn a.rms-note-btn { background: #d97706; border-color: #d97706; }
  .rms-note-warn a.rms-note-btn:hover, .rms-note-warn a.rms-note-btn:focus { background: #b45f05; border-color: #b45f05; box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35); }

  .rms-note-info { border-color: #c9ddfb; border-left-color: #2563eb; background: #eff6ff; color: #1e3a8a; }
  .rms-note-info .rms-note-ico { background: #dbe9fd; color: #2563eb; }
  .rms-note-info .rms-note-code { background: #dbe9fd; color: #1e3a8a; }
  .rms-note-info a.rms-note-btn { background: #2563eb; border-color: #2563eb; }
  .rms-note-info a.rms-note-btn:hover, .rms-note-info a.rms-note-btn:focus { background: #1d4ed8; border-color: #1d4ed8; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35); }

  html[data-theme="dark"] .rms-note-bad  { border-color: rgba(224, 90, 90, 0.42); border-left-color: #e05a5a; background: rgba(224, 90, 90, 0.14); color: #f3c9c9; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
  html[data-theme="dark"] .rms-note-bad  .rms-note-ico { background: rgba(224, 90, 90, 0.22); color: #ea8080; }
  html[data-theme="dark"] .rms-note-bad  .rms-note-code { background: rgba(224, 90, 90, 0.22); color: #f3c9c9; }
  html[data-theme="dark"] .rms-note-bad  a.rms-note-btn { background: #c24444; border-color: #c24444; }
  html[data-theme="dark"] .rms-note-bad  a.rms-note-btn:hover { background: #d95a5a; border-color: #d95a5a; }

  html[data-theme="dark"] .rms-note-warn { border-color: rgba(224, 160, 32, 0.40); border-left-color: #e0a020; background: rgba(224, 160, 32, 0.14); color: #f2ddb4; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
  html[data-theme="dark"] .rms-note-warn .rms-note-ico { background: rgba(224, 160, 32, 0.22); color: #e8b955; }
  html[data-theme="dark"] .rms-note-warn .rms-note-code { background: rgba(224, 160, 32, 0.22); color: #f2ddb4; }
  html[data-theme="dark"] .rms-note-warn a.rms-note-btn { background: #b8790f; border-color: #b8790f; }
  html[data-theme="dark"] .rms-note-warn a.rms-note-btn:hover { background: #d18c14; border-color: #d18c14; }

  html[data-theme="dark"] .rms-note-info { border-color: rgba(91, 155, 224, 0.40); border-left-color: #5b9be0; background: rgba(91, 155, 224, 0.14); color: #cfe0f5; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
  html[data-theme="dark"] .rms-note-info .rms-note-ico { background: rgba(91, 155, 224, 0.22); color: #85b6ea; }
  html[data-theme="dark"] .rms-note-info .rms-note-code { background: rgba(91, 155, 224, 0.22); color: #cfe0f5; }
  html[data-theme="dark"] .rms-note-info a.rms-note-btn { background: #3a72c0; border-color: #3a72c0; }
  html[data-theme="dark"] .rms-note-info a.rms-note-btn:hover { background: #4b86d6; border-color: #4b86d6; }

  @media (max-width: 560px) { .rms-note { padding: 10px 12px; } .rms-note a.rms-note-btn { flex: 1 1 100%; justify-content: center; } }
  @media (prefers-reduced-motion: reduce) { .rms-note { animation: none; } .rms-note a.rms-note-btn { transition: none; } }
}
/* on paper a notice stays, but as a plain line: a report printed while the
   system is on the old database must not look like one from the live system */
@media print {
  .rms-note { display: block; margin: 0 0 8px; padding: 0; border: 0; border-bottom: 1px solid #000000; background: none; color: #000000; box-shadow: none; animation: none; font-size: 12px; }
  .rms-note-ico, .rms-note a.rms-note-btn, .rms-note .rms-note-x { display: none !important; }
  .rms-note-code { background: none; padding: 0; }
}

/* ---------------------------------------------------------------------------
   .rms-notepage - the full page state that rms_note_page() prints when a page
   cannot go on and is about to exit() (a student who may not see a grade
   report, a bad link). It used to be one floating red bar on an empty white
   page. The level classes above supply the colours.
   --------------------------------------------------------------------------- */
@media screen {
  .rms-notepage { display: flex; align-items: center; justify-content: center; min-height: 72vh; padding: 24px 16px; box-sizing: border-box; }
  .rms-notepage-box { width: 100%; max-width: 560px; padding: 30px 26px 26px; border: 1px solid transparent; border-left-width: 4px; border-radius: 12px; text-align: center; box-shadow: 0 1px 2px rgba(15, 27, 61, 0.06), 0 10px 30px rgba(15, 27, 61, 0.08); animation: rms-note-in .34s ease-out both; }
  .rms-notepage-ico { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
  .rms-notepage-t { font-size: 18px; font-weight: 700; line-height: 1.45; }
  .rms-notepage-s { margin-top: 6px; font-size: 13.5px; line-height: 1.6; opacity: .82; }
  .rms-notepage-a { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .rms-notepage-box .rms-note-ico { display: none; }

  .rms-notepage-box.rms-note-bad  .rms-notepage-ico { background: #f9dcdc; color: #d64545; }
  .rms-notepage-box.rms-note-warn .rms-notepage-ico { background: #fdeccd; color: #c67c00; }
  .rms-notepage-box.rms-note-info .rms-notepage-ico { background: #dbe9fd; color: #2563eb; }
  html[data-theme="dark"] .rms-notepage-box.rms-note-bad  .rms-notepage-ico { background: rgba(224, 90, 90, 0.22); color: #ea8080; }
  html[data-theme="dark"] .rms-notepage-box.rms-note-warn .rms-notepage-ico { background: rgba(224, 160, 32, 0.22); color: #e8b955; }
  html[data-theme="dark"] .rms-notepage-box.rms-note-info .rms-notepage-ico { background: rgba(91, 155, 224, 0.22); color: #85b6ea; }

  @media (max-width: 560px) { .rms-notepage { min-height: 60vh; } .rms-notepage-box { padding: 24px 18px 20px; } .rms-notepage-t { font-size: 16.5px; } }
}
@media print {
  .rms-notepage { display: block; min-height: 0; padding: 0; }
  .rms-notepage-box { max-width: none; padding: 0; border: 0; box-shadow: none; text-align: left; animation: none; }
  .rms-notepage-ico, .rms-notepage-a { display: none !important; }
}

/* ---- month calendars: day cells grew taller on every touch / scroll on iPhone (2026-09-24) ----
   chk_home, pms_note, sms_home_note, sms_home_extact, sch_report and bud_installment print each day as
   <td height=50><div style='height:100%;width:100%'>. WebKit (Safari AND Chrome on iOS) sizes that div to
   the cell's height, the cell's padding then makes the cell taller, and the next layout pass repeats it -
   each touch or scroll added a few px. The div paints nothing, so auto height looks the same everywhere. */
td > div[style="height:100%;width:100%"] { height: auto !important; }
/* ...and seven equal day columns on those calendars (2026-09-24, user request; chk_home does it in chk_home_ux.css).
   The first row is the month nav (colspan 2/3/2, width=33% each), which made Sun/Mon and Fri/Sat wider, and in the
   automatic layout a day with a long note widened its whole column. The tables whose day cells hold the div above get
   class rms-daycal from a small script in sys_css.php (2026-09-28: was table:has(...) - Chrome re-checked that selector
   on every row while a page loaded, and chk_teacher_week, 4,000 rows / 20 MB, froze the tab for minutes). */
table.rms-daycal { table-layout: fixed; }
table.rms-daycal > tbody > tr > td { width: auto !important; overflow-wrap: break-word; word-wrap: break-word; }

/* ---- top bar icons as inline SVG (2026-09-24, user request: sharper than the header-0N.png pictures) ----
   header.php prints <svg class="rms-hico"> in place of header-01 (home), header-02 (today's classes),
   header-03 (notifications x2), header-04 (report hub / student homework). Stroke = currentColor, so the
   icon takes the link colour of the bar in both themes. The <i class="fa ..."> wrappers are legacy. */
.main-header .rms-hico { display: inline-block; width: 22px; height: 22px; vertical-align: middle; margin-top: -2px; stroke: currentColor; fill: none; }
.main-header .navbar .nav > li > a > .fa { font-size: inherit; line-height: 1; }
.main-header .navbar .nav > li > a > .fa:before { content: none; }
/* the menu button at the top left (header-sidebar.png before, 2026-09-24): three lines, a touch larger */
.main-header .logo .rms-hico-menu { width: 24px; height: 24px; margin-top: -3px; color: #fff; }

/* ---- top bar count badges (2026-09-24, user request: "more visible, red like the sms_home tool badge") ----
   was .label-primary magenta #ec008b in a 9px square; now a bright red round badge (same red as
   .smx-tool-badge) with a white ring, so it stays apart from the red bar in both themes */
.main-header .navbar .nav > li > a > .label {
  top: 6px; right: 3px;
  min-width: 19px; height: 19px; padding: 0 5px;
  font-size: 11px; font-weight: 700; line-height: 15px; text-align: center;
  color: #fff;
  background-color: #e0322f !important;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.main-header .navbar .nav > li > a > .label:empty { display: none; }
html[data-theme="dark"] .main-header .navbar .nav > li > a > .label { border-color: #263238; background-color: #e5483a !important; }

/* ---- left menu count badges red too (2026-09-24, user request after the top bar badges) ----
   menu-sidebar.php prints <small class="label label-primary pull-right"> (magenta pill); same red round
   badge as the top bar, ring in the rail colour. Position / hide rules of the rail are untouched;
   the student portal (.spx-badge, std_portal_ux.css) was already red. */
.main-sidebar .sidebar-menu .label:not(.spx-badge) {
  min-width: 19px; height: 19px; padding: 0 5px;
  font-size: 11px; font-weight: 700; line-height: 15px; text-align: center;
  color: #fff !important;
  background-color: #e0322f !important;
  border: 2px solid #314c58;
  border-radius: 999px;
}
html[data-theme="dark"] .main-sidebar .sidebar-menu .label:not(.spx-badge) { border-color: #161d21; background-color: #e5483a !important; }

/* ---- frame tool buttons of every page header (2026-09-24, user request: meaningful icons instead of pictures) ----
   index.php tags its links <a class="rms-ftool rms-ftool-{max|min|print|xls}"> and keeps the old <img>
   (img/print.png = expand/shrink, print.png = print view, chk_xls.png = export this screen to Excel), which is
   hidden here; the icon is a mask in the ink / accent colours of the collapse chevron beside it. */
html {
  --ux-m-max:   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.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
  --ux-m-min:   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.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 14 10 14 10 20'/%3E%3Cpolyline points='20 10 14 10 14 4'/%3E%3Cline x1='14' y1='10' x2='21' y2='3'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
  --ux-m-print: 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.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='7' rx='1'/%3E%3C/svg%3E");
  --ux-m-xls:   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.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 12h8v6H8zM12 12v6M8 15h8'/%3E%3C/svg%3E");
}
a.rms-ftool {
  display: inline-block; position: relative; vertical-align: middle;
  width: 28px; height: 28px; margin: 0 1px;
  border: 1px solid transparent; border-radius: var(--ux-r-md, 6px);
  --ux-ft-ink: var(--ux-fold-ink, rgba(15, 27, 61, 0.42));
  --ux-ft-acc: var(--ux-fold-acc, #2563eb);
}
a.rms-ftool > img { display: none !important; }
a.rms-ftool::after {
  content: ""; position: absolute; left: 4px; top: 4px; width: 18px; height: 18px;
  background-color: var(--ux-ft-ink);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  -webkit-mask-size: contain;     mask-size: contain;
  transition: background-color 0.2s ease;
}
a.rms-ftool-max::after   { -webkit-mask-image: var(--ux-m-max);   mask-image: var(--ux-m-max); }
a.rms-ftool-min::after   { -webkit-mask-image: var(--ux-m-min);   mask-image: var(--ux-m-min); }
a.rms-ftool-print::after { -webkit-mask-image: var(--ux-m-print); mask-image: var(--ux-m-print); }
a.rms-ftool-xls::after   { -webkit-mask-image: var(--ux-m-xls);   mask-image: var(--ux-m-xls); }
a.rms-ftool-xls { --ux-ft-ink: #1d7a45; --ux-ft-acc: #16a34a; }            /* Excel keeps its green */
html[data-theme="dark"] a.rms-ftool-xls { --ux-ft-ink: #4ade80; --ux-ft-acc: #86efac; }
a.rms-ftool:hover, a.rms-ftool:focus-visible { background: var(--ux-fold-bg, rgba(15, 27, 61, 0.08)); text-decoration: none; }
a.rms-ftool:hover::after, a.rms-ftool:focus-visible::after { background-color: var(--ux-ft-acc); }
a.rms-ftool:focus-visible { outline: 2px solid var(--ux-ft-acc); outline-offset: 1px; }

/* ---- favourite star before the page title (2026-09-24): favorite_add.png / favorite.png -> icon ----
   outline star = not in the favourites yet (click adds), filled amber star (.is-on) = in the favourites (click removes) */
html {
  --ux-m-star: 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.6' stroke-linejoin='round'%3E%3Cpath d='M12 2.8l2.85 5.78 6.38.93-4.62 4.5 1.09 6.35L12 17.36l-5.7 3 1.09-6.35-4.62-4.5 6.38-.93z'/%3E%3C/svg%3E");
  --ux-m-star-f: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 2.8l2.85 5.78 6.38.93-4.62 4.5 1.09 6.35L12 17.36l-5.7 3 1.09-6.35-4.62-4.5 6.38-.93z'/%3E%3C/svg%3E");
}
a.rms-ftool-fav { margin: -4px 4px 0 -4px; --ux-ft-acc: #f59e0b; }
a.rms-ftool-fav::after { -webkit-mask-image: var(--ux-m-star); mask-image: var(--ux-m-star); }
a.rms-ftool-fav.is-on { --ux-ft-ink: #f59e0b; --ux-ft-acc: #d97706; }
a.rms-ftool-fav.is-on::after { -webkit-mask-image: var(--ux-m-star-f); mask-image: var(--ux-m-star-f); }
html[data-theme="dark"] a.rms-ftool-fav { --ux-ft-acc: #fbbf24; }
html[data-theme="dark"] a.rms-ftool-fav.is-on { --ux-ft-ink: #fbbf24; --ux-ft-acc: #fcd34d; }
/* key before "แก้ไขรหัสผ่าน" in the user dropdowns (password.png before, 2026-09-24): text-sized, button text colour */
.main-header .rms-hico.rms-hico-key { width: 16px; height: 16px; margin: -2px 3px 0 0; }

/* ---- module icons of the left menu (2026-09-24, style "A new") ----
   menu-sidebar.php prints <img class="rms-mi-old" src="N.png"> + <span class="rms-mi"> (rms_module_icons.php, colours
   precomputed in PHP as --mi-* so no color-mix() is needed). <html data-icons> (sys_css.php, user_pref 'icons')
   picks one: new = default, classic = the old pictures. The switch is in the widget arrange bar of the home page. */
.sidebar-menu .rms-mi {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 30px; height: 30px; margin: -3px 0; border-radius: 8px;
  /* both themes: tinted translucent tile that blends into the dark rail + light icon (user request 2026-09-24;
     the pastel light-theme tile used --mi-ink / --mi-bg / --mi-ring, still printed by rms_module_icons.php) */
  color: var(--mi-ink-d); background: var(--mi-bg-d); box-shadow: inset 0 0 0 1px var(--mi-ring-d);
}
.sidebar-menu .rms-mi svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-menu .rms-mi .d { fill: currentColor; opacity: 0.38; stroke: none; }
html[data-theme="dark"] .sidebar-menu .rms-mi { color: var(--mi-ink-d); background: var(--mi-bg-d); box-shadow: inset 0 0 0 1px var(--mi-ring-d); }
html[data-theme="dark"] .sidebar-menu .rms-mi .d { opacity: 0.38; }
html:not([data-icons="classic"]) .sidebar-menu img.rms-mi-old { display: none !important; }
html[data-icons="classic"] .sidebar-menu .rms-mi { display: none !important; }
/* collapsed 50px rail: the link's 15px padding (+ a 3px text gap) put the 30px tile at 18-48 px; pull it to ~10-40 = centred (9.7 / 10.3 px measured) (2026-09-24) */
@media (min-width: 768px) {
  /* open rail too (2026-09-29, user): the icon keeps the same spot when the rail opens or closes */
  .sidebar-menu > li > a .rms-mi { margin-left: -8px; }
  body:not(.sidebar-collapse) .sidebar-menu > li > a .rms-mi { margin-right: 6px; }   /* a space more between icon and name (2026-09-29, user) */
  html .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right) { padding-left: 10px; }   /* fly-out name 2 spaces further left, was 20px (2026-09-29, user) */
}
/* light theme only: the rail tile about 30% brighter than the dark-theme tile (2026-09-24, user request) - a bit more
   module colour (alpha .36 instead of .28, --mi-bg-l from rms_module_icons.php) plus a thin white wash (0.12) = 27-32% lighter measured over the #314c58 rail */
html[data-theme="light"] .sidebar-menu .rms-mi {
  background: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)), var(--mi-bg-l, var(--mi-bg-d));
}
/* light theme, highlighted module (current = li[style*=black], or hover) on the red gradient: the tinted tile sank into the
   red (user 2026-09-24) - the tile turns solid white with the module-colour icon, the name white + bold */
html[data-theme="light"] .sidebar-menu > li[style*="black"] > a .rms-mi,
html[data-theme="light"] .sidebar-menu > li.active > a .rms-mi,
html[data-theme="light"] .sidebar-menu > li:hover > a .rms-mi {
  color: var(--mi-ink); background: #fff; box-shadow: 0 2px 6px rgba(80, 0, 20, 0.35);
}
html[data-theme="light"] .sidebar-menu > li[style*="black"] > a .rms-mi .d,
html[data-theme="light"] .sidebar-menu > li.active > a .rms-mi .d,
html[data-theme="light"] .sidebar-menu > li:hover > a .rms-mi .d { opacity: 0.22; }
html[data-theme="light"] .sidebar-menu > li[style*="black"] > a,
html[data-theme="light"] .sidebar-menu > li[style*="black"] > a > span:not(.pull-right),
html[data-theme="light"] .sidebar-menu > li.active > a > span:not(.pull-right),
html[data-theme="light"] .sidebar-menu > li:hover > a > span:not(.pull-right) {
  color: #fff !important; font-weight: 600; text-shadow: 0 1px 2px rgba(60, 0, 15, 0.35);
}
/* dark theme, same idea (user 2026-09-24 "ทำแบบเดียวกันกับ theme มืด"): highlighted module = light tile (off-white, softer
   on the dark rail) with the module-colour icon, name white + bold */
html[data-theme="dark"] .sidebar-menu > li[style*="black"] > a .rms-mi,
html[data-theme="dark"] .sidebar-menu > li.active > a .rms-mi,
html[data-theme="dark"] .sidebar-menu > li:hover > a .rms-mi {
  color: var(--mi-ink); background: #eef2f5; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .sidebar-menu > li[style*="black"] > a .rms-mi .d,
html[data-theme="dark"] .sidebar-menu > li.active > a .rms-mi .d,
html[data-theme="dark"] .sidebar-menu > li:hover > a .rms-mi .d { opacity: 0.22; }
html[data-theme="dark"] .sidebar-menu > li[style*="black"] > a,
html[data-theme="dark"] .sidebar-menu > li[style*="black"] > a > span:not(.pull-right),
html[data-theme="dark"] .sidebar-menu > li.active > a > span:not(.pull-right),
html[data-theme="dark"] .sidebar-menu > li:hover > a > span:not(.pull-right) {
  color: #fff !important; font-weight: 600;
}

/* ---- menu-card icons (2026-09-24, module by module - rms_menu_icons.php) ----
   <span class="menu-box-icon"> holds <img class="rms-ci-old"> + <span class="rms-ci">; the new one fills the tile with the
   module's pastel (dark theme: tinted) and draws the icon in the module colour. <html data-icons="classic"> = old pictures. */
.menu-box-icon .rms-ci {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: inherit;
  color: var(--ci-ink); background: var(--ci-bg);
}
.menu-box-icon .rms-ci svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.menu-box-icon .rms-ci .d { fill: currentColor; opacity: 0.2; stroke: none; }
html[data-theme="dark"] .menu-box-icon .rms-ci { color: var(--ci-ink-d); background: var(--ci-bg-d); }
html[data-theme="dark"] .menu-box-icon .rms-ci .d { opacity: 0.32; }
html:not([data-icons="classic"]) .menu-box-icon img.rms-ci-old { display: none !important; }
html[data-icons="classic"] .menu-box-icon .rms-ci { display: none !important; }
/* the tile's own fill (bg-pink / bg-red / bg-aqua of the staff + report sections, or the light tint) showed through the
   translucent dark-theme icon tile - with a new icon inside, the tile itself is transparent */
/* (2026-09-24, later) replaced: the tile keeps its own colour by permission type again - see the block "tile colour = permission type" below */

/* ---- module icons outside the left menu (2026-09-24): report hub chips (.rms-mi-chip) and section headings (.rms-mi-sec,
   also the "บทสรุป <module>" heading of every module page), plus the hub hero picture -> line chart ---- */
.rms-mi.rms-mi-chip, .rms-mi.rms-mi-sec {
  display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: middle;
  color: var(--mi-ink); background: var(--mi-bg); box-shadow: inset 0 0 0 1px var(--mi-ring);
}
.rms-mi.rms-mi-chip { width: 22px; height: 22px; border-radius: 6px; }
.rms-mi.rms-mi-sec { width: 30px; height: 30px; border-radius: 8px; }
.rms-mi-chip svg, .rms-mi-sec svg, .rh-hero-ico .rms-hero-svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rms-mi-chip svg { width: 15px; height: 15px; }
.rms-mi-sec svg { width: 20px; height: 20px; }
.rms-mi-chip .d, .rms-mi-sec .d { fill: currentColor; opacity: 0.3; stroke: none; }
html[data-theme="dark"] .rms-mi.rms-mi-chip, html[data-theme="dark"] .rms-mi.rms-mi-sec { color: var(--mi-ink-d); background: var(--mi-bg-d); box-shadow: inset 0 0 0 1px var(--mi-ring-d); }
html[data-theme="dark"] .rms-mi-chip .d, html[data-theme="dark"] .rms-mi-sec .d { opacity: 0.38; }
.rh-hero-ico .rms-hero-svg { width: 26px; height: 26px; color: #fff; }
html:not([data-icons="classic"]) .rh-chips img.rms-mi-old,
html:not([data-icons="classic"]) .rh-sec img.rms-mi-old,
html:not([data-icons="classic"]) .rh-hero-ico img.rms-mi-old { display: none !important; }
html[data-icons="classic"] .rms-mi-chip, html[data-icons="classic"] .rms-mi-sec, html[data-icons="classic"] .rh-hero-ico .rms-hero-svg { display: none !important; }

/* ---- menu icons in the module sub-menu (pms_menu.php, .rms-ci-sm) + global new/classic switch for every .rms-ci (2026-09-24) ---- */
.rms-ci.rms-ci-sm {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 24px; height: 24px; margin: -2px 4px 0 0; border-radius: 6px;
  color: var(--ci-ink); background: var(--ci-bg);
}
.rms-ci.rms-ci-sm svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rms-ci.rms-ci-sm .d { fill: currentColor; opacity: 0.25; stroke: none; }
html[data-theme="dark"] .rms-ci.rms-ci-sm { color: var(--ci-ink-d); background: var(--ci-bg-d); }
html[data-theme="dark"] .rms-ci.rms-ci-sm .d { opacity: 0.35; }
html:not([data-icons="classic"]) img.rms-ci-old { display: none !important; }
html[data-icons="classic"] .rms-ci { display: none !important; }

/* ---- student / parent LEFT menu in colour (2026-09-24, user request; the top bar stays white line icons):
   each .spx-ico of menu-sidebar.php's portal menu becomes a tile in its own colour, like the staff module rail -
   tinted on the dark rail, white tile + deep icon when current (spx-on) or hovered. Colours per li[data-spx]. ---- */
.sidebar-menu > li.spx-mi[data-spx="login_ok"] { --sx-ink: #9db9f6; --sx-deep: #2055ca; --sx-bg: rgba(37,99,235,0.28); --sx-bg-l: rgba(37,99,235,0.36); --sx-ring: rgba(37,99,235,0.45); }
.sidebar-menu > li.spx-mi[data-spx="learn"] { --sx-ink: #c4a6f7; --sx-deep: #6b32cc; --sx-bg: rgba(124,58,237,0.28); --sx-bg-l: rgba(124,58,237,0.36); --sx-ring: rgba(124,58,237,0.45); }
.sidebar-menu > li.spx-mi[data-spx="homework"] { --sx-ink: #f6b492; --sx-deep: #c94c0a; --sx-bg: rgba(234,88,12,0.28); --sx-bg-l: rgba(234,88,12,0.36); --sx-ring: rgba(234,88,12,0.45); }
.sidebar-menu > li.spx-mi[data-spx="mailbox"] { --sx-ink: #90cedc; --sx-deep: #077d99; --sx-bg: rgba(8,145,178,0.28); --sx-bg-l: rgba(8,145,178,0.36); --sx-ring: rgba(8,145,178,0.45); }
.sidebar-menu > li.spx-mi[data-spx="caution"] { --sx-ink: #ef9d9d; --sx-deep: #bd2121; --sx-bg: rgba(220,38,38,0.28); --sx-bg-l: rgba(220,38,38,0.36); --sx-ring: rgba(220,38,38,0.45); }
.sidebar-menu > li.spx-mi[data-spx="assess"] { --sx-ink: #e7ca8e; --sx-deep: #ae7703; --sx-bg: rgba(202,138,4,0.28); --sx-bg-l: rgba(202,138,4,0.36); --sx-ring: rgba(202,138,4,0.45); }
.sidebar-menu > li.spx-mi[data-spx="budget"] { --sx-ink: #96d6ae; --sx-deep: #138c40; --sx-bg: rgba(22,163,74,0.28); --sx-bg-l: rgba(22,163,74,0.36); --sx-ring: rgba(22,163,74,0.45); }
.sidebar-menu > li.spx-mi[data-spx="sms_note"] { --sx-ink: #b0acf3; --sx-deep: #443cc5; --sx-bg: rgba(79,70,229,0.28); --sx-bg-l: rgba(79,70,229,0.36); --sx-ring: rgba(79,70,229,0.45); }
.sidebar-menu > li.spx-mi[data-spx="sms_extact"] { --sx-ink: #ef9ec2; --sx-deep: #bc2266; --sx-bg: rgba(219,39,119,0.28); --sx-bg-l: rgba(219,39,119,0.36); --sx-ring: rgba(219,39,119,0.45); }
.sidebar-menu > li.spx-mi[data-spx="download"] { --sx-ink: #92cfc9; --sx-deep: #0b7f75; --sx-bg: rgba(13,148,136,0.28); --sx-bg-l: rgba(13,148,136,0.36); --sx-ring: rgba(13,148,136,0.45); }
.sidebar-menu > li.spx-mi[data-spx="project"] { --sx-ink: #bad692; --sx-deep: #578c0b; --sx-bg: rgba(101,163,13,0.28); --sx-bg-l: rgba(101,163,13,0.36); --sx-ring: rgba(101,163,13,0.45); }
.sidebar-menu > li.spx-mi[data-spx="edit"] { --sx-ink: #e39deb; --sx-deep: #a521b5; --sx-bg: rgba(192,38,211,0.28); --sx-bg-l: rgba(192,38,211,0.36); --sx-ring: rgba(192,38,211,0.45); }
.sidebar-menu > li.spx-mi[data-spx="chpass"] { --sx-ink: #d5b88f; --sx-deep: #8a5406; --sx-bg: rgba(161,98,7,0.28); --sx-bg-l: rgba(161,98,7,0.36); --sx-ring: rgba(161,98,7,0.45); }
.sidebar-menu > li.spx-mi[data-spx="logout"] { --sx-ink: #f299ad; --sx-deep: #c2193e; --sx-bg: rgba(225,29,72,0.28); --sx-bg-l: rgba(225,29,72,0.36); --sx-ring: rgba(225,29,72,0.45); }
html:not([data-icons="classic"]) .sidebar-menu > li.spx-mi > a > .spx-ico {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 30px; height: 30px; margin: -4px 8px -4px 0; border-radius: 8px; opacity: 1;
  color: var(--sx-ink); background: var(--sx-bg); box-shadow: inset 0 0 0 1px var(--sx-ring);
}
html[data-theme="light"]:not([data-icons="classic"]) .sidebar-menu > li.spx-mi > a > .spx-ico { background: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)), var(--sx-bg-l); }
html:not([data-icons="classic"]) .sidebar-menu > li.spx-mi > a > .spx-ico svg { width: 20px; height: 20px; stroke-width: 2.1; }
html:not([data-icons="classic"]) .sidebar-menu > li.spx-mi.spx-on > a > .spx-ico,
html:not([data-icons="classic"]) .sidebar-menu > li.spx-mi:hover > a > .spx-ico { color: var(--sx-deep); background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"]:not([data-icons="classic"]) .sidebar-menu > li.spx-mi.spx-on > a > .spx-ico,
html[data-theme="dark"]:not([data-icons="classic"]) .sidebar-menu > li.spx-mi:hover > a > .spx-ico { background: #eef2f5; }
/* collapsed 50px rail: link padding 13px + 3px border put the 30px tile at 16-46 px; pull it to about 10-40 */
@media (min-width: 768px) {
  html:not([data-icons="classic"]) .sidebar-mini.sidebar-collapse .sidebar-menu > li.spx-mi > a > .spx-ico { margin-left: -6px; }
}

/* ---- menu cards: tile colour = permission type, as with the old pictures (2026-09-24, user request) ----
   general menus (no class) keep the plain tile tint, staff menus (.bg-pink / .bg-red = module_type 2 / 3) the pink
   tile, report cards (.rh-card) the tint of their report kind (--rh-bg, pms_rpthub_ux.css). The new icon itself no
   longer paints a module pastel over the tile; its lines keep the module colour. */
.menu-box-icon .rms-ci,
html[data-theme="dark"] .menu-box-icon .rms-ci { background: transparent; }
html[data-theme="dark"] .menu-box-icon.bg-pink,
html[data-theme="dark"] .menu-box-icon.bg-red { background: rgba(236, 72, 153, 0.20) !important; }
html[data-theme="dark"] .menu-box-icon.bg-aqua { background: rgba(56, 189, 248, 0.20) !important; }
/* (report kind tints at 1.8x were here - superseded by the per-type block below, 2026-09-24) */

/* ---- tile + icon colour by permission type, stronger (2026-09-24, user: "the colours still blend") ----
   general = blue, staff (.bg-pink / .bg-red) = pink, report (.rh-card, favourites .bg-aqua) = green - one colour per type
   for the tile AND the icon lines (the module colour is left to the left menu and the section headings). This block wins
   over the per-kind report tints above; the kind still shows in the report card's tag. */
.menu-box-icon                                         { --tt-bg: #dbeafe; --tt-ink: #1d4ed8; }
.menu-box-icon.bg-pink, .menu-box-icon.bg-red          { --tt-bg: #fbcfe8; --tt-ink: #be185d; }
.menu-box-icon.bg-aqua, .rh-card .menu-box-icon        { --tt-bg: #d1fae5; --tt-ink: #047857; }
html[data-theme="dark"] .menu-box-icon                                                  { --tt-bg: rgba(59, 130, 246, 0.22); --tt-ink: #93c5fd; }
html[data-theme="dark"] .menu-box-icon.bg-pink, html[data-theme="dark"] .menu-box-icon.bg-red { --tt-bg: rgba(236, 72, 153, 0.26); --tt-ink: #f9a8d4; }
html[data-theme="dark"] .menu-box-icon.bg-aqua, html[data-theme="dark"] .rh-card .menu-box-icon { --tt-bg: rgba(16, 185, 129, 0.24); --tt-ink: #6ee7b7; }
html:not([data-icons="classic"]) .menu-box .menu-box-icon:has(> .rms-ci) { background: var(--tt-bg) !important; }   /* .menu-box: beats pms_rpthub_ux.css html[data-theme] .rh-card .menu-box-icon */
html:not([data-icons="classic"]) .menu-box-icon .rms-ci { color: var(--tt-ink); }
html:not([data-icons="classic"]) .menu-box-icon .rms-ci .d { opacity: 0.22; }


/* ---- menu card hover, KM5 style (2026-09-27; user: "like KM5" - KM5/assets/km-theme.css .km-tile) ----
   On hover: card lifts, border + shadow take the type colour, a light sweep crosses the card, the title takes the
   colour, a large faint copy of the icon springs into the bottom-right corner (span.rms-ci-wm, cloned by rms_ux.js on
   the first hover), the icon tile FILLS with the solid type colour + white icon, a ring pulses out of the tile and the
   icon keeps its own move while the pointer stays (KM5 loops these while hovered - user asked for KM5, see the motion
   memory: match a referenced design). The move fits the picture (data-mv). Lines re-draw once on entry.
   Type colours: general blue, staff (.bg-pink/.bg-red) pink, report (.rh-card, favourites .bg-aqua) green. */
.menu-box                                                                      { --cg-ink: #2563eb; --cg-ring: rgba(37, 99, 235, 0.35); --cg-txt: #1d4ed8; }
.menu-box:has(> .menu-box-icon.bg-pink), .menu-box:has(> .menu-box-icon.bg-red) { --cg-ink: #db2777; --cg-ring: rgba(219, 39, 119, 0.35); --cg-txt: #be185d; }
.menu-box:has(> .menu-box-icon.bg-aqua), .rh-card .menu-box                     { --cg-ink: #059669; --cg-ring: rgba(5, 150, 105, 0.35); --cg-txt: #047857; }
html[data-theme="dark"] .menu-box                                              { --cg-txt: #93c5fd; --cg-ring: rgba(96, 165, 250, 0.4); }
html[data-theme="dark"] .menu-box:has(> .menu-box-icon.bg-pink), html[data-theme="dark"] .menu-box:has(> .menu-box-icon.bg-red) { --cg-txt: #f9a8d4; --cg-ring: rgba(244, 114, 182, 0.4); }
html[data-theme="dark"] .menu-box:has(> .menu-box-icon.bg-aqua), html[data-theme="dark"] .rh-card .menu-box { --cg-txt: #6ee7b7; --cg-ring: rgba(52, 211, 153, 0.4); }

.menu-box { position: relative; isolation: isolate; }
.menu-box > .menu-box-icon, .menu-box > .info-box-content { position: relative; z-index: 1; }
html[data-theme] body .menu-box:hover {
  transform: translateY(-4px);
  border-color: var(--cg-ink) !important;
  box-shadow: 0 0 0 1px var(--cg-ink), 0 14px 30px -12px var(--cg-ring), 0 4px 14px -4px var(--cg-ring) !important;
}
body.fav-dragging .menu-box:hover { box-shadow: none !important; transform: none; }
.menu-box .info-box-content { transition: color 0.2s; }
.menu-box:hover .info-box-content { color: var(--cg-txt); }

/* large faint icon in the bottom-right corner */
.rms-ci-wm {
  position: absolute; right: -14px; bottom: -20px; z-index: 0; pointer-events: none;
  width: 92px; height: 92px; color: var(--cg-ink); opacity: 0;
  transform: translate(24px, 24px) rotate(-25deg) scale(0.6);
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rms-ci-wm svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rms-ci-wm svg .d { fill: currentColor; stroke: none; opacity: 0.6; }
.menu-box:hover > .rms-ci-wm { opacity: 0.12; transform: translate(0, 0) rotate(-12deg) scale(1); }
html[data-theme="dark"] .menu-box:hover > .rms-ci-wm { opacity: 0.16; color: var(--cg-txt); }
html[data-icons="classic"] .rms-ci-wm { display: none; }
/* 2026-09-28 (user: like KM5): the corner picture is a colourful cartoon of the same thing (rms_card_art.svg, drawn
   with its own colours - rms_ux.js adds .rms-ci-art), so it shows stronger than the one-colour copy */
.rms-ci-wm.rms-ci-art { width: 100px; height: 100px; right: -12px; bottom: -18px; }
.rms-ci-wm.rms-ci-art svg { fill: initial; stroke: none; overflow: visible; }
html[data-theme] .menu-box:hover > .rms-ci-wm.rms-ci-art { opacity: 0.3; }
html[data-theme="dark"] .menu-box:hover > .rms-ci-wm.rms-ci-art { opacity: 0.35; }
/* 2026-09-29 (user: text hard to read over the picture): picture sits further into the corner and the card text gets
   a halo in the card background colour, so letters stay clear where they cross the picture */
.rms-ci-wm.rms-ci-art { right: -22px; bottom: -26px; }
.menu-box { --cg-halo: #fff; }
html[data-theme="dark"] .menu-box { --cg-halo: #333; }
.menu-box.rms-ci-wm-on:hover .info-box-content {
  text-shadow: 0 0 2px var(--cg-halo), 0 0 4px var(--cg-halo), 0 0 8px var(--cg-halo), 0 0 12px var(--cg-halo);
}

/* icon tile: fills with the solid colour, white icon */
.menu-box .menu-box-icon { transition: background 0.25s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s; }
.menu-box .menu-box-icon .rms-ci { transition: color 0.25s; }
.menu-box:hover .menu-box-icon { transform: scale(1.08) rotate(-4deg); box-shadow: 0 8px 18px -6px var(--cg-ink); }
html:not([data-icons="classic"]) .menu-box:hover .menu-box-icon:has(> .rms-ci) { background: var(--cg-ink) !important; }
html:not([data-icons="classic"]) .menu-box:hover .menu-box-icon .rms-ci { color: #fff; }
html:not([data-icons="classic"]) .menu-box:hover .menu-box-icon .rms-ci .d { opacity: 0.3; }
.menu-box .menu-box-icon .rms-ci svg, .menu-box .menu-box-icon img { display: inline-block; transform-origin: 50% 50%; }

@media screen and (prefers-reduced-motion: no-preference) {
  /* light sweep across the card */
  .menu-box::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    transform: skewX(-18deg); opacity: 0;
  }
  html[data-theme="dark"] .menu-box::before { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.12), transparent); }
  .menu-box:hover::before { animation: rmsKmShine 0.8s ease-out; }

  /* ring pulsing out of the tile */
  .menu-box .menu-box-icon { position: relative; }
  .menu-box .menu-box-icon::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; pointer-events: none;
    border: 2px solid var(--cg-ink); opacity: 0;
  }
  .menu-box:hover .menu-box-icon::after { animation: rmsKmRing 1.2s ease-out infinite; }

  /* lines re-draw once on entry (every stroked sub-path of the 311 icons is under 100 units) */
  .menu-box:hover .menu-box-icon .rms-ci svg > :not(.d) { animation: rmsCiDraw 0.75s cubic-bezier(0.45, 0, 0.2, 1); }
  .menu-box:hover .menu-box-icon .rms-ci svg > .d { animation: rmsCiFill 0.6s ease-out 0.2s backwards; }

  /* the icon's own move while hovered: the move that fits the picture (data-mv, see the icon motion block below) */
  .menu-box:hover .menu-box-icon .rms-ci svg { animation: var(--mv-n, rmsKmBounce) var(--mv-d, 0.9s) var(--mv-e, ease) infinite; transform-origin: var(--mv-o, 50% 50%); }
  .menu-box:hover .menu-box-icon img { animation: rmsKmBounce 0.9s ease infinite; }

  body.fav-dragging .menu-box:hover::before,
  body.fav-dragging .menu-box:hover .menu-box-icon::after,
  body.fav-dragging .menu-box:hover .menu-box-icon * { animation: none; }

  @keyframes rmsKmShine { 0% { left: -60%; opacity: 0; } 20% { opacity: 1; } 100% { left: 130%; opacity: 0; } }
  @keyframes rmsKmRing  { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.45); } }
  @keyframes rmsCiDraw  { 0% { stroke-dasharray: 100; stroke-dashoffset: 100; } 100% { stroke-dasharray: 100; stroke-dashoffset: 0; } }
  @keyframes rmsCiFill  { 0% { opacity: 0; } }
  @keyframes rmsKmBounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 60% { transform: translateY(1px); } }
  @keyframes rmsKmNod    { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-3px) rotate(-8deg); } 75% { transform: translateY(-3px) rotate(8deg); } }
  @keyframes rmsKmFlip   { 0%, 100% { transform: perspective(120px) rotateY(0); } 50% { transform: perspective(120px) rotateY(180deg); } }
  @keyframes rmsKmSwing  { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
  @keyframes rmsKmJelly  { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(1.25, 0.75); } 45% { transform: scale(0.8, 1.2); } 60% { transform: scale(1.1, 0.9); } 75% { transform: scale(0.97, 1.03); } }
  @keyframes rmsKmHop    { 0%, 100% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.15, 0.85); } 45% { transform: translateY(-7px) scale(0.95, 1.05); } 70% { transform: translateY(0) scale(1.05, 0.95); } }
  @keyframes rmsKmShake  { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-14deg); } 30% { transform: rotate(12deg); } 45% { transform: rotate(-9deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }
  @keyframes rmsKmPop    { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.25) rotate(-10deg); } 55% { transform: scale(0.92) rotate(4deg); } }
}

/* ---- left-menu module icons on hover, KM5 style (2026-09-27; KM5/assets/km-theme.css "sidebar hover animations") ----
   KM5 plays the icon move ONCE per hover in the sidebar (the dashboard cards loop, the menu does not) - same here:
   the tile springs (scale + tilt), one ring pulses out in the module colour, the lines re-draw, the icon does the move
   that fits its picture (data-mv, icon motion block below) and the name slides 4px right (open rail only -
   in the collapsed rail the name is the fly-out). Staff rail .rms-mi and student/parent rail .spx-ico. */
.sidebar-menu .rms-mi, .sidebar-menu > li.spx-mi > a > .spx-ico { position: relative; }
.sidebar-menu .rms-mi, .sidebar-menu > li.spx-mi > a > .spx-ico { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s, color 0.25s, box-shadow 0.25s; }
.sidebar-menu > li:hover > a .rms-mi, .sidebar-menu > li.spx-mi:hover > a > .spx-ico { transform: scale(1.12) rotate(-6deg); }
body:not(.sidebar-collapse) .sidebar-menu > li > a > span:not(.pull-right):not(.label) { display: inline-block; transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
body:not(.sidebar-collapse) .sidebar-menu > li:hover > a > span:not(.pull-right):not(.label) { transform: translateX(4px); }

@media screen and (prefers-reduced-motion: no-preference) {
  /* one ring out of the tile */
  .sidebar-menu .rms-mi::after, .sidebar-menu > li.spx-mi > a > .spx-ico::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; pointer-events: none;
    border: 2px solid var(--mi-ink-d, var(--sx-ink)); opacity: 0;
  }
  .sidebar-menu > li.spx-mi > a > .spx-ico::after { border-color: var(--sx-ink); }
  .sidebar-menu > li:hover > a .rms-mi::after, .sidebar-menu > li.spx-mi:hover > a > .spx-ico::after { animation: rmsKmRing 0.9s ease-out; }

  /* lines re-draw once */
  .sidebar-menu > li:hover > a .rms-mi svg > :not(.d), .sidebar-menu > li.spx-mi:hover > a > .spx-ico svg > :not(.d) { animation: rmsCiDraw 0.7s cubic-bezier(0.45, 0, 0.2, 1); }
  .sidebar-menu > li:hover > a .rms-mi svg > .d { animation: rmsCiFill 0.5s ease-out 0.2s backwards; }

  /* the icon's own move, once per hover */
  .sidebar-menu .rms-mi svg, .sidebar-menu > li.spx-mi > a > .spx-ico svg { transform-origin: 50% 50%; }
  .sidebar-menu > li:hover > a .rms-mi svg, .sidebar-menu > li.spx-mi:hover > a > .spx-ico svg { animation: var(--mv-n, rmsKmBounce) var(--mv-d, 0.6s) var(--mv-e, ease) 1; transform-origin: var(--mv-o, 50% 50%); }
  html[data-icons="classic"] .sidebar-menu > li:hover > a img.rms-mi-old { animation: rmsKmBounce 0.6s ease; }
  @keyframes rmsKmExit { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(5px); } 60% { transform: translateX(2px); } 80% { transform: translateX(4px); } }
}

/* ---- icon motion that fits the picture (2026-09-27, user: the move should mean something for each icon) ----
   rms_menu_icons.php / rms_module_icons.php print data-mv on the icon span (menu cards: from the base shape the icon is
   drawn from, left menu: per module); the student rail maps li[data-spx] here. The span sets the move as variables
   (--mv-n name, --mv-d duration, --mv-e easing, --mv-o origin); the card rule loops it while hovered, the left menu plays it
   once. Most moves act in the first half and rest after, so a loop breathes. No data-mv = the plain bounce. */
[data-mv="nod"]     { --mv-n: rmsMvNod;     --mv-d: 1.1s; --mv-o: 50% 90%; }    /* person: nods */
[data-mv="hop"]     { --mv-n: rmsMvHop;     --mv-d: 1s;   --mv-o: 50% 100%; }   /* people, buildings: hop */
[data-mv="page"]    { --mv-n: rmsMvPage;    --mv-d: 1.3s; --mv-o: 50% 22%; }    /* calendar: a page flips over the top */
[data-mv="flip"]    { --mv-n: rmsMvFlip;    --mv-d: 1.5s; --mv-e: ease-in-out; } /* document, book: page turn */
[data-mv="turn"]    { --mv-n: rmsMvTurn;    --mv-d: 1.4s; --mv-e: cubic-bezier(0.5, 0, 0.3, 1); } /* card, coin, globe: spins round */
[data-mv="swing"]   { --mv-n: rmsMvSwing;   --mv-d: 1.3s; --mv-o: 50% 0; --mv-e: ease-in-out; } /* medal, picture, tag: hangs and swings */
[data-mv="cheer"]   { --mv-n: rmsMvCheer;   --mv-d: 1.1s; }                    /* trophy: raised up */
[data-mv="rise"]    { --mv-n: rmsMvRise;    --mv-d: 1s;   --mv-o: 50% 100%; }   /* board, tent: stands up */
[data-mv="toss"]    { --mv-n: rmsMvToss;    --mv-d: 1.4s; --mv-e: cubic-bezier(0.3, 0.7, 0.4, 1); } /* grad cap: thrown in the air */
[data-mv="lift"]    { --mv-n: rmsMvLift;    --mv-d: 1.1s; --mv-o: 50% 20%; }    /* briefcase, folder, wallet: picked up */
[data-mv="write"]   { --mv-n: rmsMvWrite;   --mv-d: 1s; }                      /* pencil: scribbles */
[data-mv="search"]  { --mv-n: rmsMvSearch;  --mv-d: 1.4s; --mv-e: ease-in-out; } /* magnifier: looks around */
[data-mv="tick"]    { --mv-n: rmsMvTick;    --mv-d: 1.2s; --mv-o: 50% 55%; }    /* clock: alarm rattle */
[data-mv="hflip"]   { --mv-n: rmsMvHflip;   --mv-d: 1.5s; --mv-e: cubic-bezier(0.34, 1.56, 0.64, 1); } /* hourglass: turned over */
[data-mv="swipe"]   { --mv-n: rmsMvSwipe;   --mv-d: 1s; }                      /* credit card: swiped */
[data-mv="grow"]    { --mv-n: rmsMvGrow;    --mv-d: 1.2s; --mv-o: 50% 88%; }    /* charts: bars grow up */
[data-mv="tip"]     { --mv-n: rmsMvTip;     --mv-d: 1.3s; --mv-o: 50% 30%; --mv-e: ease-in-out; } /* balance, gauge: tips side to side */
[data-mv="twist"]   { --mv-n: rmsMvTwist;   --mv-d: 1.2s; }                    /* pie chart: turns a slice */
[data-mv="zoom"]    { --mv-n: rmsMvZoom;    --mv-d: 1.1s; }                    /* scanner: focuses */
[data-mv="beat"]    { --mv-n: rmsMvBeat;    --mv-d: 1.1s; }                    /* heart, shield, fingerprint: beats */
[data-mv="jelly"]   { --mv-n: rmsKmJelly;   --mv-d: 1s; --mv-o: 50% 100%; }    /* database, server: squash */
[data-mv="spin"]    { --mv-n: rmsMvSpin;    --mv-d: 1.8s; --mv-e: cubic-bezier(0.45, 0, 0.25, 1); } /* gear, refresh: turns */
[data-mv="slide"]   { --mv-n: rmsMvSlide;   --mv-d: 1s; --mv-e: ease-in-out; }   /* sliders, lines: slide */
[data-mv="mirror"]  { --mv-n: rmsMvMirror;  --mv-d: 1.4s; --mv-e: ease-in-out; } /* swap arrows: change sides */
[data-mv="ring"]    { --mv-n: rmsMvRing;    --mv-d: 1.3s; --mv-o: 50% 12%; }    /* bell: rings */
[data-mv="drop"]    { --mv-n: rmsMvDrop;    --mv-d: 1.2s; --mv-e: ease-out; }    /* inbox, pin, download: drops in */
[data-mv="fly"]     { --mv-n: rmsMvFly;     --mv-d: 1.4s; --mv-e: ease-in-out; } /* paper plane: flies off and back */
[data-mv="pop"]     { --mv-n: rmsMvPop;     --mv-d: 1.1s; --mv-o: 20% 90%; }    /* chat bubble: pops */
[data-mv="shake"]   { --mv-n: rmsMvShake;   --mv-d: 1.1s; --mv-e: ease-in-out; } /* envelope, warning, ban: shakes */
[data-mv="shout"]   { --mv-n: rmsMvShout;   --mv-d: 1.1s; --mv-o: 30% 50%; }    /* megaphone: shouts */
[data-mv="power"]   { --mv-n: rmsMvPower;   --mv-d: 1.4s; }                    /* screen: switches off and on */
[data-mv="tap"]     { --mv-n: rmsMvTap;     --mv-d: 1s; }                      /* keyboard: typing */
[data-mv="drive"]   { --mv-n: rmsMvDrive;   --mv-d: 1.5s; --mv-e: ease-in-out; } /* car: drives off, comes back */
[data-mv="sleep"]   { --mv-n: rmsMvSleep;   --mv-d: 2.2s; --mv-o: 20% 90%; --mv-e: ease-in-out; } /* bed: sleepy lean */
[data-mv="orbit"]   { --mv-n: rmsMvOrbit;   --mv-d: 1.5s; --mv-o: 50% 60%; --mv-e: cubic-bezier(0.5, 0, 0.3, 1); } /* network, virus: turns */
[data-mv="key"]     { --mv-n: rmsMvKey;     --mv-d: 1.3s; --mv-o: 32% 65%; --mv-e: ease-in-out; } /* key: turns in the lock */
[data-mv="jiggle"]  { --mv-n: rmsMvJiggle;  --mv-d: 1s;   --mv-o: 50% 100%; }   /* lock, bin: jiggles */
[data-mv="float"]   { --mv-n: rmsMvFloat;   --mv-d: 2.2s; --mv-e: ease-in-out; } /* cloud: drifts */
[data-mv="twinkle"] { --mv-n: rmsMvTwinkle; --mv-d: 1.4s; --mv-e: cubic-bezier(0.34, 1.56, 0.64, 1); } /* star: twinkles */
[data-mv="wave"]    { --mv-n: rmsMvWave;    --mv-d: 1.2s; --mv-o: 20% 50%; --mv-e: ease-in-out; } /* flag: waves */
[data-mv="print"]   { --mv-n: rmsMvPrint;   --mv-d: 1s;   --mv-o: 50% 100%; }   /* printer: prints */
[data-mv="buzz"]    { --mv-n: rmsMvBuzz;    --mv-d: 1.2s; }                    /* phone: vibrates */
[data-mv="blink"]   { --mv-n: rmsMvBlink;   --mv-d: 1.6s; }                    /* eye: blinks */
[data-mv="exit"]    { --mv-n: rmsKmExit;    --mv-d: 1s; --mv-e: ease-in-out; }   /* door, logout: steps out */
[data-mv="flash"]   { --mv-n: rmsMvFlash;   --mv-d: 1.3s; }                    /* bulb, bolt: flashes */
[data-mv="drip"]    { --mv-n: rmsMvDrip;    --mv-d: 1.1s; --mv-o: 50% 100%; }   /* drop: drips */
[data-mv="bubble"]  { --mv-n: rmsMvBubble;  --mv-d: 1.1s; --mv-o: 50% 100%; }   /* flask: bubbles */

/* student / parent rail (menu-sidebar.php, icons drawn there) */
.sidebar-menu > li.spx-mi[data-spx="login_ok"]   { --mv-n: rmsMvHop;     --mv-d: 1s;   --mv-o: 50% 100%; }
.sidebar-menu > li.spx-mi[data-spx="learn"]      { --mv-n: rmsMvToss;    --mv-d: 1.4s; }
.sidebar-menu > li.spx-mi[data-spx="homework"]   { --mv-n: rmsMvWrite;   --mv-d: 1s; }
.sidebar-menu > li.spx-mi[data-spx="mailbox"]    { --mv-n: rmsMvShake;   --mv-d: 1.1s; }
.sidebar-menu > li.spx-mi[data-spx="caution"]    { --mv-n: rmsMvRing;    --mv-d: 1.3s; --mv-o: 50% 12%; }
.sidebar-menu > li.spx-mi[data-spx="assess"]     { --mv-n: rmsMvTwinkle; --mv-d: 1.4s; }
.sidebar-menu > li.spx-mi[data-spx="budget"]     { --mv-n: rmsMvTurn;    --mv-d: 1.4s; }
.sidebar-menu > li.spx-mi[data-spx="sms_note"]   { --mv-n: rmsMvFlip;    --mv-d: 1.5s; }
.sidebar-menu > li.spx-mi[data-spx="sms_extact"] { --mv-n: rmsMvCheer;   --mv-d: 1.1s; }
.sidebar-menu > li.spx-mi[data-spx="download"]   { --mv-n: rmsMvDrop;    --mv-d: 1.2s; }
.sidebar-menu > li.spx-mi[data-spx="project"]    { --mv-n: rmsMvLift;    --mv-d: 1.1s; }
.sidebar-menu > li.spx-mi[data-spx="edit"]       { --mv-n: rmsMvNod;     --mv-d: 1.1s; --mv-o: 50% 90%; }
.sidebar-menu > li.spx-mi[data-spx="chpass"]     { --mv-n: rmsMvKey;     --mv-d: 1.3s; --mv-o: 32% 65%; }
.sidebar-menu > li.spx-mi[data-spx="logout"]     { --mv-n: rmsKmExit;    --mv-d: 1s; }

@keyframes rmsMvNod     { 0%, 80%, 100% { transform: none; } 20% { transform: translateY(-2px) rotate(-12deg); } 42% { transform: rotate(9deg); } 62% { transform: rotate(-4deg); } }
@keyframes rmsMvHop     { 0%, 75%, 100% { transform: none; } 15% { transform: scale(1.14, 0.86); } 40% { transform: translateY(-7px) scale(0.94, 1.06); } 60% { transform: scale(1.08, 0.92); } }
@keyframes rmsMvPage    { 0%, 80%, 100% { transform: perspective(90px) rotateX(0); } 35% { transform: perspective(90px) rotateX(80deg); } 36% { transform: perspective(90px) rotateX(-80deg); } 62% { transform: perspective(90px) rotateX(10deg); } }
@keyframes rmsMvFlip    { 0% { transform: perspective(110px) rotateY(0); } 45%, 100% { transform: perspective(110px) rotateY(-360deg); } }
@keyframes rmsMvTurn    { 0% { transform: perspective(110px) rotateY(0); } 55%, 100% { transform: perspective(110px) rotateY(360deg); } }
@keyframes rmsMvSwing   { 0%, 85%, 100% { transform: none; } 15% { transform: rotate(18deg); } 35% { transform: rotate(-13deg); } 55% { transform: rotate(7deg); } 72% { transform: rotate(-3deg); } }
@keyframes rmsMvCheer   { 0%, 70%, 100% { transform: none; } 20% { transform: translateY(-6px) rotate(-10deg) scale(1.12); } 42% { transform: translateY(-6px) rotate(10deg) scale(1.12); } }
@keyframes rmsMvRise    { 0%, 75%, 100% { transform: none; } 15% { transform: scaleY(0.8); } 40% { transform: translateY(-4px) scaleY(1.1); } 58% { transform: translateY(1px) scaleY(0.97); } }
@keyframes rmsMvToss    { 0%, 80%, 100% { transform: none; } 40% { transform: translateY(-9px) rotate(-200deg); } 65% { transform: translateY(1px) rotate(-360deg); } 72% { transform: translateY(0) rotate(-360deg) scale(1.08, 0.92); } }
@keyframes rmsMvLift    { 0%, 78%, 100% { transform: none; } 22% { transform: translateY(-5px) rotate(-7deg); } 42% { transform: translateY(-5px) rotate(6deg); } 62% { transform: translateY(1px) scale(1.05, 0.95); } }
@keyframes rmsMvWrite   { 0%, 80%, 100% { transform: none; } 12% { transform: translate(-2px, 1px) rotate(-9deg); } 26% { transform: translate(2px, -1px) rotate(4deg); } 40% { transform: translate(-1px, 1px) rotate(-7deg); } 54% { transform: translate(3px, 0) rotate(3deg); } 66% { transform: translate(0, 0) rotate(-3deg); } }
@keyframes rmsMvSearch  { 0%, 100% { transform: none; } 20% { transform: translate(-3px, -2px) rotate(-6deg); } 42% { transform: translate(3px, -2px) rotate(6deg); } 62% { transform: translate(2px, 2px); } 80% { transform: translate(-2px, 1px); } }
@keyframes rmsMvTick    { 0%, 60%, 100% { transform: none; } 8% { transform: rotate(-13deg); } 16% { transform: rotate(11deg); } 24% { transform: rotate(-9deg); } 32% { transform: rotate(7deg); } 40% { transform: rotate(-4deg); } 48% { transform: rotate(2deg); } }
@keyframes rmsMvHflip   { 0% { transform: rotate(0); } 50%, 100% { transform: rotate(180deg); } }
@keyframes rmsMvSwipe   { 0%, 75%, 100% { transform: none; } 30% { transform: translateX(6px) rotate(-8deg); } 52% { transform: translateX(-3px) rotate(3deg); } }
@keyframes rmsMvGrow    { 0%, 90%, 100% { transform: none; } 18% { transform: scaleY(0.35); } 50% { transform: scaleY(1.18); } 72% { transform: scaleY(0.95); } }
@keyframes rmsMvTip     { 0%, 85%, 100% { transform: none; } 22% { transform: rotate(-13deg); } 48% { transform: rotate(10deg); } 70% { transform: rotate(-4deg); } }
@keyframes rmsMvTwist   { 0%, 75%, 100% { transform: none; } 38% { transform: rotate(90deg) scale(1.1); } }
@keyframes rmsMvZoom    { 0%, 75%, 100% { transform: none; } 22% { transform: scale(0.78); } 48% { transform: scale(1.18); } 62% { transform: scale(0.97); } }
@keyframes rmsMvBeat    { 0%, 62%, 100% { transform: none; } 14% { transform: scale(1.22); } 28% { transform: scale(0.98); } 42% { transform: scale(1.16); } }
@keyframes rmsMvSpin    { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
@keyframes rmsMvSlide   { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-1px); } }
@keyframes rmsMvMirror  { 0%, 90%, 100% { transform: scaleX(1); } 30%, 60% { transform: scaleX(-1); } }
@keyframes rmsMvRing    { 0%, 60%, 100% { transform: none; } 8% { transform: rotate(24deg); } 16% { transform: rotate(-21deg); } 24% { transform: rotate(16deg); } 32% { transform: rotate(-12deg); } 40% { transform: rotate(7deg); } 50% { transform: rotate(-3deg); } }
@keyframes rmsMvDrop    { 0% { transform: translateY(-10px); opacity: 0; } 28% { transform: translateY(0); opacity: 1; } 42% { transform: translateY(-3px); } 56%, 100% { transform: none; opacity: 1; } }
@keyframes rmsMvFly     { 0%, 100% { transform: none; opacity: 1; } 40% { transform: translate(14px, -14px) scale(0.7); opacity: 0; } 41% { transform: translate(-14px, 14px) scale(0.7); opacity: 0; } 75% { transform: none; opacity: 1; } }
@keyframes rmsMvPop     { 0%, 70%, 100% { transform: none; } 25% { transform: scale(1.26) rotate(-10deg); } 48% { transform: scale(0.92) rotate(4deg); } }
@keyframes rmsMvShake   { 0%, 70%, 100% { transform: none; } 10% { transform: rotate(-14deg); } 22% { transform: rotate(12deg); } 34% { transform: rotate(-9deg); } 46% { transform: rotate(6deg); } 58% { transform: rotate(-3deg); } }
@keyframes rmsMvShout   { 0%, 65%, 100% { transform: none; } 12% { transform: scale(1.16) rotate(-8deg); } 22% { transform: scale(1.16) rotate(6deg); } 32% { transform: scale(1.16) rotate(-6deg); } 44% { transform: scale(1.1) rotate(3deg); } }
@keyframes rmsMvPower   { 0%, 55%, 100% { transform: none; opacity: 1; } 15% { transform: scale(1, 0.08); opacity: 0.5; } 22% { transform: scale(0.1, 0.08); opacity: 0.3; } 38% { transform: scale(1.06, 1.06); opacity: 1; } }
@keyframes rmsMvTap     { 0%, 70%, 100% { transform: none; } 10%, 30%, 50% { transform: translateY(2px) scale(1, 0.95); } 20%, 40%, 60% { transform: none; } }
@keyframes rmsMvDrive   { 0%, 100% { transform: none; opacity: 1; } 12% { transform: translateX(-2px) rotate(2deg); } 40% { transform: translateX(16px); opacity: 0; } 41% { transform: translateX(-16px); opacity: 0; } 72% { transform: translateX(1px) rotate(-2deg); opacity: 1; } 82% { transform: none; } }
@keyframes rmsMvSleep   { 0%, 100% { transform: none; } 35%, 65% { transform: rotate(-7deg) translateY(1px); } }
@keyframes rmsMvOrbit   { 0% { transform: rotate(0); } 60%, 100% { transform: rotate(120deg); } }
@keyframes rmsMvKey     { 0%, 85%, 100% { transform: none; } 30%, 55% { transform: rotate(90deg); } }
@keyframes rmsMvJiggle  { 0%, 80%, 100% { transform: none; } 18% { transform: translateY(-2px) rotate(-9deg); } 36% { transform: rotate(8deg); } 54% { transform: rotate(-4deg); } 68% { transform: rotate(2deg); } }
@keyframes rmsMvFloat   { 0%, 100% { transform: none; } 35% { transform: translate(3px, -3px); } 70% { transform: translate(-3px, -1px); } }
@keyframes rmsMvTwinkle { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(144deg) scale(1.28); } 65%, 100% { transform: rotate(144deg) scale(1); } }
@keyframes rmsMvWave    { 0%, 100% { transform: none; } 25% { transform: skewY(-9deg) scaleX(0.93); } 50% { transform: skewY(7deg); } 75% { transform: skewY(-3deg) scaleX(0.97); } }
@keyframes rmsMvPrint   { 0%, 70%, 100% { transform: none; } 18% { transform: translateY(2px) scaleY(0.92); } 38% { transform: translateY(-3px); } 54% { transform: translateY(1px); } }
@keyframes rmsMvBuzz    { 0%, 50%, 100% { transform: none; } 5%, 15%, 25%, 35% { transform: translateX(-2px) rotate(-7deg); } 10%, 20%, 30%, 40% { transform: translateX(2px) rotate(7deg); } }
@keyframes rmsMvBlink   { 0%, 50%, 100% { transform: none; } 12% { transform: scaleY(0.08); } 22% { transform: none; } 32% { transform: scaleY(0.08); } 42% { transform: none; } }
@keyframes rmsMvFlash   { 0%, 65%, 100% { transform: none; opacity: 1; } 12% { opacity: 0.25; } 26% { opacity: 1; transform: scale(1.18); } 38% { opacity: 0.45; } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes rmsMvDrip    { 0%, 70%, 100% { transform: none; } 22% { transform: translateY(3px) scale(0.88, 1.12); } 44% { transform: scale(1.12, 0.88); } 58% { transform: scale(0.97, 1.03); } }
@keyframes rmsMvBubble  { 0%, 75%, 100% { transform: none; } 12% { transform: rotate(-11deg); } 26% { transform: rotate(10deg); } 40% { transform: rotate(-7deg); } 54% { transform: rotate(4deg); } 66% { transform: rotate(-2deg); } }

/* ---- menu cards: no underline under the title on hover (2026-09-27, user) - the underline comes from the <a> round the
   card (a:hover), so it is switched off on that link itself; the lit border already answers the pointer ---- */
a:has(> .menu-box):hover, a:has(> .menu-box):focus,
.menu-box a:hover, .menu-box a:focus, .menu-box-content a:hover { text-decoration: none !important; }

/* ---- module sub-menu list (pms_menu.php, .nav-stacked + .rms-ci-sm) on hover (2026-09-28, user: same animation here) ----
   Like the left menu: the small tile fills with the module colour + white icon, springs and tilts, one ring pulses out,
   the lines re-draw and the icon plays the move that fits its picture ONCE (data-mv, see the icon motion block); the
   name slides 4px right (padding, the name is a bare text node). */
.nav-stacked > li > a .rms-ci.rms-ci-sm {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
html[data-theme] .box .nav-stacked > li > a { transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); }
html[data-theme] .box .nav-stacked > li > a { padding-left: 10px; }
html[data-theme] .box .nav-stacked > li:not(.active) > a:hover { padding-left: 11px; }
html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm {
  color: #fff; background: var(--ci-ink); transform: scale(1.12) rotate(-6deg);
  box-shadow: 0 4px 10px -3px var(--ci-ink);
}
html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm .d { opacity: 0.3; }
@media screen and (prefers-reduced-motion: no-preference) {
  .nav-stacked > li > a .rms-ci.rms-ci-sm::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; pointer-events: none;
    border: 2px solid var(--ci-ink); opacity: 0;
  }
  html[data-theme="dark"] .nav-stacked > li > a .rms-ci.rms-ci-sm::after { border-color: var(--ci-ink-d); }
  .nav-stacked > li > a:hover .rms-ci.rms-ci-sm::after { animation: rmsKmRing 0.9s ease-out; }
  .nav-stacked > li > a:hover .rms-ci.rms-ci-sm svg > :not(.d) { animation: rmsCiDraw 0.7s cubic-bezier(0.45, 0, 0.2, 1); }
  .nav-stacked > li > a:hover .rms-ci.rms-ci-sm svg > .d { animation: rmsCiFill 0.5s ease-out 0.2s backwards; }
  .nav-stacked > li > a:hover .rms-ci.rms-ci-sm svg { animation: var(--mv-n, rmsKmBounce) var(--mv-d, 0.6s) var(--mv-e, ease) 1; transform-origin: var(--mv-o, 50% 50%); }
}

/* ---- module sub-menu: the icon flips over to its cartoon (2026-09-28, user: flip, then keep moving until the pointer
   leaves). rms_ux.js adds svg.rms-ci-toon (rms_card_art.svg#a-BASE) + .rms-ci-hastoon on the first hover. Half way
   through the flip the tile colour and line icon go and the cartoon shows; it then loops the move that fits its picture
   (data-mv) while hovered - a loop here because the user asked for it. Icons without a cartoon keep the block above. */
.rms-ci.rms-ci-sm .rms-ci-toon {
  position: absolute; left: -3px; top: -3px; width: 30px; height: 30px;
  fill: initial; stroke: none; overflow: visible; opacity: 0; pointer-events: none;
}
.rms-ci.rms-ci-sm .rms-ci-toon > use { animation: none !important; }
html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm.rms-ci-hastoon {
  background: transparent; box-shadow: none; transform: scale(1.1);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0s 0.22s, box-shadow 0s 0.22s;
}
html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm.rms-ci-hastoon > svg:not(.rms-ci-toon) { opacity: 0; transition: opacity 0s 0.22s; }
html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm.rms-ci-hastoon > svg.rms-ci-toon { opacity: 1; transition: opacity 0s 0.22s; }
/* the menu in use (li.active) shows its cartoon all the time (2026-09-29, user); rms_ux.js marks it .rms-ci-cur on
   load. On hover it does not flip, it only keeps its move going. */
html:not([data-icons="classic"]) .nav-stacked .rms-ci.rms-ci-sm.rms-ci-hastoon.rms-ci-cur { background: transparent; box-shadow: none; transition: none; }
html:not([data-icons="classic"]) .nav-stacked .rms-ci.rms-ci-sm.rms-ci-hastoon.rms-ci-cur > svg:not(.rms-ci-toon) { opacity: 0; transition: none; }
html:not([data-icons="classic"]) .nav-stacked .rms-ci.rms-ci-sm.rms-ci-hastoon.rms-ci-cur > svg.rms-ci-toon { opacity: 1; transition: none; }
@media screen and (prefers-reduced-motion: no-preference) {
  html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm.rms-ci-hastoon { animation: rmsToonFlip 0.45s ease-in-out; }
  html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm.rms-ci-hastoon > svg:not(.rms-ci-toon) { animation: none; }
  html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm.rms-ci-hastoon > svg.rms-ci-toon {
    animation: var(--mv-n, rmsKmBounce) var(--mv-d, 0.6s) var(--mv-e, ease) 0.5s infinite; transform-origin: var(--mv-o, 50% 50%);
  }
  html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm.rms-ci-hastoon.rms-ci-cur { animation: none; }
  html:not([data-icons="classic"]) .nav-stacked > li > a:hover .rms-ci.rms-ci-sm.rms-ci-hastoon.rms-ci-cur > svg.rms-ci-toon { animation-delay: 0s; }
  @keyframes rmsToonFlip {
    0%     { transform: perspective(120px) rotateY(0); }
    49.9%  { transform: perspective(120px) rotateY(90deg) scale(1.05); }
    50%    { transform: perspective(120px) rotateY(-90deg) scale(1.05); }
    100%   { transform: perspective(120px) rotateY(0) scale(1.1); }
  }
}

/* ---- staff left menu: the module tile flips over to its cartoon (2026-09-29, user: flip, move ONCE, then rest).
   rms_ux.js adds svg.rms-mi-toon + .rms-mi-hastoon on the first hover of a .sidebar-menu li. The ring still pulses at
   the start; half way through the flip the tile and line icon go, the cartoon shows and plays its data-mv move once.
   The current module (tile not hovered) keeps its light tile. */
.sidebar-menu .rms-mi .rms-mi-toon {
  position: absolute; left: -1px; top: -1px; width: 32px; height: 32px;
  fill: initial; stroke: none; overflow: visible; opacity: 0; pointer-events: none;
}
.sidebar-menu .rms-mi .rms-mi-toon > use { animation: none !important; }
html:not([data-icons="classic"])[data-theme] .sidebar-menu > li:hover > a .rms-mi.rms-mi-hastoon {
  background: transparent; box-shadow: none; transform: scale(1.08);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0s 0.22s, box-shadow 0s 0.22s;
}
html:not([data-icons="classic"]) .sidebar-menu > li:hover > a .rms-mi.rms-mi-hastoon > svg:not(.rms-mi-toon) { opacity: 0; transition: opacity 0s 0.22s; }
html:not([data-icons="classic"]) .sidebar-menu > li:hover > a .rms-mi.rms-mi-hastoon > svg.rms-mi-toon { opacity: 1; transition: opacity 0s 0.22s; }
/* the module in use shows its cartoon all the time (2026-09-29, user); rms_ux.js marks it .rms-mi-cur on page load.
   On hover it does not flip (already the cartoon), it only plays its move once. */
html:not([data-icons="classic"])[data-theme] .sidebar-menu .rms-mi.rms-mi-hastoon.rms-mi-cur { background: transparent; box-shadow: none; transition: none; }
html:not([data-icons="classic"]) .sidebar-menu .rms-mi.rms-mi-hastoon.rms-mi-cur > svg:not(.rms-mi-toon) { opacity: 0; transition: none; }
html:not([data-icons="classic"]) .sidebar-menu .rms-mi.rms-mi-hastoon.rms-mi-cur > svg.rms-mi-toon { opacity: 1; transition: none; }
@media screen and (prefers-reduced-motion: no-preference) {
  html:not([data-icons="classic"]) .sidebar-menu > li:hover > a .rms-mi.rms-mi-hastoon { animation: rmsToonFlipMi 0.45s ease-in-out; }
  html:not([data-icons="classic"]) .sidebar-menu > li:hover > a .rms-mi.rms-mi-hastoon > svg:not(.rms-mi-toon) { animation: none; }
  html:not([data-icons="classic"]) .sidebar-menu > li:hover > a .rms-mi.rms-mi-hastoon > svg.rms-mi-toon {
    animation: var(--mv-n, rmsKmBounce) var(--mv-d, 0.6s) var(--mv-e, ease) 0.45s 1; transform-origin: var(--mv-o, 50% 50%);
  }
  html:not([data-icons="classic"]) .sidebar-menu > li:hover > a .rms-mi.rms-mi-hastoon.rms-mi-cur { animation: none; }
  html:not([data-icons="classic"]) .sidebar-menu > li:hover > a .rms-mi.rms-mi-hastoon.rms-mi-cur > svg.rms-mi-toon { animation-delay: 0s; }
  @keyframes rmsToonFlipMi {
    0%     { transform: perspective(140px) rotateY(0); }
    49.9%  { transform: perspective(140px) rotateY(90deg) scale(1.04); }
    50%    { transform: perspective(140px) rotateY(-90deg) scale(1.04); }
    100%   { transform: perspective(140px) rotateY(0) scale(1.08); }
  }
}

/* Thin line icons (2026-09-28). One stroke weight for every outline icon: the 24-unit
   inline SVGs (header, menu rail, menu cards, chips, page layers) used 1.9 - 2.4, which
   looked heavy and soft on screen. A CSS stroke-width beats the stroke-width attribute on
   the svg, while a child that sets its own (the 2.8 chat dots) keeps it. Change the number
   in --ux-icon-sw to make every icon thinner or bolder; delete this block for the old look. */
html { --ux-icon-sw: 1.6; }
svg[viewBox="0 0 24 24"][stroke="currentColor"],
.main-header .rms-hico,
.sidebar-menu .rms-mi svg,
.menu-box-icon .rms-ci svg,
.rms-ci.rms-ci-sm svg,
.rms-mi-chip svg, .rms-mi-sec svg, .rh-hero-ico .rms-hero-svg,
.rms-mailico svg,
html:not([data-icons="classic"]) .sidebar-menu > li.spx-mi > a > .spx-ico svg { stroke-width: var(--ux-icon-sw); }
.rms-qrico svg { stroke-width: calc(var(--ux-icon-sw) - 0.2); }

/* Unread / to-do count on menu cards (2026-09-28). pms_home.php + widget-favorite.php print
   <span class="info-box-number"><small>label</small> <b class="mbx-cnt">N</b></span> under the
   card name. The label turns into a quiet line with a small dot in the card colour, the number
   into a solid pill (blue / pink / green like the card, --cg-ink). One pop when the page opens,
   a small lift on hover, nothing that keeps moving. Delete this block for the old bold text. */
.menu-box .info-box-number {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
  margin-top: 6px; font-size: 13px; font-weight: 600; line-height: 1.3;
}
.menu-box .info-box-number small {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #64748b;
}
.menu-box .info-box-number small::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cg-ink, #2563eb); box-shadow: 0 0 0 3px var(--cg-ring, rgba(37, 99, 235, 0.35));
}
html[data-theme="dark"] .menu-box .info-box-number small { color: #aab4c3; }
.menu-box .mbx-cnt {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  min-width: 28px; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--cg-ink, #2563eb); color: #fff;
  font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 14px -6px var(--cg-ink, #2563eb), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.menu-box:hover .mbx-cnt {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 8px 18px -6px var(--cg-ink, #2563eb), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
@media screen and (prefers-reduced-motion: no-preference) {
  .menu-box .mbx-cnt { animation: rmsCntPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards; }
}
@keyframes rmsCntPop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---- collapsed left rail: the module name that flies out on hover (2026-09-29, user: some animation on the bar) ----
   Once per hover the name slides in from the left and fades in; the bar itself stays still (user picked this after the
   light sweep and the left-edge glow). text-indent + text-fill-color, because the light theme sets color with
   !important, which an animation cannot override. Nothing loops. Both themes. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right) {
    overflow: hidden;
    animation: rmsFlyText 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  @keyframes rmsFlyText { 0% { text-indent: -14px; -webkit-text-fill-color: transparent; } 100% { text-indent: 0; -webkit-text-fill-color: currentcolor; } }
}

/* left menu: no coloured stripe on the left edge of a hovered / active row, both themes (2026-09-29, user) */
html[data-theme] .sidebar-menu > li:hover > a, html[data-theme] .sidebar-menu > li.active > a { border-left-color: transparent; }

