/* ============================================================
   Q-Service — Signature polish layer
   App-wide "first impression" design: navbar identity, page
   transitions, staggered entrances, micro-interactions.
   Everything here is transform/opacity-based (GPU-friendly),
   RTL-aware, and fully disabled under prefers-reduced-motion.
   Loaded from _Layout.cshtml AFTER the theme css so it wins ties.
   ============================================================ */

:root {
    --qs-sig-accent: var(--qs-accent-cyan);   /* cyan  */
    --qs-sig-accent-2: var(--qs-accent-indigo); /* indigo */
    --qs-sig-accent-3: var(--qs-accent-amber); /* amber */
    --qs-sig-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------------------------------------------------------
   1. NAVBAR — living gradient + depth
   --------------------------------------------------------- */
.navbar.navbar-dark {
    background: linear-gradient(115deg, var(--qs-primary-hover), var(--qs-primary-600) 38%, var(--qs-primary) 62%, var(--qs-primary-hover)) !important;
    background-size: 240% 240% !important;
    animation: qsNavSheen 22s ease-in-out infinite;
    border-bottom: 1px solid rgba(var(--qs-white-rgb), .10);
    box-shadow: 0 3px 18px rgba(var(--qs-shadow-rgb), .35);
}

@keyframes qsNavSheen {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar-brand-link {
    letter-spacing: .4px;
    transition: text-shadow .3s ease;
    display: flex;
    align-items: center;
    gap: var(--qs-space-3);
}

.navbar-brand-link:hover {
    text-shadow: 0 0 18px rgba(var(--qs-white-rgb), .55);
}

/* NOTE: the theme's bootstrap_limitless.css has `.navbar-brand img { height:1rem }`
   which is MORE specific than a bare `.navbar-brand-logo` and was squashing the
   logo to 46x16 (a flat oval). We must match/beat that specificity, hence the
   `.navbar-brand img.navbar-brand-logo` selector + !important on the box metrics. */
.navbar-brand img.navbar-brand-logo,
.navbar-brand-logo {
    width: 34px !important;
    height: 34px !important;
    object-fit: contain;
    border-radius: 9px;
    background: var(--qs-surface);
    box-shadow: 0 2px 10px rgba(var(--qs-shadow-rgb), .30), 0 0 0 1px rgba(var(--qs-shadow-rgb), .06);
    transition: transform .25s ease;
    display: block;
}

.navbar-brand-link:hover .navbar-brand-logo {
    transform: scale(1.05);
}

/* ---- Brand mark: entrance + pulse ring (wrappers added in _Layout.cshtml) ----

   Uses the expanding box-shadow ping the unread badge already uses, on the cyan accent the
   sidebar rail and section headers share. An earlier attempt here used a radial-gradient
   halo on a z-index:-1 pseudo-element; it was effectively invisible against the navbar
   gradient, so it was replaced with this. box-shadow is also the safe property to animate
   on this element — the mark carries no shadow of its own, so nothing gets clobbered.

   Deliberately NOT the avatar's rotating conic ring: two spinning rings sitting side by
   side in one navbar would compete for the eye. */
.navbar-brand-mark {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    border-radius: 9px;   /* matches the logo tile so the ring hugs its edge */
    animation: qsBrandIn .7s var(--qs-sig-ease) both .1s,
               qsBrandPing 4s ease-out 1.4s infinite;
}

@keyframes qsBrandPing {
    0%   { box-shadow: 0 0 0 0    rgba(var(--qs-accent-cyan-rgb), .60); }
    55%  { box-shadow: 0 0 0 13px rgba(var(--qs-accent-cyan-rgb), 0); }
    100% { box-shadow: 0 0 0 13px rgba(var(--qs-accent-cyan-rgb), 0); }
}

/* Wordmark follows the mark by a beat, so the brand assembles rather than just appearing. */
.navbar-brand-name {
    display: inline-block;
    animation: qsBrandNameIn .6s var(--qs-sig-ease) both .3s;
}

html.is-rtl .navbar-brand-name,
[dir="rtl"] .navbar-brand-name {
    animation-name: qsBrandNameInRtl;
}

@keyframes qsBrandIn {
    from { opacity: 0; transform: scale(.6) rotate(-12deg); }
    to   { opacity: 1; transform: none; }
}

@keyframes qsBrandNameIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes qsBrandNameInRtl {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: none; }
}

.app-footer__brand-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: var(--qs-radius-md);
    vertical-align: middle;
    box-shadow: 0 1px 4px rgba(var(--qs-shadow-rgb), .25), 0 0 0 1px rgba(var(--qs-shadow-rgb), .06);
}

/* ---------------------------------------------------------
   2. AVATAR — rotating gradient ring
   --------------------------------------------------------- */
.qs-avatar-ring {
    position: relative;
    display: inline-flex;
    border-radius: var(--qs-radius-circle);
    padding: 3px;
    isolation: isolate;
}

.qs-avatar-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--qs-radius-circle);
    background: conic-gradient(var(--qs-sig-accent), var(--qs-sig-accent-2), var(--qs-sig-accent-3), var(--qs-sig-accent));
    animation: qsRingSpin 6s linear infinite;
    z-index: -1;
}

@keyframes qsRingSpin {
    to { transform: rotate(360deg); }
}

.user-menu-trigger img {
    transition: transform .25s var(--qs-sig-ease);
    display: block;
}

.user-menu-trigger:hover img {
    transform: scale(1.07);
}

/* ---------------------------------------------------------
   3. NOTIFICATION BELL — swing + badge ping
   --------------------------------------------------------- */
.notification-bell-btn i {
    display: inline-block;
    transform-origin: top center;
    transition: transform .2s ease;
}

.notification-bell-btn:hover i {
    transform: rotate(12deg);
}

/* periodic nudge — class toggled by qs-signature.js while unread > 0.
   Scoped to the bell button only so icons inside the open dropdown never swing. */
.qs-bell-swing .notification-bell-btn i {
    animation: qsBellSwing .9s var(--qs-sig-ease);
}

@keyframes qsBellSwing {
    0%   { transform: rotate(0); }
    20%  { transform: rotate(14deg); }
    40%  { transform: rotate(-10deg); }
    60%  { transform: rotate(6deg); }
    80%  { transform: rotate(-4deg); }
    100% { transform: rotate(0); }
}

.notification-badge {
    animation: qsBadgePop .45s var(--qs-sig-ease);
}

/* soft expanding ping ring behind the unread badge */
.notification-bell-wrapper {
    position: relative;
}

.notification-badge::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(var(--qs-danger-rgb), .55);
    animation: qsBadgePing 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes qsBadgePop {
    0%   { transform: scale(.3); }
    60%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

@keyframes qsBadgePing {
    0%   { box-shadow: 0 0 0 0 rgba(var(--qs-danger-rgb), .55); }
    70%  { box-shadow: 0 0 0 9px rgba(var(--qs-danger-rgb), 0); }
    100% { box-shadow: 0 0 0 9px rgba(var(--qs-danger-rgb), 0); }
}

/* ---------------------------------------------------------
   4. LANGUAGE PILL — glass chip
   --------------------------------------------------------- */
.language-selector > .navbar-nav-link {
    background: rgba(var(--qs-white-rgb), .10);
    border: 1px solid rgba(var(--qs-white-rgb), .28);
    border-radius: var(--qs-radius-pill);
    padding: 6px var(--qs-space-4) !important;
    transition: background .25s ease, box-shadow .25s ease, transform .25s var(--qs-sig-ease);
}

.language-selector > .navbar-nav-link:hover {
    background: rgba(var(--qs-white-rgb), .20);
    box-shadow: 0 0 14px rgba(var(--qs-white-rgb), .25);
    transform: translateY(-1px);
}

/* ---------------------------------------------------------
   5. TOP PROGRESS BAR — navigation feedback
   --------------------------------------------------------- */
#qsTopBar {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    height: 3px;
    width: 0;
    z-index: 99999;
    /* Brand colors: navbar blues sweeping into the logo yellow, so the top line
       and the center Q logo read as one system. */
    background: linear-gradient(90deg, var(--qs-primary), var(--qs-primary-600) 45%, var(--qs-primary) 70%, var(--qs-brand-yellow));
    background-size: 200% 100%;
    animation: qsBarShimmer 1.2s linear infinite;
    box-shadow: 0 0 10px rgba(var(--qs-primary-rgb), .7);
    opacity: 0;
    pointer-events: none;
}

#qsTopBar.qs-creep {
    opacity: 1;
    width: 82%;
    transition: width 7s cubic-bezier(.05, .6, .2, 1), opacity .15s ease;
}

#qsTopBar.qs-done {
    opacity: 1;
    width: 100%;
    transition: width .35s ease-out;
}

#qsTopBar.qs-fade {
    opacity: 0;
    width: 100%;
    transition: opacity .45s ease .15s;
}

@keyframes qsBarShimmer {
    to { background-position: -200% 0; }
}

/* ---------------------------------------------------------
   6. PAGE ENTRANCE — content rise + card stagger
   --------------------------------------------------------- */
.qs-page-enter {
    /* fill-mode is `backwards` (NOT `both`/`forwards`): a FORWARD-filling animation on
       transform/opacity leaves .content a PERMANENT stacking context in Chrome even after it
       finishes — which trapped every modal (z-index 1050) inside .content BELOW the body-level
       .modal-backdrop (z-index 1040), so the backdrop painted over the open popup and froze the
       page. `backwards` still fills the start state (no opacity flash before the rise) but applies
       NO fill after completion, so .content stops being a stacking context and modals render above
       their backdrop normally. */
    animation: qsPageRise .42s var(--qs-sig-ease) backwards;
}

@keyframes qsPageRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.qs-stagger {
    opacity: 0;
    animation: qsCardIn .5s var(--qs-sig-ease) forwards;
    animation-delay: calc(var(--qs-i, 0) * 70ms);
}

@keyframes qsCardIn {
    from { opacity: 0; transform: translateY(16px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------
   7. MICRO-INTERACTIONS
   --------------------------------------------------------- */
/* buttons: lift + press */
.btn {
    transition: transform .18s var(--qs-sig-ease), box-shadow .18s ease,
                background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.btn:not(:disabled):active {
    transform: translateY(0) scale(.98);
}

/* click ripple (span injected by qs-signature.js) */
.qs-ripple-host {
    position: relative;
    overflow: hidden;
}

.qs-ripple {
    position: absolute;
    border-radius: var(--qs-radius-circle);
    background: rgba(var(--qs-white-rgb), .45);
    transform: scale(0);
    animation: qsRipple .55s ease-out forwards;
    pointer-events: none;
}

@keyframes qsRipple {
    to { transform: scale(2.6); opacity: 0; }
}

/* dropdown menus: soft pop.
   The slide+scale variant is ONLY for navbar dropdowns (Bootstrap positions
   those statically). Popper-positioned dropdowns elsewhere carry an inline
   `transform` for placement — animating transform there would misplace the
   menu mid-animation — so they get an opacity-only fade instead. */
.dropdown-menu.show {
    animation: qsFadeIn .18s ease;
}

.navbar .dropdown-menu.show {
    animation: qsDropIn .2s var(--qs-sig-ease);
    transform-origin: top;
}

@keyframes qsFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes qsDropIn {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

/* sidebar: icon nudge on hover (direction-aware) */
.nav-sidebar .nav-link i {
    transition: transform .18s var(--qs-sig-ease);
}

.nav-sidebar .nav-link:hover i {
    transform: translateX(3px);
}

html.is-rtl .nav-sidebar .nav-link:hover i,
[dir="rtl"] .nav-sidebar .nav-link:hover i {
    transform: translateX(-3px);
}

/* ---------------------------------------------------------
   7b. SIDEBAR — entrance cascade + active-item identity
   --------------------------------------------------------- */
/* menu items cascade in on page load (class + --qs-i set by qs-signature.js) */
.qs-side-in {
    opacity: 0;
    animation: qsSideItemIn .38s var(--qs-sig-ease) forwards;
    animation-delay: calc(var(--qs-i, 0) * 35ms);
}

@keyframes qsSideItemIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* active item: glowing gradient accent bar that scales in (direction-aware
   via inset-inline-start; purely absolute-positioned so it can never affect
   the sidebar's strict row-fit layout) */
.nav-sidebar .nav-link {
    position: relative;
}

.nav-sidebar > .nav-item > .nav-link.active::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 18%;
    bottom: 18%;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--qs-sig-accent), var(--qs-sig-accent-2));
    box-shadow: 0 0 10px rgba(var(--qs-accent-cyan-rgb), .75);
    animation: qsAccentGrow .3s var(--qs-sig-ease);
}

@keyframes qsAccentGrow {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}

/* submenu items cascade each time a group is expanded (the theme toggles
   .nav-item-open on the parent li; `backwards` fill keeps items hidden
   through their delay) */
.nav-sidebar .nav-item-open > .nav-group-sub > .nav-item {
    animation: qsSideItemIn .3s var(--qs-sig-ease) backwards;
}

.nav-sidebar .nav-item-open > .nav-group-sub > .nav-item:nth-child(1) { animation-delay: 30ms; }
.nav-sidebar .nav-item-open > .nav-group-sub > .nav-item:nth-child(2) { animation-delay: 70ms; }
.nav-sidebar .nav-item-open > .nav-group-sub > .nav-item:nth-child(3) { animation-delay: 110ms; }
.nav-sidebar .nav-item-open > .nav-group-sub > .nav-item:nth-child(4) { animation-delay: 150ms; }
.nav-sidebar .nav-item-open > .nav-group-sub > .nav-item:nth-child(5) { animation-delay: 190ms; }
.nav-sidebar .nav-item-open > .nav-group-sub > .nav-item:nth-child(6) { animation-delay: 230ms; }

/* ---------------------------------------------------------
   7c. DASHBOARD HERO — welcome strip (markup: _DashboardHero.cshtml)
   --------------------------------------------------------- */
.qs-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--qs-radius-xl);
    background: linear-gradient(120deg, var(--qs-primary-hover), var(--qs-primary) 45%, var(--qs-primary-600) 75%, var(--qs-primary-hover));
    background-size: 220% 220%;
    animation: qsNavSheen 18s ease-in-out infinite;
    color: var(--qs-nav-fg);
    box-shadow: 0 10px 30px rgba(var(--qs-shadow-rgb), .35);
}

.qs-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 22px 28px;
}

.qs-hero-greet {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .2px;
    animation: qsCardIn .55s var(--qs-sig-ease) both .1s;
}

.qs-hero-date {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(var(--qs-white-rgb), .75);
    animation: qsCardIn .55s var(--qs-sig-ease) both .25s;
}

.qs-hero-clock {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 1.5px;
    font-variant-numeric: tabular-nums;
    padding: 10px 22px;
    border-radius: 14px;
    background: rgba(var(--qs-white-rgb), .12);
    border: 1px solid rgba(var(--qs-white-rgb), .22);
    box-shadow: inset 0 0 20px rgba(var(--qs-white-rgb), .06);
    animation: qsCardIn .55s var(--qs-sig-ease) both .35s;
}

.qs-hero-wave {
    display: inline-block;
    animation: qsWave 2.4s ease-in-out .8s 2;
    transform-origin: 70% 70%;
}

@keyframes qsWave {
    0%, 100% { transform: rotate(0); }
    10% { transform: rotate(16deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(0); }
}

.qs-hero-orb {
    position: absolute;
    border-radius: var(--qs-radius-circle);
    background: rgba(var(--qs-white-rgb), .07);
    pointer-events: none;
}

.qs-hero-orb-a {
    width: 220px; height: 220px;
    top: -110px; inset-inline-end: 8%;
    animation: qsOrbFloat 12s ease-in-out infinite;
}

.qs-hero-orb-b {
    width: 140px; height: 140px;
    bottom: -70px; inset-inline-start: 22%;
    animation: qsOrbFloat 16s ease-in-out infinite reverse;
}

/* Signature light band — mirrors the sign-in screen's sweep so the same brand moment
   carries from login into the dashboard. Loops with a long deliberate pause: the sweep
   occupies only the first fifth of the cycle, the rest parks the band off-screen at
   opacity 0, so the restart is invisible and it never reads as a nervous flicker.
   Physical `left` (not inset-inline-start) on purpose — the band should always travel
   left-to-right regardless of text direction, matching the sign-in screen. */
.qs-hero-sheen {
    position: absolute;
    top: -40%;
    bottom: -40%;
    left: 0;
    width: 26%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .16) 50%,
        rgba(var(--qs-white-rgb), 0) 100%);
    transform: translateX(-220%) skewX(-14deg);
    animation: qsHeroSheen 11s cubic-bezier(.45, 0, .2, 1) 1.2s infinite;
}

@keyframes qsHeroSheen {
    0%   { transform: translateX(-220%) skewX(-14deg); opacity: 0; }
    4%   { opacity: 1; }
    18%  { opacity: 1; }
    22%  { transform: translateX(520%) skewX(-14deg); opacity: 0; }
    100% { transform: translateX(520%) skewX(-14deg); opacity: 0; }
}

/* Rotating emblem, echoing the sign-in orbit. The rings are DASHED for a reason: a plain
   solid circle rotating about its own centre shows no visible motion at all — the dashes
   are what make the rotation legible. Centring lives inside the keyframes because
   `transform` is one property, so animating rotate() alone would drop the translate()
   and fling each ring to the corner. */
.qs-hero-emblem {
    position: absolute;
    top: 50%;
    inset-inline-end: 22%;
    width: 0;
    height: 0;
    z-index: 0;
    pointer-events: none;
}

.qs-hero-emblem__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: var(--qs-radius-circle);
    border: 1.5px dashed rgba(var(--qs-white-rgb), .18);
}

.qs-hero-emblem__ring--o {
    width: 190px; height: 190px;
    animation: qsEmblemCW 34s linear infinite;
}

.qs-hero-emblem__ring--i {
    width: 118px; height: 118px;
    border-color: rgba(var(--qs-white-rgb), .13);
    animation: qsEmblemCCW 26s linear infinite;
}

/* Rides the outer ring, so it must live inside it. */
.qs-hero-emblem__dot {
    position: absolute;
    top: -5px;
    left: calc(50% - 5px);
    width: 10px; height: 10px;
    border-radius: var(--qs-radius-circle);
    background: rgba(var(--qs-white-rgb), .75);
    box-shadow: 0 0 12px rgba(var(--qs-white-rgb), .55);
}

@keyframes qsEmblemCW {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes qsEmblemCCW {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes qsOrbFloat {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-18px, 16px) scale(1.08); }
}

/* KPI tile icon: playful tilt on hover (direction-aware) */
.dash-card .dash-card-icon {
    transition: transform .25s var(--qs-sig-ease);
}

.dash-card:hover .dash-card-icon {
    transform: scale(1.14) rotate(-8deg);
}

html.is-rtl .dash-card:hover .dash-card-icon,
[dir="rtl"] .dash-card:hover .dash-card-icon {
    transform: scale(1.14) rotate(8deg);
}

/* KPI tile: a band of light crosses the tile on hover, pairing with the icon tilt above.
   Triggered by hover rather than run ambiently — a dashboard full of tiles all glinting on
   their own would be noise, but a single tile answering the cursor reads as quality.
   .dash-card already carries position:relative + overflow:hidden (see Home/Index.cshtml),
   so the band is clipped to the tile's rounded corners for free. */
.dash-card::after {
    content: "";
    position: absolute;
    top: -60%;
    bottom: -60%;
    left: 0;
    width: 40%;
    pointer-events: none;   /* the tile is an <a> — this must never eat the click */
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .22) 50%,
        rgba(var(--qs-white-rgb), 0) 100%);
    transform: translateX(-200%) skewX(-16deg);
    opacity: 0;
}

.dash-card:hover::after {
    animation: qsTileShine .75s var(--qs-sig-ease) forwards;
}

@keyframes qsTileShine {
    0%   { transform: translateX(-200%) skewX(-16deg); opacity: 1; }
    100% { transform: translateX(330%) skewX(-16deg); opacity: 0; }
}

/* ---------------------------------------------------------
   7d. DATATABLES — global skin + row entrance
   --------------------------------------------------------- */
/* per-draw row cascade (class + --qs-i set by qs-signature.js on draw.dt) */
.qs-row-in {
    opacity: 0;
    animation: qsRowIn .32s var(--qs-sig-ease) forwards;
    animation-delay: calc(var(--qs-i, 0) * 30ms);
}

@keyframes qsRowIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* row hover tint for plain tables (card-row tables have their own hover) */
.dataTables_wrapper table.dataTable:not(.qs-card-rows) tbody tr {
    transition: background-color .15s ease;
}

.dataTables_wrapper table.dataTable:not(.qs-card-rows) tbody tr:hover > td {
    background-color: rgba(var(--qs-primary-rgb), .06);
}

/* sorted column: cyan accent underline on the brand-blue header */
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    box-shadow: inset 0 -3px 0 var(--qs-sig-accent);
}

/* pagination: pill buttons with lift */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--qs-radius-md) !important;
    transition: transform .15s var(--qs-sig-ease), box-shadow .15s ease,
                background-color .2s ease, color .2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:not(.disabled):hover {
    transform: translateY(-1px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    box-shadow: 0 4px 12px rgba(var(--qs-primary-rgb), .35);
}

/* search box + page-length select: rounded with focus ring */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: var(--qs-radius-md);
    transition: box-shadow .2s ease, border-color .2s ease;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    box-shadow: 0 0 0 3px rgba(var(--qs-primary-rgb), .15);
    border-color: var(--qs-primary-600);
    outline: none;
}

/* processing indicator: floating pill */
.dataTables_wrapper .dataTables_processing {
    background: rgba(var(--qs-white-rgb), .94);
    border: 0;
    border-radius: var(--qs-radius-lg);
    box-shadow: 0 10px 34px rgba(var(--qs-shadow-rgb), .2);
    color: var(--qs-primary);
    font-weight: 700;
}

/* empty-table cell: calmer */
table.dataTable td.dataTables_empty {
    padding: 34px var(--qs-space-3);
    color: var(--qs-text-faint);
}

/* ---------------------------------------------------------
   8. ACCESSIBILITY — motion off switch
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .navbar.navbar-dark,
    .navbar-brand-mark,
    .navbar-brand-name,
    .qs-avatar-ring::before,
    .qs-bell-swing .notification-bell-btn i,
    .notification-badge,
    .notification-badge::after,
    #qsTopBar,
    .qs-page-enter,
    .qs-stagger,
    .qs-side-in,
    .qs-row-in,
    .qs-hero,
    .qs-hero-greet,
    .qs-hero-date,
    .qs-hero-clock,
    .qs-hero-wave,
    .qs-hero-orb,
    .qs-hero-sheen,
    .qs-hero-emblem__ring,
    .dash-card:hover::after,
    .nav-sidebar > .nav-item > .nav-link.active::before,
    .nav-sidebar .nav-item-open > .nav-group-sub > .nav-item,
    .dropdown-menu.show,
    .qs-ripple {
        animation: none !important;
    }

    .qs-stagger { opacity: 1; }
    .qs-side-in { opacity: 1; }
    .qs-row-in { opacity: 1; }
    .qs-hero-greet, .qs-hero-date, .qs-hero-clock { opacity: 1; }

    /* Entrance animations use fill-mode `both`, so killing them strands the element at the
       keyframe's `from` state (invisible / shrunk). These must be reset explicitly. */
    .navbar-brand-mark,
    .navbar-brand-name { opacity: 1; transform: none; }

    /* Drop the moving decoration entirely rather than freezing it mid-sweep. */
    .navbar-brand-mark { box-shadow: none !important; }
    .qs-hero-sheen { display: none; }
    .dash-card::after { display: none; }
    /* The rings still need their centring transform once the animation is off, or they
       would sit at the corner instead of around the emblem's anchor point. */
    .qs-hero-emblem__ring { transform: translate(-50%, -50%); }

    .btn,
    .user-menu-trigger img,
    .language-selector > .navbar-nav-link,
    .nav-sidebar .nav-link i {
        transition: none !important;
    }
}
