/* ============================================
   SportMans RTL CSS Overrides
   Applied when [dir="rtl"] is set on <html>
   ============================================
   This file flips all physical properties
   (left/right, margin-left/right, padding-left/right,
   border-radius, transforms) that SportMans's CSS uses
   instead of CSS logical properties.
   ============================================ */

/* ============================================================
   1. GLOBAL TAILWIND UTILITY SWAPS
   These swap physical left/right utilities for RTL.
   Using !important to override Tailwind's generated CSS.
   ============================================================ */

/* --- Position: left-0 <-> right-0 --- */
[dir="rtl"] .left-0 {
    left: auto !important;
    right: 0 !important;
}
[dir="rtl"] .right-0 {
    right: auto !important;
    left: 0 !important;
}

/* --- Margin auto: ml-auto <-> mr-auto --- */
[dir="rtl"] .ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}
[dir="rtl"] .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* --- Margins: swap mr-* <-> ml-* for common values --- */
[dir="rtl"] .mr-0\.5 { margin-right: 0 !important; margin-left: 0.125rem !important; }
[dir="rtl"] .ml-0\.5 { margin-left: 0 !important; margin-right: 0.125rem !important; }
[dir="rtl"] .mr-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
[dir="rtl"] .ml-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
[dir="rtl"] .mr-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .ml-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
[dir="rtl"] .mr-3 { margin-right: 0 !important; margin-left: 0.75rem !important; }
[dir="rtl"] .ml-3 { margin-left: 0 !important; margin-right: 0.75rem !important; }
[dir="rtl"] .mr-3\.5 { margin-right: 0 !important; margin-left: 0.875rem !important; }
[dir="rtl"] .ml-3\.5 { margin-left: 0 !important; margin-right: 0.875rem !important; }
[dir="rtl"] .mr-4 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .ml-4 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .mr-5 { margin-right: 0 !important; margin-left: 1.25rem !important; }
[dir="rtl"] .ml-5 { margin-left: 0 !important; margin-right: 1.25rem !important; }
[dir="rtl"] .mr-6 { margin-right: 0 !important; margin-left: 1.5rem !important; }
[dir="rtl"] .ml-6 { margin-left: 0 !important; margin-right: 1.5rem !important; }
[dir="rtl"] .mr-8 { margin-right: 0 !important; margin-left: 2rem !important; }
[dir="rtl"] .ml-8 { margin-left: 0 !important; margin-right: 2rem !important; }

/* --- Paddings: swap pr-* <-> pl-* for common values --- */
[dir="rtl"] .pr-1 { padding-right: 0 !important; padding-left: 0.25rem !important; }
[dir="rtl"] .pl-1 { padding-left: 0 !important; padding-right: 0.25rem !important; }
[dir="rtl"] .pr-2 { padding-right: 0 !important; padding-left: 0.5rem !important; }
[dir="rtl"] .pl-2 { padding-left: 0 !important; padding-right: 0.5rem !important; }
[dir="rtl"] .pr-0\.5 { padding-right: 0 !important; padding-left: 0.125rem !important; }
[dir="rtl"] .pl-0\.5 { padding-left: 0 !important; padding-right: 0.125rem !important; }
[dir="rtl"] .pr-5 { padding-right: 0 !important; padding-left: 1.25rem !important; }
[dir="rtl"] .pl-5 { padding-left: 0 !important; padding-right: 1.25rem !important; }
[dir="rtl"] .pr-8 { padding-right: 0 !important; padding-left: 2rem !important; }
[dir="rtl"] .pl-8 { padding-left: 0 !important; padding-right: 2rem !important; }
[dir="rtl"] .pr-10 { padding-right: 0 !important; padding-left: 2.5rem !important; }
[dir="rtl"] .pl-10 { padding-left: 0 !important; padding-right: 2.5rem !important; }

/* --- Negative margins (arbitrary values) --- */
[dir="rtl"] .-ml-\[100\%\] {
    margin-left: 0 !important;
    margin-right: -100% !important;
}
[dir="rtl"] .-mr-\[100\%\] {
    margin-right: 0 !important;
    margin-left: -100% !important;
}
[dir="rtl"] .-ml-\[60px\] {
    margin-left: 0 !important;
    margin-right: -60px !important;
}
[dir="rtl"] .-ml-\[105px\] {
    margin-left: 0 !important;
    margin-right: -105px !important;
}
[dir="rtl"] .-ml-\[1\.125rem\] {
    margin-left: 0 !important;
    margin-right: -1.125rem !important;
}

/* --- before: pseudo-element utilities --- */
[dir="rtl"] .before\:right-0::before {
    right: auto !important;
    left: 0 !important;
}
[dir="rtl"] .before\:left-0::before {
    left: auto !important;
    right: 0 !important;
}
[dir="rtl"] .before\:-ml-\[1\.125rem\]::before {
    margin-left: 0 !important;
    margin-right: -1.125rem !important;
}

/* --- Responsive: sm: prefixes --- */
@media (min-width: 640px) {
    [dir="rtl"] .sm\:mr-6 { margin-right: 0 !important; margin-left: 1.5rem !important; }
    [dir="rtl"] .sm\:ml-6 { margin-left: 0 !important; margin-right: 1.5rem !important; }
    [dir="rtl"] .sm\:mr-auto { margin-right: 0 !important; margin-left: auto !important; }
    [dir="rtl"] .sm\:ml-auto { margin-left: 0 !important; margin-right: auto !important; }
    [dir="rtl"] .sm\:-ml-\[105px\] { margin-left: 0 !important; margin-right: -105px !important; }
    [dir="rtl"] .sm\:-mr-\[105px\] { margin-right: 0 !important; margin-left: -105px !important; }
}

/* ============================================================
   2. GROUP VARIANT OVERRIDES
   Override Tailwind group-variant utilities for mobile menu
   and theme switcher slide directions.
   ============================================================ */

/* Mobile menu: slide from right in RTL */
[dir="rtl"] .group.mobile-menu--active .group-\[\.mobile-menu--active\]\:ml-0 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Theme switcher: slide from left in RTL */
[dir="rtl"] .group.show .group-\[\.show\]\:mr-0 {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* ============================================================
   3. SIDE NAV OVERRIDES (ALL THEMES: rubick, enigma, icewall, tinker)
   Override physical properties from side-nav.css
   ============================================================ */

/* Sidebar padding: swap left/right */
[dir="rtl"] .side-nav {
    padding-right: 0 !important;
    padding-left: 1.25rem !important;
}

/* ----------------------------------------------------------------
   SIDE MENU UNIFORM ALIGNMENT (comprehensive fix)
   Every menu item — top-level, group header, sub-item, sub-sub-item,
   active or not — must have the EXACT same horizontal alignment for
   both icon and text.  The rules below address five root causes:

   (a) PADDING  — force identical padding-right on all levels so the
       icon left-edge is always at the same offset.
   (b) MARGIN   — force margin-left/right to 0 so no stray margin
       shifts an item horizontally.
   (c) FLEX     — the theme sets .side-menu__title { width:100% } which
       creates a flex-basis larger than the available space, causing
       proportional shrinkage of BOTH the icon and the title.  Replacing
       width:100% with flex:1 lets the title absorb remaining space
       WITHOUT compressing the icon.
   (d) ICON     — .side-menu__icon has no flex-shrink:0, so it can be
       squeezed by the flex overflow described in (c).  Pinning it with
       flex-shrink:0 + inline-flex guarantees a constant icon width and
       therefore a constant icon-to-text gap on every item.
   (e) UL / PSEUDO — sub-menu <ul> padding is zeroed (belt-and-suspenders
       on top of Tailwind preflight) and active-item curves are forced
       to position:absolute so they never participate in inline layout.
   ---------------------------------------------------------------- */

/* (a)+(b) Uniform padding + zero margin on EVERY side-menu at every
   nesting level.  nav.side-nav raises specificity above the theme
   rules in themes/<name>/side-nav.css; the .side-menu__sub-open
   descendant covers levels 2 and 3. */
[dir="rtl"] nav.side-nav .side-menu,
[dir="rtl"] nav.side-nav .side-menu__sub-open .side-menu {
    padding-left: 0 !important;
    padding-right: 1.25rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* (c) Title: swap margin-left -> margin-right, and replace width:100%
   (flex-basis overflow) with flex:1 1 0% so the title takes remaining
   space without forcing the icon to shrink. */
[dir="rtl"] nav.side-nav .side-menu .side-menu__title {
    width: auto !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

/* Sub-icon (chevron): push to the end (left in RTL) without affecting
   the text start position.  flex-shrink:0 prevents compression. */
[dir="rtl"] nav.side-nav .side-menu .side-menu__title .side-menu__sub-icon {
    margin-left: 1.25rem !important;
    margin-right: auto !important;
    flex-shrink: 0 !important;
}

/* (d) Icon container: prevent flex-shrink so the icon is always the
   same width, guaranteeing a consistent icon-to-text gap on every
   item regardless of label length, nesting level, or active state. */
[dir="rtl"] nav.side-nav .side-menu__icon {
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Force the Lucide SVG to block display + fixed size so no inline
   whitespace adds extra width to the icon container. */
[dir="rtl"] nav.side-nav .side-menu__icon svg {
    display: block !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

/* (e) Force ALL <ul> inside side-nav to zero padding/margin/list-style
   so sub-items are never shifted by default list indentation.
   (Tailwind preflight already does this, but we re-assert with
   !important as a guarantee.) */
[dir="rtl"] nav.side-nav ul {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* Ensure active-item pseudo-elements (curves + icon tab background)
   are always position:absolute so they never participate in inline
   layout and never shift the icon or text. */
[dir="rtl"] nav.side-nav .side-menu--active::before,
[dir="rtl"] nav.side-nav .side-menu--active::after {
    position: absolute !important;
}

/* ============================================================
   4. SIDE NAV INTRO ANIMATIONS — REMOVED (root-cause fix)
   The :nth-child(n) translateX(-50px) rules that lived here
   shifted ALL non-active sidebar items 50px to the left. The
   theme only defines correcting intro animations for items 1-50,
   so items 51+ were permanently misaligned (stuck at -50px).
   Removed entirely. Items now rely on the theme's own transform
   + animation, which ends at translateX(0) for every animated
   item and is unset (default none) for items beyond #50.
   ============================================================ */

/* ============================================================
   5. RUBICK ACTIVE MENU INDICATORS
   The active menu uses SVG curves positioned on the right.
   In RTL, they need to be on the left and mirrored.
   ============================================================ */

/* Active menu ::before (top corner) - move to left + mirror horizontally.
   !important is required to beat the theme rule in themes/rubick/side-nav.css
   which sets right:0 + transform: rotate(90deg) scale(1.04). The corner must
   keep its 90deg rotation while being flipped with scaleX(-1) so it lands on
   the LEFT edge with the correct curve direction. (The previous rotate(-90deg)
   only rotated the corner instead of mirroring it, producing a misshapen tab.) */
[dir="rtl"] .rubick .side-nav > ul > li > .side-menu.side-menu--active:before {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: calc(1.25rem * -1) !important;
    transform: scaleX(-1) rotate(90deg) scale(1.04) !important;
}

/* Active menu ::after (bottom corner) - move to left + mirror horizontally.
   !important beats the theme rule's right:0 + transform: scale(1.04). */
[dir="rtl"] .rubick .side-nav > ul > li > .side-menu.side-menu--active:after {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: calc(1.25rem * -1) !important;
    transform: scaleX(-1) scale(1.04) !important;
}

/* Active icon ::before (background) - move to left */
[dir="rtl"] .rubick .side-nav > ul > li > .side-menu.side-menu--active .side-menu__icon:before {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: calc(1.25rem * -1) !important;
}

/* Non-active icon ::before (hover background) - move to right, swap border-radius */
[dir="rtl"] .rubick .side-nav > ul > li > .side-menu:not(.side-menu--active) .side-menu__icon:before {
    left: auto;
    right: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 9999px;
    border-bottom-right-radius: 9999px;
}

/* Dark mode active indicators - re-assert position + mirror at .dark specificity.
   The dark rules in themes/rubick/side-nav.css are empty blocks, so the light-mode
   rules still supply the SVG; we re-assert everything here with !important to be safe. */
[dir="rtl"] .dark .rubick .side-nav > ul > li > .side-menu.side-menu--active:before {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: calc(1.25rem * -1) !important;
    transform: scaleX(-1) rotate(90deg) scale(1.04) !important;
}
[dir="rtl"] .dark .rubick .side-nav > ul > li > .side-menu.side-menu--active:after {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: calc(1.25rem * -1) !important;
    transform: scaleX(-1) scale(1.04) !important;
}

/* ============================================================
   6. ENIGMA / ICEWALL ACTIVE INDICATORS (chevron ::after)
   These themes render a 20x80 chevron SVG on the RIGHT edge of the
   active item via .side-menu--active::after, then slide it in with
   the `active-side-menu-chevron` keyframe which animates `margin-right`
   from -47px -> -27px with animation-fill-mode: forwards.

   Two problems for RTL:
     (a) The keyframe locks `margin-right: -27px` via forwards, and CSS
         animations override normal declarations regardless of specificity,
         so a plain `margin-right: 0` is silently defeated.
     (b) The curve sits on the right edge and is not mirrored.

   Fix: !important (beats the animation) clears margin-right; margin-left:
   -27px reproduces the keyframe's intended FINAL offset on the left edge;
   left:0 anchors it; scaleX(-1) mirrors the SVG. The opacity fade-in part
   of the animation is left untouched.

   NOTE: Tinker has NO ::after chevron - its active state is only a
   full-width ::before with border-bottom (left:0;right:0, symmetric, no
   flip needed). Enigma/Icewall/Tinker ::before is likewise full-width +
   border-bottom, so it needs no RTL adjustment either.
   ============================================================ */

[dir="rtl"] .enigma .side-nav > ul > li > .side-menu.side-menu--active:after,
[dir="rtl"] .icewall .side-nav > ul > li > .side-menu.side-menu--active:after {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: -27px !important;
    transform: scaleX(-1) !important;
}

/* Dark mode: the dark rules only swap the SVG fill (position unchanged),
   so the same !important override applies; re-asserted at .dark specificity. */
[dir="rtl"] .dark .enigma .side-nav > ul > li > .side-menu.side-menu--active:after,
[dir="rtl"] .dark .icewall .side-nav > ul > li > .side-menu.side-menu--active:after {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: -27px !important;
    transform: scaleX(-1) !important;
}

/* ============================================================
   7. MOBILE MENU (mobile-menu.css)
   Override physical properties from mobile-menu.css
   ============================================================ */

/* Mobile menu title margin */
[dir="rtl"] .mobile-menu .menu .menu__title {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

/* Mobile menu sub-icon margin */
[dir="rtl"] .mobile-menu .menu .menu__title .menu__sub-icon {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* ============================================================
   8. INTRO-X ANIMATIONS (app.css)
   Flip translateX direction for .intro-x and .-intro-x
   Using :nth-child(n) to match all children at once.
   ============================================================ */

[dir="rtl"] * > .intro-x:nth-child(n) {
    transform: translateX(-50px);
}

[dir="rtl"] * > .-intro-x:nth-child(n) {
    transform: translateX(50px);
}

/* ============================================================
   9. BREADCRUMB CHEVRON
   Flip the chevron direction in the breadcrumb separator
   ============================================================ */

[dir="rtl"] nav[aria-label="breadcrumb"] li:before {
    transform: rotate(90deg) !important;
}

/* ============================================================
   10. TOP NAV OVERRIDES (for Top Menu layout)
   Override physical properties from top-nav.css
   ============================================================ */

/* Top menu title margin */
[dir="rtl"] .top-nav .top-menu .top-menu__title {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

/* Top menu padding (asymmetric padding-right with margin-right) */
[dir="rtl"] .top-nav > ul > li > .top-menu {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

/* Top menu icon ::before positioning */
[dir="rtl"] .rubick .top-nav .top-menu:not(.top-menu--active) .top-menu__icon:before {
    left: auto;
    right: 0;
}

/* Top menu active border indicators */
[dir="rtl"] .rubick .top-nav > ul > li > .top-menu.top-menu--active:before {
    left: auto !important;
    right: 0 !important;
}
[dir="rtl"] .rubick .top-nav > ul > li > .top-menu.top-menu--active:after {
    right: auto !important;
    left: 0 !important;
}

/* ============================================================
   11. TIPPY TOOLTIP
   Force tooltip to appear on the left side in RTL
   (tippy.js uses inline styles, so we need !important)
   ============================================================ */

[dir="rtl"] .tippy-box[data-placement="right"] {
    transform: translateX(-10px) !important;
}

/* ============================================================
   12. ADDITIONAL NEGATIVE-MARGIN SWAPS
   Flip -ml-* <-> -mr-* for stacked avatars, chart offsets, etc.
   ============================================================ */

[dir="rtl"] .-ml-1 { margin-left: 0 !important; margin-right: -0.25rem !important; }
[dir="rtl"] .-mr-1 { margin-right: 0 !important; margin-left: -0.25rem !important; }
[dir="rtl"] .-ml-2 { margin-left: 0 !important; margin-right: -0.5rem !important; }
[dir="rtl"] .-mr-2 { margin-right: 0 !important; margin-left: -0.5rem !important; }
[dir="rtl"] .-ml-4 { margin-left: 0 !important; margin-right: -1rem !important; }
[dir="rtl"] .-mr-4 { margin-right: 0 !important; margin-left: -1rem !important; }
[dir="rtl"] .-ml-5 { margin-left: 0 !important; margin-right: -1.25rem !important; }
[dir="rtl"] .-mr-5 { margin-right: 0 !important; margin-left: -1.25rem !important; }
[dir="rtl"] .-ml-10 { margin-left: 0 !important; margin-right: -2.5rem !important; }
[dir="rtl"] .-mr-10 { margin-right: 0 !important; margin-left: -2.5rem !important; }

/* ============================================================
   13. ADDITIONAL POSITIVE-MARGIN SWAPS
   Extra values (1.5) used across buttons / icons.
   ============================================================ */

[dir="rtl"] .mr-1\.5 { margin-right: 0 !important; margin-left: 0.375rem !important; }
[dir="rtl"] .ml-1\.5 { margin-left: 0 !important; margin-right: 0.375rem !important; }
[dir="rtl"] .mr-7 { margin-right: 0 !important; margin-left: 1.75rem !important; }
[dir="rtl"] .ml-7 { margin-left: 0 !important; margin-right: 1.75rem !important; }
[dir="rtl"] .mr-9 { margin-right: 0 !important; margin-left: 2.25rem !important; }
[dir="rtl"] .ml-9 { margin-left: 0 !important; margin-right: 2.25rem !important; }
[dir="rtl"] .mr-10 { margin-right: 0 !important; margin-left: 2.5rem !important; }
[dir="rtl"] .ml-10 { margin-left: 0 !important; margin-right: 2.5rem !important; }
[dir="rtl"] .mr-12 { margin-right: 0 !important; margin-left: 3rem !important; }
[dir="rtl"] .ml-12 { margin-left: 0 !important; margin-right: 3rem !important; }

/* ============================================================
   14. ADDITIONAL PADDING SWAPS
   Extra values (3, 4, 6, 12) for cards, dropdowns, inputs.
   ============================================================ */

[dir="rtl"] .pr-3 { padding-right: 0 !important; padding-left: 0.75rem !important; }
[dir="rtl"] .pl-3 { padding-left: 0 !important; padding-right: 0.75rem !important; }
[dir="rtl"] .pr-4 { padding-right: 0 !important; padding-left: 1rem !important; }
[dir="rtl"] .pl-4 { padding-left: 0 !important; padding-right: 1rem !important; }
[dir="rtl"] .pr-6 { padding-right: 0 !important; padding-left: 1.5rem !important; }
[dir="rtl"] .pl-6 { padding-left: 0 !important; padding-right: 1.5rem !important; }
[dir="rtl"] .pr-12 { padding-right: 0 !important; padding-left: 3rem !important; }
[dir="rtl"] .pl-12 { padding-left: 0 !important; padding-right: 3rem !important; }

/* ============================================================
   15. RESPONSIVE MARGIN SWAPS (md / lg / xl / 2xl)
   Flip ml-auto / mr-auto and common margins at every breakpoint
   so header rows, filter dropdowns and schedule dates land on the
   correct side in RTL.
   ============================================================ */

@media (min-width: 768px) {
    [dir="rtl"] .md\:ml-auto { margin-left: 0 !important; margin-right: auto !important; }
    [dir="rtl"] .md\:mr-auto { margin-right: 0 !important; margin-left: auto !important; }
    [dir="rtl"] .md\:ml-5  { margin-left: 0 !important; margin-right: 1.25rem !important; }
    [dir="rtl"] .md\:mr-5  { margin-right: 0 !important; margin-left: 1.25rem !important; }
    [dir="rtl"] .md\:ml-6  { margin-left: 0 !important; margin-right: 1.5rem !important; }
    [dir="rtl"] .md\:mr-6  { margin-right: 0 !important; margin-left: 1.5rem !important; }
    [dir="rtl"] .md\:pl-6  { padding-left: 0 !important; padding-right: 1.5rem !important; }
    [dir="rtl"] .md\:pr-6  { padding-right: 0 !important; padding-left: 1.5rem !important; }
}

@media (min-width: 1024px) {
    [dir="rtl"] .lg\:ml-auto { margin-left: 0 !important; margin-right: auto !important; }
    [dir="rtl"] .lg\:mr-auto { margin-right: 0 !important; margin-left: auto !important; }
    [dir="rtl"] .lg\:ml-6   { margin-left: 0 !important; margin-right: 1.5rem !important; }
    [dir="rtl"] .lg\:mr-6   { margin-right: 0 !important; margin-left: 1.5rem !important; }
}

@media (min-width: 1280px) {
    [dir="rtl"] .xl\:ml-auto { margin-left: 0 !important; margin-right: auto !important; }
    [dir="rtl"] .xl\:mr-auto { margin-right: 0 !important; margin-left: auto !important; }
    [dir="rtl"] .xl\:ml-6   { margin-left: 0 !important; margin-right: 1.5rem !important; }
    [dir="rtl"] .xl\:mr-6   { margin-right: 0 !important; margin-left: 1.5rem !important; }
}

@media (min-width: 1536px) {
    [dir="rtl"] .\32 xl\:ml-auto { margin-left: 0 !important; margin-right: auto !important; }
    [dir="rtl"] .\32 xl\:mr-auto { margin-right: 0 !important; margin-left: auto !important; }
    [dir="rtl"] .\32 xl\:ml-6   { margin-left: 0 !important; margin-right: 1.5rem !important; }
    [dir="rtl"] .\32 xl\:mr-6   { margin-right: 0 !important; margin-left: 1.5rem !important; }
}

/* ============================================================
   16. before: / after: PSEUDO-ELEMENT POSITION & MARGIN SWAPS
   Move timeline rails, chart fades and dividers to the opposite
   side. The base .before:left-0 / .before:right-0 are already
   handled in section 1; here we add the remaining ones.
   ============================================================ */

/* before:ml-5 -> margin-right (Recent Activities timeline rail + connectors) */
[dir="rtl"] .before\:ml-5::before {
    margin-left: 0 !important;
    margin-right: 1.25rem !important;
}
/* before:ml-10 -> margin-right (Sales Report left chart fade) */
[dir="rtl"] .before\:ml-10::before {
    margin-left: 0 !important;
    margin-right: 2.5rem !important;
}
/* before:ml-3 -> margin-right (used by various connectors) */
[dir="rtl"] .before\:ml-3::before {
    margin-left: 0 !important;
    margin-right: 0.75rem !important;
}

/* after:right-0 -> left:0 (Sales Report right chart fade) */
[dir="rtl"] .after\:right-0::after {
    right: auto !important;
    left: 0 !important;
}
/* after:left-0 -> right:0 (mirror, for completeness) */
[dir="rtl"] .after\:left-0::after {
    left: auto !important;
    right: 0 !important;
}
/* after:-ml-4 -> margin-right (decorative layers) */
[dir="rtl"] .after\:-ml-4::after {
    margin-left: 0 !important;
    margin-right: -1rem !important;
}

/* ============================================================
   17. GRADIENT DIRECTION SWAPS (chart edge fades)
   When a fade pseudo-element flips to the opposite side, its
   gradient direction must also flip so the solid colour still
   sits against the card edge.
   ============================================================ */

[dir="rtl"] .before\:bg-gradient-to-r::before {
    background-image: linear-gradient(to left, var(--tw-gradient-stops)) !important;
}
[dir="rtl"] .after\:bg-gradient-to-l::after {
    background-image: linear-gradient(to right, var(--tw-gradient-stops)) !important;
}

/* ============================================================
   18. TEXT ALIGNMENT SWAPS
   In an RTL layout text-left becomes text-right and vice-versa.
   text-center / text-justify are direction-agnostic.
   ============================================================ */

[dir="rtl"] .text-left {
    text-align: right !important;
}
[dir="rtl"] .text-right {
    text-align: left !important;
}

/* ============================================================
   19. BORDER-SIDE SWAPS
   Move border-left -> border-right (and reverse) for dividers and
   the 2xl sidebar separator. These only set a single side so the
   swap is safe and does not conflict with the all-sides .border.
   ============================================================ */

[dir="rtl"] .border-l {
    border-left-width: 0px !important;
    border-right-width: 1px !important;
}
[dir="rtl"] .border-r {
    border-right-width: 0px !important;
    border-left-width: 1px !important;
}
[dir="rtl"] .border-l-2 {
    border-left-width: 0px !important;
    border-right-width: 2px !important;
}
[dir="rtl"] .border-r-2 {
    border-right-width: 0px !important;
    border-left-width: 2px !important;
}

@media (min-width: 1536px) {
    /* 2xl sidebar vertical separator -> right side */
    [dir="rtl"] .\32 xl\:border-l {
        border-left-width: 0px !important;
        border-right-width: 1px !important;
    }
    /* 2xl sidebar gutter padding -> right */
    [dir="rtl"] .\32 xl\:pl-6 {
        padding-left: 0 !important;
        padding-right: 1.5rem !important;
    }
    [dir="rtl"] .\32 xl\:pr-6 {
        padding-right: 0 !important;
        padding-left: 1.5rem !important;
    }
}

/* ============================================================
   20. TABLE ROW CORNER & BORDER FLIPS
   SportMans tables render each row as a row of separate .box cells.
   In LTR the first cell carries the left rounding + left border
   and the last cell carries the right rounding + right border.
   In RTL those must swap so the rounded "outer" edges stay on the
   outside of the row.
   ============================================================ */

[dir="rtl"] table tbody tr > td:first-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.6rem !important;
    border-bottom-right-radius: 0.6rem !important;
    border-left-width: 0 !important;
    border-right-width: 1px !important;
}
[dir="rtl"] table tbody tr > td:last-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 0.6rem !important;
    border-bottom-left-radius: 0.6rem !important;
    border-right-width: 0 !important;
    border-left-width: 1px !important;
}

/* ============================================================
   21. NATIVE <select> ARROW POSITION
   app.css pins the dropdown arrow to the right with right padding.
   In RTL the arrow must sit on the left with left padding.
   ============================================================ */

[dir="rtl"] select {
    background-position: left 0.5rem center !important;
    padding-right: 0.75rem !important;
    padding-left: 2.5rem !important;
}
/* Restore sensible right padding for selects that also carry pr-8 */
[dir="rtl"] select.pr-8 {
    padding-right: 0.75rem !important;
}

/* ============================================================
   22. DROPDOWN / TOOLTIP PLACEMENT (Popper bottom-end)
   bottom-end resolves to the right edge in LTR. In RTL it should
   hug the left edge. Tippy/Popper read the dir attribute for most
   placements, but a few inline-styled offsets need a nudge.
   ============================================================ */

[dir="rtl"] .tippy-box[data-placement^="left"] {
    transform: translateX(10px) !important;
}

/* ============================================================
   23. HEADER / TOP-BAR SAFEGUARDS
   The top bar is a flex row of [breadcrumb][search][notifications]
   [account]. The mr-auto / ml-auto swaps in section 1 already mirror
   the grouping. These rules guarantee the layered pseudo-element
   fades and the notification badge dot land on the correct side and
   that nothing visually overlaps the breadcrumb.
   ============================================================ */

/* Notification badge dot: before:right-0 is handled in section 1,
   but make sure it cannot collide with the bell icon in RTL. */
[dir="rtl"] .dropdown .before\:right-0::before {
    right: auto !important;
    left: 0 !important;
}

/* Search-result dropdown anchored to the (now left) edge */
[dir="rtl"] .search-result {
    right: auto !important;
    left: 0 !important;
}

/* Ensure the breadcrumb chevron sits in the gap, not over the text */
[dir="rtl"] nav[aria-label="breadcrumb"] li::before {
    margin-left: 0 !important;
    margin-right: -1.125rem !important;
}

/* ============================================================
   24. SIDEBAR ALIGNMENT FIX v7 — ROOT CAUSE: INTRO ANIMATION
   ============================================================
   The theme CSS (themes/rubick/side-nav.css) defines staggered intro
   animations ONLY for :nth-child(1) through :nth-child(50). Each rule
   sets transform: translateX(50px) + an animation that ends at
   translateX(0) with animation-fill-mode: forwards.

   Section 4's :nth-child(n) translateX(-50px) override has been REMOVED
   (root-cause fix). The rules below are now defensive no-ops kept as a
   safety net; they reset items beyond #50 to transform:none in case any
   future override reintroduces a base transform.

   With 164 top-level config entries, items from ~#51 onward (including
   "البطاقات التعريفية" at config position #68) are all misaligned.

   FIX: Reset transform + opacity for items beyond #50 so they render at
   the correct position. !important ensures the reset wins over the
   section-4 :nth-child(n) rule.
   ============================================================ */

[dir="rtl"] .side-nav > ul > li:nth-child(n+51) > a:not(.side-menu--active) {
    transform: none !important;
    opacity: 1 !important;
}

[dir="rtl"] .side-nav > ul ul li:nth-child(n+51) > a {
    transform: none !important;
    opacity: 1 !important;
}

/* ============================================================
   25. NUCLEAR ALIGNMENT FIX v7 — PADDING / ICON / TITLE UNIFORMITY
   Belt-and-suspenders: re-assert uniform padding, icon width, and title
   flex on every side-menu item at every nesting level.
   ============================================================ */

/* Force ALL ul elements in sidebar to zero margin/padding */
[dir="rtl"] nav.side-nav ul {
    margin: 0 !important;
    padding: 0 !important;
}

/* Force ALL side-menu items to identical padding, regardless of nesting level */
[dir="rtl"] nav.side-nav a.side-menu,
[dir="rtl"] nav.side-nav div.side-menu {
    padding-right: 1.25rem !important;
    padding-left: 0.75rem !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* Force icon container to fixed width and position */
[dir="rtl"] nav.side-nav .side-menu__icon {
    flex-shrink: 0 !important;
    width: 1.5rem !important;
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Force icon SVG to fixed size */
[dir="rtl"] nav.side-nav .side-menu__icon svg {
    display: block !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

/* Force title to take remaining space */
[dir="rtl"] nav.side-nav .side-menu__title {
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
}

/* Active item curves must not affect layout */
[dir="rtl"] nav.side-nav .side-menu--active::before,
[dir="rtl"] nav.side-nav .side-menu--active::after {
    position: absolute !important;
}

/* ============================================================
   26. ENIGMA THEME — LIGHT SIDEBAR FIX (desktop, LTR + RTL)
   The Enigma theme CSS is designed for a LIGHT sidebar with dark
   text (#475569) and an active-item background of #f1f5f9, plus
   full .dark .enigma overrides for dark mode.  However the wrapper
   carries a before: pseudo-element that paints a dark theme gradient
   (before:bg-gradient-to-b before:from-theme-1) which shows THROUGH
   the transparent sidebar, making Enigma look as dark as Rubick.

   Root-cause fix: on desktop (md+), neutralise that gradient pseudo
   and give the wrapper a solid light (slate-200) background so the
   theme's own light-sidebar styling becomes visible.  Dark mode keeps
   a dark (darkmode-800) wrapper.  The text-colour reinforcements are
   scoped to html:not(.dark) so the theme's existing .dark .enigma
   overrides remain authoritative in dark mode (no invisible text).
   Rubick / Tinker / Icewall are untouched.
   ============================================================ */

@media (min-width: 768px) {
    /* Neutralise the dark gradient pseudo-element on desktop */
    .enigma::before {
        background-image: none !important;
        background-color: transparent !important;
    }

    /* Solid wrapper backgrounds */
    html:not(.dark) .enigma {
        background-color: #e2e8f0; /* slate-200 */
    }
    .dark .enigma {
        background-color: #1e293b; /* darkmode-800 */
    }

    /* --- Light-mode sidebar text reinforcement (theme already sets
           these; repeated as a safety net, light-mode only) --- */
    html:not(.dark) .enigma .side-nav .side-menu__title {
        color: #475569; /* slate-600 */
    }
    html:not(.dark) .enigma .side-nav .side-menu__icon {
        color: #475569;
    }
    html:not(.dark) .enigma .side-nav .side-menu--active .side-menu__title {
        color: #1e293b; /* slate-800 */
    }
    html:not(.dark) .enigma .side-nav .side-menu--active {
        background-color: #f1f5f9; /* slate-100 */
        border-radius: 0.75rem;
    }
    html:not(.dark) .enigma .side-nav__section-title {
        color: #64748b; /* slate-500 */
    }
    html:not(.dark) .enigma .side-nav__divider {
        background-color: rgba(0, 0, 0, 0.06);
    }
    html:not(.dark) .enigma .side-nav__filter input {
        color: #475569;
        background: #ffffff;
        border: 1px solid #e2e8f0;
    }
    html:not(.dark) .enigma .side-nav__view-all button {
        color: #475569;
    }
    html:not(.dark) .enigma .side-nav__favorites-header {
        color: #475569;
    }
    html:not(.dark) .enigma .side-nav > a span {
        color: #1e293b !important;
    }
}

/* ===== §28: THEME HEADER FIXES (ALL VIEWPORT SIZES) ===== */

/* --- ENIGMA HEADER — LIGHT BACKGROUND + DARK PSEUDO-ELEMENT BARS ---
   Original Enigma design: the header element itself has a LIGHT background
   (md:bg-gradient-to-b md:from-slate-100 md:to-transparent).  The dark blue
   appearance comes from ::before (primary/30) and ::after (solid primary)
   pseudo-element bars positioned behind the content.

   Previous version incorrectly set a dark gradient on the header itself and
   used z-index:-1 on the pseudo-elements.  Because the header has
   position:relative but no z-index (no stacking context), z-index:-1 caused
   the pseudo-elements to escape into the wrapper's stacking context and be
   painted behind the wrapper's opaque #e2e8f0 background — making them
   invisible and leaving a flat light header with no bars. */

/* Mobile: solid dark background (replaces neutralised wrapper gradient) */
.enigma .sportmans-topbar-header {
    background: #1e3a8a !important;
}
.dark .enigma .sportmans-topbar-header {
    background: #1e293b !important;
}
/* Desktop: light gradient (slate-100 → transparent) — original md:from-slate-100 */
@media (min-width: 768px) {
    .enigma .sportmans-topbar-header {
        background: linear-gradient(to bottom, #f1f5f9, transparent) !important;
    }
    .dark .enigma .sportmans-topbar-header {
        background: linear-gradient(to bottom, #334155, transparent) !important;
    }
}

/* --- ENIGMA HEADER — ALL VIEWPORT SIZES --- */
/* Border: white/8% at ALL sizes */
.enigma .sportmans-topbar-header,
.enigma .sportmans-topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Notification/search icons: white/70 at ALL sizes */
.enigma .sportmans-topbar-header .text-slate-600,
.enigma .sportmans-topbar-header [class*="text-slate-600"] {
    color: rgba(255, 255, 255, 0.7) !important;
}
/* Search icon: keep slate-600 (dark) on the light input background */
.enigma .sportmans-topbar-header .search i,
.enigma .sportmans-topbar-header .search [data-lucide="search"] {
    color: rgb(71, 85, 105) !important; /* slate-600 */
}

/* Breadcrumb: white/90 at ALL sizes */
.enigma .sportmans-topbar-header nav[aria-label="breadcrumb"] a,
.enigma .sportmans-topbar-header nav[aria-label="breadcrumb"] li,
.enigma .sportmans-topbar-header .breadcrumb a,
.enigma .sportmans-topbar-header .breadcrumb li {
    color: rgba(255, 255, 255, 0.9) !important;
}
.enigma .sportmans-topbar-header .breadcrumb li::before,
.enigma .sportmans-topbar-header nav[aria-label="breadcrumb"] li::before {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Search input: solid slate-200 */
.enigma .sportmans-topbar-header input[type="text"],
.enigma .sportmans-topbar-header .search input {
    background-color: rgb(226, 232, 240) !important;
    color: rgb(71, 85, 105) !important;
}
.enigma .sportmans-topbar-header input[type="text"]::placeholder,
.enigma .sportmans-topbar-header .search input::placeholder {
    color: rgba(71, 85, 105, 0.6) !important;
}

/* Mobile (< 768px): hide decorative bars, topbar gets solid background */
@media (max-width: 767px) {
    .enigma .sportmans-topbar-header::before,
    .enigma .sportmans-topbar-header::after {
        display: none !important;
    }
    .enigma .sportmans-topbar {
        margin-top: 0 !important;
        background: #1e3a8a !important;
    }
    .dark .enigma .sportmans-topbar {
        background: #1e293b !important;
    }
}

/* Top bar height: 70px mobile; desktop heights set via !important in pseudo-element block below */
.enigma .sportmans-topbar-header .sportmans-topbar,
.enigma .sportmans-topbar-header {
    height: 70px;
}

/* Account avatar: no scaling — keep at h-8 w-8 (32px) to match original design */
.enigma .sportmans-topbar-header .image-fit,
.enigma .sportmans-topbar-header button[class*="rounded-full"] {
    transform: none !important;
}

/* Enigma pseudo-elements (stacked card effect) — desktop only
   ::before = lighter, wider bar (primary/30) behind ::after
   ::after  = solid primary bar — the main visible header card
   NO z-index:-1 — that pushed bars behind the wrapper's opaque background.
   Content (.sportmans-topbar) keeps z-index:1 to render above the bars.
   Fixed hex colors used instead of CSS variables for reliability. */
@media (min-width: 768px) {
    .enigma .sportmans-topbar-header {
        position: relative !important;
        padding-top: 0 !important;
        height: 85px !important;
        z-index: 50 !important;
    }
    /* ::before — lighter, wider bar (primary/30) behind ::after.
       Uses explicit left/right + z-index:0 instead of inset:0 + margins. */
    .enigma .sportmans-topbar-header::before {
        content: '' !important;
        position: absolute !important;
        top: 12px !important;
        left: 28px !important;
        right: 28px !important;
        height: 65px !important;
        background: rgba(30, 64, 175, 0.3) !important;
        border-radius: 0.75rem !important;
        pointer-events: none !important;
        display: block !important;
        z-index: 0 !important;
    }
    .dark .enigma .sportmans-topbar-header::before {
        background: rgba(71, 85, 105, 0.3) !important;
    }
    /* ::after — solid primary bar, the main visible header card.
       Uses explicit left/right + z-index:0 instead of inset:0 + margins. */
    .enigma .sportmans-topbar-header::after {
        content: '' !important;
        position: absolute !important;
        top: 20px !important;
        left: 12px !important;
        right: 12px !important;
        height: 65px !important;
        background: #1e40af !important;
        border-radius: 0.75rem !important;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;
        pointer-events: none !important;
        display: block !important;
        z-index: 0 !important;
    }
    .dark .enigma .sportmans-topbar-header::after {
        background: #475569 !important;
    }
    /* Content stays above the bars (z-index:1) and aligns with the
       ::after bar (margin-top:20px = ::after top:20px). */
    .enigma .sportmans-topbar {
        position: relative !important;
        z-index: 51 !important;
        margin-top: 20px !important;
        height: 65px !important;
        display: flex !important;
        align-items: center !important;
        padding-left: 70px !important;
        padding-right: 70px !important;
        padding-top: 28px !important;
    }
    /* Wrapper: 0 padding on desktop, slate-200 bg.
       Includes pt-2.5 selector for the updated Enigma class (was py-5). */
    .enigma[class*="py-5"],
    .enigma[class*="pt-2.5"],
    .enigma[class*="px-5"] {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        background-color: rgb(226, 232, 240) !important;
    }
    .dark .enigma[class*="py-5"],
    .dark .enigma[class*="pt-2.5"],
    .dark .enigma[class*="px-5"] {
        background-color: rgb(27, 37, 59) !important;
    }
    .enigma[class*="before:bg-gradient"]::before {
        background: none !important;
    }
    /* Content padding: 10px gap like Rubick */
    .enigma .sportmans-flex {
        padding-top: 0.625rem; /* 10px */
    }
}

/* ===== ENIGMA HEADER-BODY GAP FIX (10px) — ALL VIEWPORT SIZES ===== */
/* Ensure no extra margin between header and body content */
.enigma .sportmans-topbar-header {
    margin-bottom: 0 !important;
}
/* Neutralise top margin on first child of content area so the
   gap stays at 10px (from wrapper pt-2.5 / .sportmans-flex padding) */
.enigma .sportmans-content > *:first-child,
.enigma main > *:first-child {
    margin-top: 0 !important;
}

/* ===== ENIGMA SEARCH DROPDOWN Z-INDEX FIX =====
   Ensure search-result and dropdown menus in the Enigma topbar
   render above all page content. Task #623: aligned with the global
   9999 guarantee so no theme can demote the panels. */
.enigma .sportmans-topbar .search-result,
.enigma .sportmans-topbar .dropdown-menu {
    z-index: 9999 !important;
}

/* --- ENIGMA/ICEWALL: LOGO WIDTH + BREADCRUMB SEPARATOR (desktop) --- */
@media (min-width: 768px) {
    .enigma .sportmans-header-logo {
        width: 180px;
        flex-shrink: 0;
    }
    /* Breadcrumb nav height (h-[45px] not in compiled CSS) */
    .enigma nav[aria-label="breadcrumb"],
    .icewall nav[aria-label="breadcrumb"] {
        height: 45px;
    }
}

/* RTL: Enigma breadcrumb separator — physical properties for reliability.
   margin-left is intentionally NOT set to 0 so the mr-auto→ml-auto swap
   (margin-left:auto !important) still pushes search/bell/avatar to the
   far edge. Only border, margin-right, and padding are overridden. */
@media (min-width: 768px) {
    [dir="rtl"] .enigma .sportmans-topbar-header nav[aria-label="breadcrumb"],
    [dir="rtl"] .enigma .sportmans-topbar-header .breadcrumb {
        border-left-width: 0 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin-right: 2.5rem !important; /* md:mr-10 */
        padding-left: 0 !important;
        padding-right: 1.5rem !important; /* md:pr-6 */
    }
    /* Icewall: scope to topbar-header and use !important for reliability
       (mirrors the Enigma approach with physical properties). */
    [dir="rtl"] .icewall .sportmans-topbar-header nav[aria-label="breadcrumb"],
    [dir="rtl"] .icewall .sportmans-topbar-header .breadcrumb {
        border-left-width: 0 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin-right: 2.5rem !important; /* md:mr-10 */
        padding-left: 0 !important;
        padding-right: 1.5rem !important; /* md:pr-6 */
    }
}
/* Enigma breadcrumb chevron: flip direction in RTL */
[dir="rtl"] .enigma .sportmans-topbar-header nav[aria-label="breadcrumb"] li::before {
    transform: rotate(90deg) !important;
}

/* --- ICEWALL HEADER — ALL VIEWPORT SIZES --- */
/* Border: white/8% at ALL sizes */
.icewall .sportmans-topbar-header,
.icewall .sportmans-topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Notification/search icons: white/70 at ALL sizes */
.icewall .sportmans-topbar-header .text-slate-600,
.icewall .sportmans-topbar-header [class*="text-slate-600"] {
    color: rgba(255, 255, 255, 0.7) !important;
}
/* Search icon: keep slate-600 (dark) on the light input background
   (same approach as Enigma — the general .text-slate-600 rule above would
   otherwise turn the magnifier white on the light slate-200 input). */
.icewall .sportmans-topbar-header .search i,
.icewall .sportmans-topbar-header .search [data-lucide="search"] {
    color: rgb(71, 85, 105) !important; /* slate-600 */
}

/* Breadcrumb: white/90 at ALL sizes */
.icewall .sportmans-topbar-header nav[aria-label="breadcrumb"] a,
.icewall .sportmans-topbar-header nav[aria-label="breadcrumb"] li,
.icewall .sportmans-topbar-header .breadcrumb a,
.icewall .sportmans-topbar-header .breadcrumb li {
    color: rgba(255, 255, 255, 0.9) !important;
}
.icewall .sportmans-topbar-header .breadcrumb li::before,
.icewall .sportmans-topbar-header nav[aria-label="breadcrumb"] li::before {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Search input: solid slate-200 */
.icewall .sportmans-topbar-header input[type="text"],
.icewall .sportmans-topbar-header .search input {
    background-color: rgb(226, 232, 240) !important;
    color: rgb(71, 85, 105) !important;
}
.icewall .sportmans-topbar-header input[type="text"]::placeholder,
.icewall .sportmans-topbar-header .search input::placeholder {
    color: rgba(71, 85, 105, 0.6) !important;
}

/* Top bar height: 70px */
.icewall .sportmans-topbar-header .sportmans-topbar,
.icewall .sportmans-topbar-header {
    height: 70px !important;
}

/* Top bar margins — reduced to 10px gap (was 48px) */
.icewall .sportmans-topbar-header {
    margin-top: 10px;
    margin-bottom: 10px;
}
@media (min-width: 768px) {
    .icewall .sportmans-topbar-header {
        margin-top: 0;
        margin-bottom: 10px;
    }
}

/* Account avatar: no scaling — keep at h-8 w-8 (32px) to match Enigma */
.icewall .sportmans-topbar-header .image-fit,
.icewall .sportmans-topbar-header button[class*="rounded-full"] {
    transform: none !important;
}

/* Icewall content card: rounded 1.3rem + shadow */
@media (min-width: 768px) {
    .icewall .sportmans-flex > div:last-child {
        border-radius: 1.3rem;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    }
}

/* ===== §28b: ICEWALL CLICK-BLOCKING FIX ===== */
/* The .icewall:before decorative pseudo-element (position:absolute, no z-index)
   covers the entire wrapper and sits above non-positioned sidebar content,
   blocking clicks on the search input and view-all button. */
.icewall:before {
    pointer-events: none !important;
}
/* Ensure sidebar and flex content are above decorative pseudo-elements */
.icewall .sportmans-flex {
    position: relative;
    z-index: 1;
}
.icewall .side-nav {
    position: relative;
    z-index: 2;
}
/* Same defensive fix for Enigma side-nav */
.enigma .sportmans-flex {
    position: relative;
    z-index: 1;
}
.enigma .side-nav {
    position: relative;
    z-index: 2;
}

/* --- ICEWALL & ENIGMA SIDE-NAV WIDTHS --- */
@media (min-width: 768px) {
    .icewall .side-nav { width: 100px; }
    .enigma .side-nav { width: 100px; }
    .tinker .side-nav { width: 100px; }
}
@media (min-width: 1280px) {
    .icewall .side-nav { width: 250px; }
    .enigma .side-nav { width: 260px; }
    .tinker .side-nav { width: 250px; }
}

/* --- TINKER PADDING FIXES --- */
@media (min-width: 768px) {
    .tinker[class*="py-5"],
    .tinker[class*="pt-0"],
    .tinker[class*="px-5"] {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        background-color: rgba(0, 0, 0, 0.15);
    }
    .dark .tinker[class*="py-5"],
    .dark .tinker[class*="pt-0"],
    .dark .tinker[class*="px-5"] {
        background-color: transparent;
    }
    .tinker .sportmans-flex > div:last-child {
        margin-left: 16px;
        border-radius: 35px 0 0 0;
    }
}
.tinker .sportmans-flex {
    overflow: hidden;
}

/* ===== TINKER HEADER-BODY GAP FIX =====
   Remove the large gap between header and body content in Tinker.
   The theme must start from the top without any spacing.
   The @media rule above only zeroes wrapper padding on desktop md+;
   this global rule extends the zero to ALL viewports (mobile included). */
.tinker[class*="pt-0"],
.tinker[class*="py-5"],
.tinker[class*="px-5"] {
    padding-top: 0 !important;
}
.tinker .sportmans-topbar-header,
.tinker .sportmans-topbar {
    margin-bottom: 0 !important;
}
.tinker .sportmans-content > *:first-child,
.tinker main > *:first-child {
    margin-top: 0 !important;
}

/* --- RTL ADJUSTMENTS --- */
html[dir="rtl"] .tinker .sportmans-flex > div:last-child {
    margin-left: 0;
    margin-right: 16px;
    border-radius: 0 35px 0 0;
}
html[dir="rtl"] .icewall .sportmans-topbar-header {
    margin-left: 0;
    margin-right: 0;
}
@media (min-width: 640px) {
    html[dir="rtl"] .icewall .sportmans-topbar-header {
        margin-right: 0;
    }
}

/* ===== §28c: ICEWALL/ENIGMA LOGO OVERLAP FIX (RTL) ===== */
/* In RTL, the header logo's margin-right pushes space to the outer edge
   instead of between the logo and breadcrumb. Switch to margin-left. */
html[dir="rtl"] .icewall .sportmans-header-logo,
html[dir="rtl"] .enigma .sportmans-header-logo {
    margin-right: 0 !important;
    margin-left: 1.5rem !important;
}

/* === Top Menu layout fixes (all themes) === */
body.sportmans-top-menu .sportmans-flex {
    flex-direction: column;
    overflow: visible !important;
}
body.sportmans-top-menu #sportmans-top-nav {
    width: 100%;
    display: flex !important;
}
body.sportmans-top-menu .sportmans-top-nav-wrapper {
    width: 100%;
    padding: 0 1.5rem;
    display: block !important;
}

/* Ensure top-nav dropdowns appear above content in all themes */
body.sportmans-top-menu .top-nav > ul > li > ul,
body.sportmans-top-menu .top-nav > ul > li > ul > li > ul {
    z-index: 50 !important;
}

/* ===== CRITICAL FIX: Modal hiding for arbitrary-variant classes =====
   #theme-switcher and #modal-data2 use Tailwind arbitrary-variant classes:
     [&:not(.show)]:invisible  -> visibility: hidden when NOT .show
     [&:not(.show)]:opacity-0  -> opacity: 0 when NOT .show
   These classes do NOT exist in the pre-compiled static app.css.
   Without these rules, the modals are VISIBLE by default, covering
   the entire viewport with bg-black/60 overlays and blocking all
   interaction with the page content underneath.
   (Same fix already applied to #modal_data_admin_guide in sportmans-app.blade.php) */

/* Theme switcher modal */
#theme-switcher:not(.show) {
    visibility: hidden !important;
    opacity: 0 !important;
}
#theme-switcher.show {
    visibility: visible !important;
    opacity: 1 !important;
}
/* Theme switcher panel: -mr-[100%] not in compiled CSS */
#theme-switcher:not(.show) > div:first-child {
    margin-right: -100% !important;
}
#theme-switcher.show > div:first-child {
    margin-right: 0 !important;
}

/* Add-ticket modal (#modal-data2) */
#modal-data2:not(.show) {
    visibility: hidden !important;
    opacity: 0 !important;
}
#modal-data2.show {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===== CRITICAL FIX: opacity-0 failsafe on <html> =====
   The early-applier script sets class="opacity-0" on <html> and
   removes it on DOMContentLoaded. If JS fails, the page stays
   at opacity:0 -> user sees a blank white screen. This animation
   fades the page in after 3 seconds as a safety net. */
@keyframes fa-failsafe-visible {
    from { opacity: 0; }
    to   { opacity: 1; }
}
html.opacity-0 {
    animation: fa-failsafe-visible 0.3s 3s forwards;
}

/* ===== TINKER: ZERO TOP MARGIN ===== */
.tinker .mt-\[4\.7rem\] {
    margin-top: 0 !important;
}

/* ===== RUBICK: ZERO TOP MARGIN =====
   Same fix as Tinker: the .mt-[4.7rem] utility creates a large gap
   between the header and main content. Zero it so content sits flush. */
.rubick .mt-\[4\.7rem\] {
    margin-top: 0 !important;
}

/* ===== TINKER CONTENT FADE-IN ANIMATION ===== */
@keyframes tinkerFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.tinker main {
    animation: tinkerFadeIn 0.6s ease forwards;
}

/* ===== WEB PUSH TOGGLE STATES =====
   Mirrors the classic template's .web-push-toggle states,
   adapted for SportMans header themes (dark/light).
   Task #617: converted to rgb(... / a) syntax; the "Push" label
   was removed, the button is now a standard 40px glass icon button.
   ============================================ */
.sportmans-web-push-toggle.is-enabled {
    background: rgb(34 197 94 / 0.14) !important;
    border-color: rgb(34 197 94 / 0.45) !important;
    color: rgb(22 163 74 / 1) !important;
}

/* Dark mode + Enigma/Icewall dark headers — green on dark bg */
.dark .sportmans-web-push-toggle.is-enabled,
.enigma .sportmans-web-push-toggle.is-enabled,
.icewall .sportmans-web-push-toggle.is-enabled {
    background: rgb(34 197 94 / 0.22) !important;
    border-color: rgb(74 222 128 / 0.5) !important;
    color: rgb(134 239 172 / 1) !important;
}

.sportmans-web-push-toggle.is-blocked,
.sportmans-web-push-toggle.is-unsupported {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
}

.sportmans-web-push-toggle.is-disabled {
    /* default look — no extra styling needed */
}

/* Quick Access badge — ensure hidden class from inline styles works */
#quickAccessCount[style*="display: flex"] {
    display: flex !important;
}


/* ============================================================
   27. GLASSMORPHISM WELCOME WIDGET (Dashboard)
   Frosted glass card with aurora blobs, gradient text,
   glowing progress bar. Supports light/dark, RTL/LTR.
   ============================================================ */

/* --- Aurora background: now theme-aware — see §29 below --- */

/* --- Card hover: subtle lift --- */
.fa-glass-widget {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fa-glass-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -8px rgba(0,0,0,0.4);
}
.dark .fa-glass-widget:hover {
    box-shadow: 0 16px 40px -8px rgba(0,0,0,0.65);
}

/* --- RTL: keep avatar on right side --- */
[dir="rtl"] .fa-glass-row {
    direction: rtl;
}

/* --- Mini cards: ensure text centering in RTL --- */
[dir="rtl"] .fa-glass-mini {
    text-align: center;
}

/* --- Progress bar fill: flip gradient direction in RTL --- */
[dir="rtl"] .fa-glass-progress__fill {
    background: linear-gradient(270deg, #D4A574, #E8B4B8);
}

/* --- Buttons row: maintain gap in RTL --- */
[dir="rtl"] .fa-glass-actions {
    flex-direction: row;
}

/* --- Responsive: stack on mobile --- */
@media (max-width: 1023px) {
    .fa-glass-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }
    .fa-glass-actions {
        justify-content: center;
    }
    .fa-glass-cards {
        justify-content: center;
    }
}

/* --- Light mode glass widget: slightly more opaque for contrast --- */
html:not(.dark) .fa-glass-widget {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
html:not(.dark) .fa-glass-mini {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.1);
}
html:not(.dark) .fa-glass-btn {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

/* ============================================================
   29. GLASSMORPHISM WIDGET — THEME-AWARE BACKGROUNDS
   Each theme class is set on <html> by the early-theme-applier
   script (localStorage 'theme-color'). We override the CSS
   custom properties consumed by .fa-glass-bg so the widget
   gradient harmonises with the active theme.
   ============================================================ */

/* --- Rubick: deep blue (theme-1 = 30 64 175 / #1e40af) --- */
.rubick .fa-glass-bg,
html:not(.enigma):not(.icewall):not(.tinker) .fa-glass-bg {
    --fa-widget-bg-1: #0c1e4a;
    --fa-widget-bg-2: #162d6b;
    --fa-widget-bg-3: #1e3a8a;
    --fa-widget-bg-4: #0e1f4e;
}
.rubick .dark .fa-glass-bg,
html:not(.enigma):not(.icewall):not(.tinker) .dark .fa-glass-bg {
    --fa-widget-bg-1-dark: #060f28;
    --fa-widget-bg-2-dark: #0c1a40;
    --fa-widget-bg-3-dark: #142454;
    --fa-widget-bg-4-dark: #080c28;
}

/* --- Enigma: midnight navy / indigo (theme-1 = 30 64 175) --- */
.enigma .fa-glass-bg {
    --fa-widget-bg-1: #1a1a42;
    --fa-widget-bg-2: #25255a;
    --fa-widget-bg-3: #2e2e72;
    --fa-widget-bg-4: #14143a;
}
.enigma .dark .fa-glass-bg {
    --fa-widget-bg-1-dark: #0c0c24;
    --fa-widget-bg-2-dark: #14143a;
    --fa-widget-bg-3-dark: #1e1e50;
    --fa-widget-bg-4-dark: #0a0a20;
}

/* --- Icewall: cool slate / steel blue (theme-1 = 30 64 175) --- */
.icewall .fa-glass-bg {
    --fa-widget-bg-1: #1a2d4a;
    --fa-widget-bg-2: #243a5c;
    --fa-widget-bg-3: #2e476e;
    --fa-widget-bg-4: #162440;
}
.icewall .dark .fa-glass-bg {
    --fa-widget-bg-1-dark: #0c1828;
    --fa-widget-bg-2-dark: #14203a;
    --fa-widget-bg-3-dark: #1a2a48;
    --fa-widget-bg-4-dark: #0a1220;
}

/* --- Tinker: teal / emerald (theme-1 = 6 95 70 / #065f46) --- */
.tinker .fa-glass-bg {
    --fa-widget-bg-1: #0a2e24;
    --fa-widget-bg-2: #0f4036;
    --fa-widget-bg-3: #145246;
    --fa-widget-bg-4: #082820;
}
.tinker .dark .fa-glass-bg {
    --fa-widget-bg-1-dark: #041a14;
    --fa-widget-bg-2-dark: #082820;
    --fa-widget-bg-3-dark: #0c382c;
    --fa-widget-bg-4-dark: #041610;
}

/* ============================================================
   30. LIQUID GLASS TOP BAR — shared base layer (all themes)
   Frosted, hairline-bordered 64px bar with unified 40x40 icon
   containers, glass search pill, gradient-ring avatar and calm
   breadcrumbs. Theme colours ONLY via rgb(var(--color-theme-*));
   Enigma/Icewall keep their dark gradient headers (tinted glass),
   their decorative bars and their existing !important fixes.
   ============================================================ */

/* --- 30.1 Bar surface ------------------------------------- */
.fa-glass-topbar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    height: 64px;
    position: relative;
    z-index: 51;
    background: rgb(255 255 255 / 0.62);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    backdrop-filter: blur(14px) saturate(1.6);
    border-bottom: 1px solid rgb(var(--color-theme-1) / 0.10);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
    padding-inline: 6px;
}
.dark .fa-glass-topbar {
    background: rgb(15 23 42 / 0.55);
    border-bottom-color: rgb(255 255 255 / 0.08);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}
/* Dark-header themes: tinted glass over the gradient, not white */
.enigma .fa-glass-topbar,
.icewall .fa-glass-topbar {
    background: rgb(var(--color-theme-1) / 0.28);
    border-bottom-color: rgb(255 255 255 / 0.12);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}
.dark .enigma .fa-glass-topbar,
.dark .icewall .fa-glass-topbar {
    background: rgb(15 23 42 / 0.45);
}

/* --- 30.2 Unified icon buttons (40x40, r12) ---------------- */
.fa-tb-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    transition: background-color 0.18s ease, color 0.18s ease,
                box-shadow 0.18s ease, transform 0.18s ease;
}
.fa-tb-iconbtn:hover {
    background: rgb(var(--color-theme-1) / 0.08);
    color: rgb(var(--color-theme-1));
}
.fa-tb-iconbtn:active { transform: scale(0.94); }
.fa-tb-iconbtn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgb(255 255 255 / 0.9),
                0 0 0 4px rgb(var(--color-theme-1) / 0.45);
}
.dark .fa-tb-iconbtn:hover {
    background: rgb(var(--color-theme-1) / 0.22);
    color: rgb(255 255 255 / 0.95);
}
.dark .fa-tb-iconbtn:focus-visible {
    box-shadow: 0 0 0 2px rgb(15 23 42 / 0.9),
                0 0 0 4px rgb(var(--color-theme-1) / 0.55);
}
.enigma .fa-tb-iconbtn:hover,
.icewall .fa-tb-iconbtn:hover {
    background: rgb(255 255 255 / 0.12);
    color: #fff;
}
.enigma .fa-tb-iconbtn:focus-visible,
.icewall .fa-tb-iconbtn:focus-visible {
    box-shadow: 0 0 0 2px rgb(var(--color-theme-2) / 0.9),
                0 0 0 4px rgb(255 255 255 / 0.35);
}
/* Wide variant — kept only for legacy consumers; Push toggle and
   language button were converted to standard 40px glass icon
   buttons in task #617. */
.fa-tb-iconbtn--wide {
    width: auto;
    min-height: 40px;
    padding-inline: 12px;
    gap: 6px;
}
button.fa-tb-iconbtn--wide {
    border: 1px solid rgb(var(--color-theme-1) / 0.10);
    background: rgb(255 255 255 / 0.42);
    border-radius: 999px;
}
.dark button.fa-tb-iconbtn--wide {
    border-color: rgb(255 255 255 / 0.14);
    background: rgb(255 255 255 / 0.06);
}
.enigma button.fa-tb-iconbtn--wide,
.icewall button.fa-tb-iconbtn--wide {
    border-color: rgb(255 255 255 / 0.22);
    background: rgb(255 255 255 / 0.10);
}

/* --- 30.3 Badges: small pills pinned to the icon corner ---- */
.fa-tb-badge {
    top: -4px;
    right: auto;
    inset-inline-end: -4px;
    height: 16px;
    min-width: 16px;
    padding-inline: 4px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px rgb(255 255 255 / 0.9);
}
.dark .fa-tb-badge { box-shadow: 0 0 0 2px rgb(30 41 59 / 0.9); }
.enigma .fa-tb-badge,
.icewall .fa-tb-badge { box-shadow: 0 0 0 2px rgb(var(--color-theme-2) / 0.9); }

/* --- 30.4 Glass search pill -------------------------------- */
/* Wrapper: single-row flex item, vertically centred in the bar.
   Never taller than the pill, so it can no longer push the pill
   above (or the stray icon below) the 64px bar line. */
.fa-tb-search {
    display: flex;
    align-items: center;
    align-self: center;
    flex: none;
}
/* Mobile search icon must NEVER render once the pill is visible.
   Specificity (0,2,0) beats .fa-tb-iconbtn's display:inline-flex
   regardless of stylesheet order (this file loads after app.css). */
@media (min-width: 640px) {
    .fa-tb-search .fa-tb-mobile-search { display: none; }
}
/* #808: the pill is now the Ctrl+K omnibox trigger (a <button>, not a text
   input), so it no longer needs an input-sized width. Narrow it to a compact
   pill on large screens and collapse to an icon-only 40px square below 1024px
   so it never crowds the attendance pill / avatar. Height (40px), glass,
   tokens and the dark mirror all live on .fa-tb-search__trigger
   (command-palette.css §0.1); specificity (0,2,0) beats that (0,1,0) so these
   overrides win regardless of stylesheet order. */
.fa-tb-search .relative { width: 190px; }
@media (max-width: 1279px) { .fa-tb-search .relative { width: 170px; } }
@media (max-width: 1023px) {
    .fa-tb-search .relative { width: auto; }
    .fa-tb-search .fa-tb-search__trigger {
        width: 40px;
        padding-inline: 0;
        justify-content: center;
    }
    .fa-tb-search .fa-tb-search__hint,
    .fa-tb-search .fa-tb-search__trigger .cmdk-topbar-kbd { display: none; }
}
.fa-tb-search input[type="text"] {
    width: 100%;
    height: 40px;
    background: rgb(255 255 255 / 0.55);
    border: 1px solid rgb(var(--color-theme-1) / 0.14);
    border-radius: 999px;
    padding-inline-start: 1rem;
    padding-inline-end: 2.25rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease,
                background-color 0.18s ease;
}
.fa-tb-search input[type="text"]:focus {
    outline: none;
    background: rgb(255 255 255 / 0.85);
    border-color: rgb(var(--color-theme-1) / 0.5);
    box-shadow: 0 0 0 4px rgb(var(--color-theme-1) / 0.14);
}
.fa-tb-search i[data-lucide="search"] {
    transition: color 0.18s ease;
    pointer-events: none;
}
.fa-tb-search .relative:focus-within i[data-lucide="search"] {
    color: rgb(var(--color-theme-1));
}
.dark .fa-tb-search input[type="text"] {
    background: rgb(15 23 42 / 0.45);
    border-color: rgb(255 255 255 / 0.12);
}
.dark .fa-tb-search input[type="text"]:focus {
    background: rgb(15 23 42 / 0.7);
    border-color: rgb(var(--color-theme-1) / 0.6);
    box-shadow: 0 0 0 4px rgb(var(--color-theme-1) / 0.2);
}
.enigma .fa-tb-search input[type="text"],
.icewall .fa-tb-search input[type="text"] {
    background: rgb(255 255 255 / 0.12);
    border-color: rgb(255 255 255 / 0.18);
}

/* --- 30.5 Avatar: theme gradient ring + soft shadow -------- */
.fa-tb-avatar {
    width: 40px;
    height: 40px;
    padding: 2px;
    /* Task #621: uniform neutral ring — the old 135deg gradient read as a
       stray blue crescent when the photo did not cover the ring evenly. */
    background: rgb(var(--color-theme-1) / 0.18);
    box-shadow: 0 4px 14px -6px rgb(var(--color-theme-1) / 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dark .fa-tb-avatar {
    background: rgb(255 255 255 / 0.14);
    box-shadow: 0 4px 14px -6px rgb(0 0 0 / 0.5);
}
.enigma .fa-tb-avatar,
.icewall .fa-tb-avatar {
    background: rgb(255 255 255 / 0.22);
}
.fa-tb-avatar:hover { transform: scale(1.05); }
.fa-tb-avatar:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgb(255 255 255 / 0.9),
                0 0 0 4px rgb(var(--color-theme-1) / 0.45);
}
.fa-tb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9999px;
}

/* --- 30.6 User name beside avatar (lg+ only) --------------- */
.fa-tb-account { display: flex; align-items: center; }
.fa-tb-user {
    display: none;
    flex-direction: column;
    line-height: 1.2;
    margin-inline-start: 10px;
    white-space: nowrap;
}
@media (min-width: 1024px) { .fa-tb-user { display: flex; } }
.fa-tb-user__name {
    font-size: 13px;
    font-weight: 700;
    color: rgb(15 23 42 / 0.8);
}
.fa-tb-user__job {
    font-size: 11px;
    font-weight: 500;
    color: rgb(15 23 42 / 0.5);
}
.dark .fa-tb-user__name { color: rgb(255 255 255 / 0.92); }
.dark .fa-tb-user__job  { color: rgb(255 255 255 / 0.55); }
.enigma .fa-tb-user__name,
.icewall .fa-tb-user__name { color: #fff; }
.enigma .fa-tb-user__job,
.icewall .fa-tb-user__job { color: rgb(255 255 255 / 0.65); }

/* --- 30.7 Breadcrumbs: calm secondary text, thin chevron --- */
.fa-tb-crumb ol li a {
    font-size: 13px;
    font-weight: 600;
    color: rgb(var(--color-theme-1) / 0.95);
    transition: color 0.18s ease;
}
.fa-tb-crumb ol li a:hover { color: rgb(var(--color-theme-1)); }
.fa-tb-crumb ol li + li,
.fa-tb-crumb ol li + li a {
    color: rgb(15 23 42 / 0.55);
    font-weight: 500;
}
.fa-tb-crumb ol li + li a:hover { color: rgb(var(--color-theme-1) / 0.8); }
.fa-tb-crumb ol li::before { opacity: 0.5; }
.dark .fa-tb-crumb ol li a { color: rgb(255 255 255 / 0.9); }
.dark .fa-tb-crumb ol li + li,
.dark .fa-tb-crumb ol li + li a { color: rgb(255 255 255 / 0.55); }

/* --- 30.8 Mobile (<=767px): compact bar -------------------- */
@media (max-width: 767px) {
    .fa-glass-topbar { height: 56px; padding-inline: 2px; }
    .fa-tb-iconbtn { width: 36px; height: 36px; border-radius: 10px; }
    .fa-tb-iconbtn--wide { min-height: 36px; padding-inline: 10px; }
    .fa-tb-avatar { width: 36px; height: 36px; }
}

/* --- 30.9 Reduced motion ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .fa-glass-topbar,
    .fa-glass-topbar *,
    .fa-glass-topbar *::before,
    .fa-glass-topbar *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    .fa-tb-iconbtn:active,
    .fa-tb-avatar:hover { transform: none !important; }
}

/* ============================================================
   31. TOPBAR POLISH (task #617)
   31.1 Rounded glass icon buttons (bell / push / zap / globe / grid)
   31.2 Glass dropdown panels (.fa-dd) — notifications, quick access,
        language, search results
   31.3 Notification rows with type-coloured icons + unread dot
   31.4 Language menu with neutral text badges (no flag emojis)
   31.5 RTL sidebar density — keep long Arabic titles to <= 2 lines
   ============================================================ */

/* --- 31.1 Round glass icon buttons ------------------------- */
.fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn) {
    width: 40px;
    height: 40px;
    flex: none;
    position: relative;
    border-radius: 999px;
    border: 1px solid rgb(var(--color-theme-1) / 0.10);
    background: rgb(255 255 255 / 0.42);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn):hover {
    background: rgb(var(--color-theme-1) / 0.10);
    border-color: rgb(var(--color-theme-1) / 0.25);
    color: rgb(var(--color-theme-1) / 1);
}
.dark .fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn) {
    background: rgb(255 255 255 / 0.06);
    border-color: rgb(255 255 255 / 0.12);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}
.dark .fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn):hover {
    background: rgb(var(--color-theme-1) / 0.22);
    border-color: rgb(var(--color-theme-1) / 0.4);
    color: rgb(255 255 255 / 0.95);
}
/* Enigma/Icewall dark headers */
.enigma .fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn),
.icewall .fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn) {
    background: rgb(255 255 255 / 0.10);
    border-color: rgb(255 255 255 / 0.22);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
}
.enigma .fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn):hover,
.icewall .fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn):hover {
    background: rgb(255 255 255 / 0.18);
    border-color: rgb(255 255 255 / 0.35);
    color: rgb(255 255 255 / 1);
}
@media (max-width: 767px) {
    .fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn) {
        width: 36px;
        height: 36px;
        border-radius: 999px;
    }
}

/* --- 31.2 Glass dropdown panels ---------------------------- */
/* Task #623: rules written against the REAL classes rendered by
   resources/views/sportmans/partials/topbar.blade.php —
   wrappers: .dropdown-menu (notifications / quick access / language /
   account) and .search-result (search); surface: .fa-dd inside them.
   Panels are genuinely near-opaque (0.98) so the dark dashboard cards
   can never bleed through, in light AND dark modes.
   Task #627: Midone's dropdown.js DETACHES .dropdown-menu and appends
   it to <body> while open (appendTo("body"), vendors/dropdown.js),
   so `.fa-glass-topbar .fa-dd…` never matched the OPEN panel — the
   root cause of the "transparent dropdowns / horizontal language
   list" despite fresh CSS. :is(.fa-glass-topbar, body) covers both
   attached (closed/search) and detached (open) states; the fa-*
   classes are exclusive to topbar.blade.php so body-scoping is safe.
   Positioning rules below stay topbar-scoped on purpose (Popper
   owns positioning once detached). */
:is(.fa-glass-topbar, body) .fa-dd {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgb(15 23 42 / 0.12);
    background: rgb(255 255 255 / 0.98);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 24px 60px rgb(2 6 23 / 0.28),
                0 4px 14px rgb(2 6 23 / 0.12),
                inset 0 1px 0 rgb(255 255 255 / 0.55);
}
.dark :is(.fa-glass-topbar, body) .fa-dd,
.enigma :is(.fa-glass-topbar, body) .fa-dd,
.icewall :is(.fa-glass-topbar, body) .fa-dd {
    background: rgb(17 24 39 / 0.98);
    border-color: rgb(255 255 255 / 0.12);
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.55),
                0 4px 14px rgb(0 0 0 / 0.35),
                inset 0 1px 0 rgb(255 255 255 / 0.06);
}
/* Task #623: cap every topbar panel (incl. the account menu surface,
   which is a plain .dropdown-content) at 70vh with its own scrollbar
   so a long notification list can never stretch the header or the
   page. */
:is(.fa-glass-topbar, body) .dropdown-menu .dropdown-content,
:is(.fa-glass-topbar, body) .search-result .fa-dd {
    max-height: 70vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
:is(.fa-glass-topbar, body) .fa-dd__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgb(var(--color-theme-1) / 0.10);
}
.dark :is(.fa-glass-topbar, body) .fa-dd__head,
.enigma :is(.fa-glass-topbar, body) .fa-dd__head,
.icewall :is(.fa-glass-topbar, body) .fa-dd__head {
    border-bottom-color: rgb(255 255 255 / 0.08);
}
:is(.fa-glass-topbar, body) .fa-dd__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: rgb(15 23 42 / 0.9);
}
.dark :is(.fa-glass-topbar, body) .fa-dd__title,
.enigma :is(.fa-glass-topbar, body) .fa-dd__title,
.icewall :is(.fa-glass-topbar, body) .fa-dd__title {
    color: rgb(255 255 255 / 0.92);
}
:is(.fa-glass-topbar, body) .fa-dd__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding-inline: 6px;
    margin-inline-start: 4px;
    border-radius: 999px;
    background: rgb(var(--color-danger) / 0.9);
    color: rgb(255 255 255 / 1);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
:is(.fa-glass-topbar, body) .fa-dd__action {
    margin-inline-start: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(var(--color-theme-1) / 1);
    border-radius: 8px;
    padding: 4px 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
:is(.fa-glass-topbar, body) .fa-dd__action:hover {
    background: rgb(var(--color-theme-1) / 0.10);
}
:is(.fa-glass-topbar, body) .fa-dd__action--danger {
    color: rgb(var(--color-danger) / 0.9);
}
:is(.fa-glass-topbar, body) .fa-dd__action--danger:hover {
    background: rgb(var(--color-danger) / 0.10);
}
:is(.fa-glass-topbar, body) .fa-dd__list {
    max-height: 330px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--color-theme-1) / 0.35) rgb(0 0 0 / 0);
}
:is(.fa-glass-topbar, body) .fa-dd__list::-webkit-scrollbar { width: 4px; }
:is(.fa-glass-topbar, body) .fa-dd__list::-webkit-scrollbar-track { background: rgb(0 0 0 / 0); }
:is(.fa-glass-topbar, body) .fa-dd__list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgb(var(--color-theme-1) / 0.35);
}
:is(.fa-glass-topbar, body) .fa-dd__empty {
    padding: 28px 12px;
    text-align: center;
    font-size: 0.8125rem;
    color: rgb(100 116 139 / 0.9);
}
.dark :is(.fa-glass-topbar, body) .fa-dd__empty,
.enigma :is(.fa-glass-topbar, body) .fa-dd__empty,
.icewall :is(.fa-glass-topbar, body) .fa-dd__empty {
    color: rgb(148 163 184 / 0.9);
}
/* Task #621 + #623: structural guarantee — dropdown panels must ALWAYS
   float above the page (never sit in the bar's flex flow) and the closed
   state must always collapse, even if a utility class is purged or
   overridden. Selectors mirror the REAL markup in
   resources/views/sportmans/partials/topbar.blade.php:
   .dropdown-menu wraps notifications / quick access / language / account,
   .search-result wraps the search panel. bottom-end placement, RTL-aware
   via inset-inline-end. !important so no purged/late utility can win. */
.fa-glass-topbar .dropdown-menu,
.fa-glass-topbar .search-result {
    position: absolute !important;
    top: 100% !important;
    inset-inline-end: 0;
    z-index: 9999;
    max-width: calc(100vw - 16px);
}
.fa-glass-topbar .dropdown-menu.hidden,
.fa-glass-topbar .search-result.hidden { display: none !important; }
/* The bar itself keeps its fixed height and never grows because of an
   open panel (panels are absolute, bar is the positioning context). */
:is(.fa-glass-topbar, body) {
    position: relative;
    z-index: 51;
}

/* --- 31.3 Notification rows -------------------------------- */
:is(.fa-glass-topbar, body) .fa-nt-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
:is(.fa-glass-topbar, body) .fa-nt-row + .fa-nt-row { margin-top: 2px; }
:is(.fa-glass-topbar, body) .fa-nt-row:hover {
    background: rgb(var(--color-theme-1) / 0.08);
    transform: translateY(-1px);
}
.dark :is(.fa-glass-topbar, body) .fa-nt-row:hover,
.enigma :is(.fa-glass-topbar, body) .fa-nt-row:hover,
.icewall :is(.fa-glass-topbar, body) .fa-nt-row:hover {
    background: rgb(255 255 255 / 0.08);
}
:is(.fa-glass-topbar, body) .fa-nt-ic {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
}
:is(.fa-glass-topbar, body) .fa-nt-ic svg,
:is(.fa-glass-topbar, body) .fa-nt-ic i[data-lucide] {
    width: 17px;
    height: 17px;
    stroke-width: 1.75;
}
/* Tone variants (light) */
:is(.fa-glass-topbar, body) .fa-nt-ic--sky     { background: rgb(56 189 248 / 0.16);  color: rgb(2 132 199 / 1); }
:is(.fa-glass-topbar, body) .fa-nt-ic--emerald { background: rgb(52 211 153 / 0.16);  color: rgb(4 120 87 / 1); }
:is(.fa-glass-topbar, body) .fa-nt-ic--amber   { background: rgb(251 191 36 / 0.18);  color: rgb(180 83 9 / 1); }
:is(.fa-glass-topbar, body) .fa-nt-ic--violet  { background: rgb(167 139 250 / 0.18); color: rgb(109 40 217 / 1); }
:is(.fa-glass-topbar, body) .fa-nt-ic--slate   { background: rgb(148 163 184 / 0.20); color: rgb(71 85 105 / 1); }
/* Tone variants (dark / dark-header themes) */
.dark :is(.fa-glass-topbar, body) .fa-nt-ic--sky,
.enigma :is(.fa-glass-topbar, body) .fa-nt-ic--sky,
.icewall :is(.fa-glass-topbar, body) .fa-nt-ic--sky     { background: rgb(56 189 248 / 0.18);  color: rgb(125 211 252 / 1); }
.dark :is(.fa-glass-topbar, body) .fa-nt-ic--emerald,
.enigma :is(.fa-glass-topbar, body) .fa-nt-ic--emerald,
.icewall :is(.fa-glass-topbar, body) .fa-nt-ic--emerald { background: rgb(52 211 153 / 0.18);  color: rgb(110 231 183 / 1); }
.dark :is(.fa-glass-topbar, body) .fa-nt-ic--amber,
.enigma :is(.fa-glass-topbar, body) .fa-nt-ic--amber,
.icewall :is(.fa-glass-topbar, body) .fa-nt-ic--amber   { background: rgb(251 191 36 / 0.18);  color: rgb(252 211 77 / 1); }
.dark :is(.fa-glass-topbar, body) .fa-nt-ic--violet,
.enigma :is(.fa-glass-topbar, body) .fa-nt-ic--violet,
.icewall :is(.fa-glass-topbar, body) .fa-nt-ic--violet  { background: rgb(167 139 250 / 0.20); color: rgb(196 181 253 / 1); }
.dark :is(.fa-glass-topbar, body) .fa-nt-ic--slate,
.enigma :is(.fa-glass-topbar, body) .fa-nt-ic--slate,
.icewall :is(.fa-glass-topbar, body) .fa-nt-ic--slate   { background: rgb(148 163 184 / 0.20); color: rgb(203 213 225 / 1); }
/* Unread dot */
:is(.fa-glass-topbar, body) .fa-nt-dot {
    position: absolute;
    top: -2px;
    inset-inline-end: -2px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgb(34 197 94 / 1);
    box-shadow: 0 0 0 2px rgb(255 255 255 / 0.95);
}
.dark :is(.fa-glass-topbar, body) .fa-nt-dot,
.enigma :is(.fa-glass-topbar, body) .fa-nt-dot,
.icewall :is(.fa-glass-topbar, body) .fa-nt-dot {
    box-shadow: 0 0 0 2px rgb(15 23 42 / 0.9);
}
:is(.fa-glass-topbar, body) .fa-nt-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}
:is(.fa-glass-topbar, body) .fa-nt-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal; /* task #628: never single-line-clip Arabic titles */
    word-break: break-word;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
    color: rgb(15 23 42 / 0.9);
}
.dark :is(.fa-glass-topbar, body) .fa-nt-text,
.enigma :is(.fa-glass-topbar, body) .fa-nt-text,
.icewall :is(.fa-glass-topbar, body) .fa-nt-text {
    color: rgb(255 255 255 / 0.92);
}
:is(.fa-glass-topbar, body) .fa-nt-time {
    margin-top: 2px;
    font-size: 0.6875rem;
    color: rgb(100 116 139 / 0.95);
}
.dark :is(.fa-glass-topbar, body) .fa-nt-time,
.enigma :is(.fa-glass-topbar, body) .fa-nt-time,
.icewall :is(.fa-glass-topbar, body) .fa-nt-time {
    color: rgb(148 163 184 / 0.9);
}

/* --- 31.4 Language menu rows ------------------------------- */
:is(.fa-glass-topbar, body) .fa-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
:is(.fa-glass-topbar, body) .fa-lang-item + .fa-lang-item { margin-top: 2px; }
:is(.fa-glass-topbar, body) .fa-lang-item:hover {
    background: rgb(var(--color-theme-1) / 0.08);
}
.dark :is(.fa-glass-topbar, body) .fa-lang-item:hover,
.enigma :is(.fa-glass-topbar, body) .fa-lang-item:hover,
.icewall :is(.fa-glass-topbar, body) .fa-lang-item:hover {
    background: rgb(255 255 255 / 0.08);
}
:is(.fa-glass-topbar, body) .fa-lang-item.is-active {
    background: rgb(var(--color-theme-1) / 0.10);
}
:is(.fa-glass-topbar, body) .fa-lang-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 26px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid rgb(var(--color-theme-1) / 0.18);
    background: rgb(var(--color-theme-1) / 0.08);
    color: rgb(var(--color-theme-1) / 1);
    font-size: 0.6875rem;
    font-weight: 800;
    line-height: 1;
}
.dark :is(.fa-glass-topbar, body) .fa-lang-badge,
.enigma :is(.fa-glass-topbar, body) .fa-lang-badge,
.icewall :is(.fa-glass-topbar, body) .fa-lang-badge {
    border-color: rgb(255 255 255 / 0.16);
    background: rgb(255 255 255 / 0.08);
    color: rgb(255 255 255 / 0.92);
}
:is(.fa-glass-topbar, body) .fa-lang-item.is-active .fa-lang-badge {
    background: rgb(var(--color-theme-1) / 0.9);
    border-color: rgb(var(--color-theme-1) / 0.9);
    color: rgb(255 255 255 / 1);
}
:is(.fa-glass-topbar, body) .fa-lang-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(15 23 42 / 0.85);
}
.dark :is(.fa-glass-topbar, body) .fa-lang-name,
.enigma :is(.fa-glass-topbar, body) .fa-lang-name,
.icewall :is(.fa-glass-topbar, body) .fa-lang-name {
    color: rgb(255 255 255 / 0.88);
}
:is(.fa-glass-topbar, body) .fa-lang-item.is-active .fa-lang-name {
    color: rgb(var(--color-theme-1) / 1);
}
.dark :is(.fa-glass-topbar, body) .fa-lang-item.is-active .fa-lang-name,
.enigma :is(.fa-glass-topbar, body) .fa-lang-item.is-active .fa-lang-name,
.icewall :is(.fa-glass-topbar, body) .fa-lang-item.is-active .fa-lang-name {
    color: rgb(255 255 255 / 1);
}
:is(.fa-glass-topbar, body) .fa-lang-check {
    margin-inline-start: auto;
    color: rgb(var(--color-theme-1) / 1);
}
.dark :is(.fa-glass-topbar, body) .fa-lang-check,
.enigma :is(.fa-glass-topbar, body) .fa-lang-check,
.icewall :is(.fa-glass-topbar, body) .fa-lang-check {
    color: rgb(255 255 255 / 0.9);
}

/* --- 31.4b Panel widths (task #628) -------------------------
   The only widths the panels had were Tailwind arbitrary utilities in
   topbar.blade.php (w-[300px] sm:w-[360px], w-52, …). When those
   utilities are missing/stale in the compiled app.css the panels fall
   back to content width → the notification panel came out narrow and
   Arabic titles were clipped mid-word («تم قبول طلب فتح…»). Set the
   widths in CSS with the :is() form so they apply to the OPEN panel
   even after dropdown.js detaches .dropdown-menu onto <body>. The
   max-width caps guarantee the panel never overflows small viewports. */
:is(.fa-glass-topbar, body) .fa-dd--notif {
    width: 380px;
    min-width: 340px;
    max-width: calc(100vw - 2rem);
}
:is(.fa-glass-topbar, body) .search-result .fa-dd--panel {
    width: 340px;
    max-width: calc(100vw - 2rem);
}
:is(.fa-glass-topbar, body) .dropdown-menu .fa-dd--panel {
    width: 320px;
    max-width: calc(100vw - 2rem);
}
/* User/language menu: comfortable but compact (w-52 = 208px markup
   fallback was too tight for Arabic labels). */
:is(.fa-glass-topbar, body) .fa-dd--menu {
    width: 260px;
    max-width: calc(100vw - 2rem);
}

/* --- 31.4c No underlines inside header dropdown panels (task #629)
   Links in the Quick Access panel (.fa-dd--panel), Notifications
   (.fa-dd--notif, rows are <a class="fa-nt-row">), Language menu
   (.fa-dd--menu) and the search-result panel rendered WITH an
   underline (browser/global anchor rule winning over the panel
   styles). Strip it in every state. Same :is() form as the panel
   widths above: dropdown.js detaches .dropdown-menu onto <body>
   when a panel opens, so the rules must match body descendants
   too. !important because bootstrap/app.css anchor rules and the
   detached-body context otherwise tie or win on specificity. */
:is(.fa-glass-topbar, body) .fa-dd--panel a,
:is(.fa-glass-topbar, body) .fa-dd--notif a,
:is(.fa-glass-topbar, body) .fa-dd--menu a,
:is(.fa-glass-topbar, body) .search-result a {
    text-decoration: none !important;
}
:is(.fa-glass-topbar, body) .fa-dd--panel a:hover,
:is(.fa-glass-topbar, body) .fa-dd--notif a:hover,
:is(.fa-glass-topbar, body) .fa-dd--menu a:hover,
:is(.fa-glass-topbar, body) .search-result a:hover,
:is(.fa-glass-topbar, body) .fa-dd--panel a:focus,
:is(.fa-glass-topbar, body) .fa-dd--notif a:focus,
:is(.fa-glass-topbar, body) .fa-dd--menu a:focus,
:is(.fa-glass-topbar, body) .search-result a:focus {
    text-decoration: none !important;
}
/* Notification rows: title + time spans inherit the anchor
   decoration in some engines — force the row itself clean. */
:is(.fa-glass-topbar, body) .fa-nt-row,
:is(.fa-glass-topbar, body) .fa-nt-row .fa-nt-text,
:is(.fa-glass-topbar, body) .fa-nt-row .fa-nt-time {
    text-decoration: none !important;
}

/* --- 31.4d Quick Access rows: hover parity with notifications (task #630)
   Notification rows (a.fa-nt-row) get a rounded theme-tinted hover
   (§31.3) but Quick Access rows — the <a> items JS injects into
   #quickAccessList > .fa-dd__list inside .fa-dd--panel — had no
   highlight at all. Mirror the notification hover EXACTLY: same
   background (rgb(var(--color-theme-1) / 0.08)), same 12px radius,
   same 0.15s ease background transition. display:flex + comfortable
   padding reproduce the row feel since the injected anchors carry
   only Tailwind utilities that may be purged. Scoped to
   .dropdown-menu .fa-dd--panel .fa-dd__list so the search-result
   page list is untouched. Same :is() form as the rest of §31.4:
   dropdown.js detaches .dropdown-menu onto <body> when the panel
   opens, so the rule must match body descendants too. */
:is(.fa-glass-topbar, body) .dropdown-menu .fa-dd--panel .fa-dd__list a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    transition: background-color 0.15s ease;
}
:is(.fa-glass-topbar, body) .dropdown-menu .fa-dd--panel .fa-dd__list a:hover {
    background: rgb(var(--color-theme-1) / 0.08);
}
.dark :is(.fa-glass-topbar, body) .dropdown-menu .fa-dd--panel .fa-dd__list a:hover,
.enigma :is(.fa-glass-topbar, body) .dropdown-menu .fa-dd--panel .fa-dd__list a:hover,
.icewall :is(.fa-glass-topbar, body) .dropdown-menu .fa-dd--panel .fa-dd__list a:hover {
    background: rgb(255 255 255 / 0.08);
}

/* --- 31.5 RTL sidebar density ------------------------------
   Long Arabic titles (e.g. «توصيات القرارات التنفيذية») wrapped to
   3 lines in the 230px sidebar. Shrink trailing padding, icon gap
   and title font so items stay at <= 2 lines. RTL-only: LTR keeps
   its nowrap rule from compat-fixes.css. padding-right is preserved
   (Rubick's active-pill curves anchor to it). */
[dir="rtl"] nav.side-nav .side-menu {
    height: auto !important;
    min-height: 50px;
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 0.5rem !important;
}
[dir="rtl"] nav.side-nav .side-menu > .side-menu__icon {
    width: 1.375rem !important;
    height: 1.375rem !important;
    margin-left: 0.375rem !important;
}
[dir="rtl"] nav.side-nav .side-menu > .side-menu__title {
    margin-right: 0.5rem !important;
    font-size: 0.82rem;
    line-height: 1.5;
}
[dir="rtl"] nav.side-nav .side-menu > .side-menu__sub-icon {
    margin-left: 0.75rem !important;
}
[dir="rtl"] nav.side-nav .side-menu > .side-menu__badge {
    flex: none;
    font-size: 10px;
    padding: 1px 6px;
}
[dir="rtl"] nav.side-nav .side-menu .side-menu__star {
    width: 18px;
    height: 18px;
}
[dir="rtl"] nav.side-nav .side-menu .side-menu__star svg {
    width: 14px;
    height: 14px;
}
/* Rubick active pill: the :after curve uses margin-top:50px, which
   lands mid-row once the row grows taller — pin it to the bottom.
   مهمة #641: التثبيت السابق بـ bottom:0 كان رجعةً — يضع المنحنى (30px)
   داخل صندوق الحبة نفسه (بلون خلفيتها فيختفي) وتبدو الزاوية السفلية
   مربّعة. الصحيح: top:100% فيرتكز أعلى المنحنى على أسفل الحبة دائماً
   (مطابق لـ margin-top:50px عند ارتفاع 50px، وصحيح للصفوف الأطول). */
[dir="rtl"] .rubick .side-nav > ul > li > .side-menu.side-menu--active:after {
    top: 100% !important;
    bottom: auto !important;
    margin-top: 0 !important;
}

/* ============================================================
   32. ATTENDANCE FINGERPRINT PILL + ACTIONS POPOVER (task #805)
   32.1 Pill geometry + glass surface (40px, r999)
   32.2 Fingerprint mark + state dot (idle / live / done)
   32.3 Pill value: monospace timer ↔ short CTA (state-driven)
   32.4 Dark mirror + enigma/icewall dark headers
   32.5 Mobile (<=639px): icon-only pill
   32.6 Popover surface: state row, big clock, fact rows
   32.7 Actions: >=44px buttons, note, undo, page link
   32.8 In-flight dimming (single action button)
   32.9 [hidden] guarantees (JS toggles the action groups)
   32.10 Reduced motion

   Markup lives in resources/views/sportmans/partials/topbar-attendance.blade.php
   and renders INSIDE .fa-glass-topbar. Midone's dropdown.js detaches the open
   .dropdown-menu onto <body> (see §31.2), so every popover rule below uses the
   :is(.fa-glass-topbar, body) form — the fa-att-* classes are exclusive to that
   partial, so body-scoping is safe.
   Tokens only: rgb(var(--color-*) / α), rgb(255 255 255 / α), rgb(15 23 42 / α)
   and literal rgb triplets for the neutral slate (same convention as §31.3).
   Zero hex, zero rgba(). Logical properties throughout (RTL-first).
   ============================================================ */

/* --- 32.1 Pill geometry + glass surface --------------------- */
.fa-glass-topbar .fa-att {
    display: flex;
    align-items: center;
    align-self: center;
    flex: none;
}
/* (0,3,0) — ties §31.1's .fa-glass-topbar .fa-tb-iconbtn:not(.cmdk-topbar-btn)
   and wins on source order (this section is last), so the pill keeps its content
   width instead of the 40px icon-box width while still inheriting the shared
   icon-button glass family. */
.fa-glass-topbar .fa-tb-iconbtn.fa-att-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    height: 40px;
    flex: none;
    padding-inline: 12px;
    border-radius: 999px;
    border: 1px solid rgb(var(--color-theme-1) / 0.14);
    background: rgb(255 255 255 / 0.55);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35);
    color: rgb(15 23 42 / 0.72);
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease,
                background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:hover {
    background: rgb(255 255 255 / 0.85);
    border-color: rgb(var(--color-theme-1) / 0.5);
    color: rgb(var(--color-theme-1) / 1);
}
.fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:active { transform: scale(0.97); }
.fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:focus-visible {
    outline: none;
    background: rgb(255 255 255 / 0.85);
    border-color: rgb(var(--color-theme-1) / 0.5);
    box-shadow: 0 0 0 4px rgb(var(--color-theme-1) / 0.14);
}
/* Checked-in: a calm THEME edge so the pill reads "running" at a glance.
   Task #805 revision (user, 2026-09-12): green is reserved for the semantic
   DOT only — the pill chrome rides --color-theme-1 so it follows the selected
   template instead of a fixed lime green. */
.fa-glass-topbar .fa-tb-iconbtn.fa-att-pill[data-att-state="checked_in"] {
    border-color: rgb(var(--color-theme-1) / 0.4);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4),
                0 0 0 1px rgb(var(--color-theme-1) / 0.12);
}

/* --- 32.2 Fingerprint mark + state dot ---------------------- */
.fa-att-pill__mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 22px;
    height: 22px;
}
.fa-att-pill__icon {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
    color: inherit;
    opacity: 0.85;
    transition: opacity 0.18s ease, color 0.18s ease;
}
.fa-att-pill:hover .fa-att-pill__icon { opacity: 1; }
.fa-att-dot {
    position: absolute;
    inset-block-start: -2px;
    inset-inline-end: -4px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgb(255 255 255 / 0.95);
    background: rgb(148 163 184 / 1);
}
.fa-att-dot--idle { background: rgb(148 163 184 / 1); }
.fa-att-dot--live { background: rgb(var(--color-success) / 1); }
.fa-att-dot--done { background: rgb(var(--color-theme-1) / 1); }
@keyframes faAttDotPulse {
    0%   { box-shadow: 0 0 0 2px rgb(255 255 255 / 0.95), 0 0 0 0 rgb(var(--color-success) / 0.5); }
    70%  { box-shadow: 0 0 0 2px rgb(255 255 255 / 0.95), 0 0 0 6px rgb(var(--color-success) / 0); }
    100% { box-shadow: 0 0 0 2px rgb(255 255 255 / 0.95), 0 0 0 0 rgb(var(--color-success) / 0); }
}
.fa-att-dot--live { animation: faAttDotPulse 2.4s ease-out infinite; }

/* --- 32.3 Pill value: monospace timer ↔ short CTA ----------- */
.fa-att-pill__value {
    display: inline-flex;
    align-items: center;
    flex: none;
}
.fa-att-pill__timer {
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono",
                 Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "zero" 1;
    color: inherit;
}
.fa-att-pill__cta {
    display: none;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    color: inherit;
}
/* State swap is pure CSS: JS only flips data-att-state + the text. */
.fa-att-pill[data-att-state="not_checked_in"] .fa-att-pill__timer { display: none; }
.fa-att-pill[data-att-state="not_checked_in"] .fa-att-pill__cta { display: inline-block; }

/* --- 32.4 Dark mirror + enigma/icewall dark headers --------- */
.dark .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill {
    background: rgb(15 23 42 / 0.45);
    border-color: rgb(255 255 255 / 0.12);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
    color: rgb(255 255 255 / 0.82);
}
.dark .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:hover,
.dark .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:focus-visible {
    background: rgb(15 23 42 / 0.7);
    border-color: rgb(var(--color-theme-1) / 0.6);
    color: rgb(255 255 255 / 0.96);
    box-shadow: 0 0 0 4px rgb(var(--color-theme-1) / 0.2);
}
.dark .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill[data-att-state="checked_in"] {
    border-color: rgb(var(--color-theme-1) / 0.6);
}
.dark .fa-att-dot {
    box-shadow: 0 0 0 2px rgb(15 23 42 / 0.92);
}
.dark .fa-att-dot--live { animation-name: faAttDotPulseDark; }
@keyframes faAttDotPulseDark {
    0%   { box-shadow: 0 0 0 2px rgb(15 23 42 / 0.92), 0 0 0 0 rgb(var(--color-success) / 0.55); }
    70%  { box-shadow: 0 0 0 2px rgb(15 23 42 / 0.92), 0 0 0 6px rgb(var(--color-success) / 0); }
    100% { box-shadow: 0 0 0 2px rgb(15 23 42 / 0.92), 0 0 0 0 rgb(var(--color-success) / 0); }
}
.enigma .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill,
.icewall .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill {
    background: rgb(255 255 255 / 0.12);
    border-color: rgb(255 255 255 / 0.20);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
    color: rgb(255 255 255 / 0.9);
}
.enigma .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:hover,
.icewall .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:hover,
.enigma .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:focus-visible,
.icewall .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:focus-visible {
    background: rgb(255 255 255 / 0.2);
    border-color: rgb(255 255 255 / 0.36);
    color: rgb(255 255 255 / 1);
    box-shadow: 0 0 0 4px rgb(255 255 255 / 0.14);
}
.enigma .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill[data-att-state="checked_in"],
.icewall .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill[data-att-state="checked_in"] {
    border-color: rgb(255 255 255 / 0.5);
}
.enigma .fa-att-dot,
.icewall .fa-att-dot {
    box-shadow: 0 0 0 2px rgb(var(--color-theme-2) / 0.9);
}
.enigma .fa-att-dot--done,
.icewall .fa-att-dot--done {
    background: rgb(255 255 255 / 1);
}

/* --- 32.5 Mobile (<=639px): icon-only pill ------------------- */
@media (max-width: 639px) {
    .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill {
        width: 40px;
        padding-inline: 0;
        justify-content: center;
    }
    .fa-att-pill__value { display: none; }
}

/* --- 32.6 Popover surface ------------------------------------ */
:is(.fa-glass-topbar, body) .fa-dd--att {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 330px;
    max-width: calc(100vw - 2rem);
}
:is(.fa-glass-topbar, body) .fa-att-head { align-items: center; gap: 10px; }
:is(.fa-glass-topbar, body) .fa-att-head__ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgb(var(--color-theme-1) / 0.10);
    color: rgb(var(--color-theme-1) / 1);
}
:is(.fa-glass-topbar, body) .fa-att-head__ic svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.75;
}
:is(.fa-glass-topbar, body) .fa-att-head__txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
:is(.fa-glass-topbar, body) .fa-att-head__date {
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgb(100 116 139 / 0.95);
}
.dark :is(.fa-glass-topbar, body) .fa-att-head__date,
.enigma :is(.fa-glass-topbar, body) .fa-att-head__date,
.icewall :is(.fa-glass-topbar, body) .fa-att-head__date {
    color: rgb(148 163 184 / 0.9);
}
/* State row — the single aria-live surface for state changes. */
:is(.fa-glass-topbar, body) .fa-att-state {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgb(148 163 184 / 0.13);
}
:is(.fa-glass-topbar, body) .fa-att-state .fa-att-dot {
    position: static;
    flex: none;
    box-shadow: none;
}
:is(.fa-glass-topbar, body) .fa-dd--att[data-att-state="checked_in"] .fa-att-state {
    background: rgb(var(--color-theme-1) / 0.12);
}
:is(.fa-glass-topbar, body) .fa-dd--att[data-att-state="checked_out"] .fa-att-state {
    background: rgb(var(--color-theme-1) / 0.10);
}
:is(.fa-glass-topbar, body) .fa-att-state__label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgb(15 23 42 / 0.88);
}
.dark :is(.fa-glass-topbar, body) .fa-att-state__label,
.enigma :is(.fa-glass-topbar, body) .fa-att-state__label,
.icewall :is(.fa-glass-topbar, body) .fa-att-state__label {
    color: rgb(255 255 255 / 0.92);
}
/* Big monospace clock on a tinted glass plate. */
:is(.fa-glass-topbar, body) .fa-att-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 10px 10px;
    border-radius: 14px;
    border: 1px solid rgb(var(--color-theme-1) / 0.12);
    background: rgb(var(--color-theme-1) / 0.06);
}
.dark :is(.fa-glass-topbar, body) .fa-att-clock,
.enigma :is(.fa-glass-topbar, body) .fa-att-clock,
.icewall :is(.fa-glass-topbar, body) .fa-att-clock {
    border-color: rgb(255 255 255 / 0.10);
    background: rgb(255 255 255 / 0.05);
}
:is(.fa-glass-topbar, body) .fa-att-clock__value {
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono",
                 Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "zero" 1;
    color: rgb(var(--color-theme-1) / 1);
}
.dark :is(.fa-glass-topbar, body) .fa-att-clock__value,
.enigma :is(.fa-glass-topbar, body) .fa-att-clock__value,
.icewall :is(.fa-glass-topbar, body) .fa-att-clock__value {
    color: rgb(255 255 255 / 0.96);
}
:is(.fa-glass-topbar, body) .fa-att-clock__unit {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(100 116 139 / 0.95);
}
:is(.fa-glass-topbar, body) .fa-att-clock__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgb(100 116 139 / 0.85);
}
.dark :is(.fa-glass-topbar, body) .fa-att-clock__unit,
.dark :is(.fa-glass-topbar, body) .fa-att-clock__label,
.enigma :is(.fa-glass-topbar, body) .fa-att-clock__unit,
.enigma :is(.fa-glass-topbar, body) .fa-att-clock__label,
.icewall :is(.fa-glass-topbar, body) .fa-att-clock__unit,
.icewall :is(.fa-glass-topbar, body) .fa-att-clock__label {
    color: rgb(148 163 184 / 0.9);
}
/* Fact rows: shift window / day hours / punch times. */
:is(.fa-glass-topbar, body) .fa-att-rows {
    display: flex;
    flex-direction: column;
}
:is(.fa-glass-topbar, body) .fa-att-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 2px;
    border-bottom: 1px dashed rgb(var(--color-theme-1) / 0.12);
}
.dark :is(.fa-glass-topbar, body) .fa-att-row,
.enigma :is(.fa-glass-topbar, body) .fa-att-row,
.icewall :is(.fa-glass-topbar, body) .fa-att-row {
    border-bottom-color: rgb(255 255 255 / 0.08);
}
:is(.fa-glass-topbar, body) .fa-att-row:last-child { border-bottom: 0; }
:is(.fa-glass-topbar, body) .fa-att-row__k {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 0.7813rem;
    font-weight: 600;
    color: rgb(71 85 105 / 1);
}
.dark :is(.fa-glass-topbar, body) .fa-att-row__k,
.enigma :is(.fa-glass-topbar, body) .fa-att-row__k,
.icewall :is(.fa-glass-topbar, body) .fa-att-row__k {
    color: rgb(203 213 225 / 0.9);
}
:is(.fa-glass-topbar, body) .fa-att-row__k svg {
    width: 15px;
    height: 15px;
    flex: none;
    stroke-width: 1.75;
    color: rgb(var(--color-theme-1) / 0.85);
}
:is(.fa-glass-topbar, body) .fa-att-row__v {
    flex: none;
    font-size: 0.7813rem;
    font-weight: 700;
    color: rgb(15 23 42 / 0.9);
}
.dark :is(.fa-glass-topbar, body) .fa-att-row__v,
.enigma :is(.fa-glass-topbar, body) .fa-att-row__v,
.icewall :is(.fa-glass-topbar, body) .fa-att-row__v {
    color: rgb(255 255 255 / 0.94);
}
:is(.fa-glass-topbar, body) .fa-att-row__v--mono {
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono",
                 Menlo, Consolas, "Liberation Mono", monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
/* Action feedback line (geolocation / in-flight). Collapses when empty. */
:is(.fa-glass-topbar, body) .fa-att-status {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: rgb(var(--color-theme-1) / 1);
}
:is(.fa-glass-topbar, body) .fa-att-status:empty { display: none; }

/* --- 32.7 Actions -------------------------------------------- */
:is(.fa-glass-topbar, body) .fa-att-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
:is(.fa-glass-topbar, body) .fa-att-group--inline {
    align-items: center;
    gap: 5px;
}
:is(.fa-glass-topbar, body) .fa-att-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;          /* >=44px tap target */
    padding: 10px 14px;
    border: 1px solid rgb(15 23 42 / 0);
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.18s ease,
                background-color 0.18s ease, opacity 0.18s ease;
}
:is(.fa-glass-topbar, body) .fa-att-btn svg {
    width: 18px;
    height: 18px;
    flex: none;
    stroke-width: 1.75;
}
:is(.fa-glass-topbar, body) .fa-att-btn--in {
    background: rgb(var(--color-theme-1) / 1);
    color: rgb(255 255 255 / 1);
    box-shadow: 0 12px 26px -14px rgb(var(--color-theme-1) / 1);
}
:is(.fa-glass-topbar, body) .fa-att-btn--out {
    background: rgb(var(--color-theme-1) / 1);
    color: rgb(255 255 255 / 1);
    box-shadow: 0 12px 26px -14px rgb(var(--color-theme-1) / 1);
}
:is(.fa-glass-topbar, body) .fa-att-btn--in:hover,
:is(.fa-glass-topbar, body) .fa-att-btn--out:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -14px rgb(15 23 42 / 0.55);
}
:is(.fa-glass-topbar, body) .fa-att-btn:active { transform: scale(0.985); }
:is(.fa-glass-topbar, body) .fa-att-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgb(255 255 255 / 0.9),
                0 0 0 6px rgb(var(--color-theme-1) / 0.45);
}
.dark :is(.fa-glass-topbar, body) .fa-att-btn:focus-visible,
.enigma :is(.fa-glass-topbar, body) .fa-att-btn:focus-visible,
.icewall :is(.fa-glass-topbar, body) .fa-att-btn:focus-visible {
    box-shadow: 0 0 0 3px rgb(15 23 42 / 0.9),
                0 0 0 6px rgb(var(--color-theme-1) / 0.6);
}
:is(.fa-glass-topbar, body) .fa-att-btn:disabled {
    opacity: 0.55;
    cursor: progress;
    transform: none;
}
:is(.fa-glass-topbar, body) .fa-att-btn--sm {
    width: auto;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.8125rem;
}
:is(.fa-glass-topbar, body) .fa-att-btn--undo {
    background: rgb(var(--color-theme-1) / 0.10);
    border-color: rgb(var(--color-theme-1) / 0.28);
    color: rgb(var(--color-theme-1) / 1);
}
.dark :is(.fa-glass-topbar, body) .fa-att-btn--undo,
.enigma :is(.fa-glass-topbar, body) .fa-att-btn--undo,
.icewall :is(.fa-glass-topbar, body) .fa-att-btn--undo {
    background: rgb(var(--color-theme-1) / 0.18);
    border-color: rgb(var(--color-theme-1) / 0.4);
    color: rgb(255 255 255 / 0.95);
}
:is(.fa-glass-topbar, body) .fa-att-undo-hint {
    font-size: 0.6875rem;
    font-weight: 600;
    text-align: center;
    color: rgb(100 116 139 / 0.95);
}
.dark :is(.fa-glass-topbar, body) .fa-att-undo-hint,
.enigma :is(.fa-glass-topbar, body) .fa-att-undo-hint,
.icewall :is(.fa-glass-topbar, body) .fa-att-undo-hint {
    color: rgb(148 163 184 / 0.9);
}
:is(.fa-glass-topbar, body) .fa-att-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 12px 10px;
    border-radius: 12px;
    background: rgb(var(--color-theme-1) / 0.10);
    border: 1px solid rgb(var(--color-theme-1) / 0.22);
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: center;
    color: rgb(var(--color-theme-1) / 1);
}
.dark :is(.fa-glass-topbar, body) .fa-att-note,
.enigma :is(.fa-glass-topbar, body) .fa-att-note,
.icewall :is(.fa-glass-topbar, body) .fa-att-note {
    background: rgb(var(--color-theme-1) / 0.16);
    border-color: rgb(var(--color-theme-1) / 0.3);
    color: rgb(255 255 255 / 0.95);
}
:is(.fa-glass-topbar, body) .fa-att-note svg {
    width: 16px;
    height: 16px;
    flex: none;
    stroke-width: 1.75;
}
:is(.fa-glass-topbar, body) .fa-att-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
    padding: 9px 11px;
    border-radius: 12px;
    border-top: 1px solid rgb(var(--color-theme-1) / 0.10);
    background: rgb(15 23 42 / 0);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none !important;
    color: rgb(var(--color-theme-1) / 1);
    transition: background-color 0.15s ease;
}
.dark :is(.fa-glass-topbar, body) .fa-att-link,
.enigma :is(.fa-glass-topbar, body) .fa-att-link,
.icewall :is(.fa-glass-topbar, body) .fa-att-link {
    border-top-color: rgb(255 255 255 / 0.08);
    color: rgb(255 255 255 / 0.92);
}
:is(.fa-glass-topbar, body) .fa-att-link:hover {
    background: rgb(var(--color-theme-1) / 0.08);
}
.dark :is(.fa-glass-topbar, body) .fa-att-link:hover,
.enigma :is(.fa-glass-topbar, body) .fa-att-link:hover,
.icewall :is(.fa-glass-topbar, body) .fa-att-link:hover {
    background: rgb(255 255 255 / 0.08);
}
:is(.fa-glass-topbar, body) .fa-att-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgb(var(--color-theme-1) / 0.35);
}
:is(.fa-glass-topbar, body) .fa-att-link svg {
    width: 16px;
    height: 16px;
    flex: none;
    stroke-width: 1.75;
}

/* --- 32.8 In-flight dimming ----------------------------------
   Task #805 revision (user, 2026-09-12): the slide-to-confirm was MOVED to the
   dashboard attendance strip (.dbm-att-slide in dashboards-modern.css /
   dashboards-v3.css). The header popover now shows a single action button, so
   all it needs while a geolocation/register request is in flight is a dim. */
:is(.fa-glass-topbar, body) .fa-dd--att.is-busy .fa-att-btn {
    opacity: 0.6;
    pointer-events: none;
}

/* --- 32.9 [hidden] guarantees --------------------------------
   The action groups are flex containers, and any author-level display rule
   beats the UA [hidden] default — restore it explicitly. */
:is(.fa-glass-topbar, body) .fa-att-group[hidden],
:is(.fa-glass-topbar, body) .fa-att [hidden] {
    display: none !important;
}

/* --- 32.10 Reduced motion ------------------------------------
   No pulse, no snap-back, no hover lift. The runtime also drops the clock to
   HH:MM and ticks every 60s instead of every second. §30.9 only covers the
   bar itself, and the OPEN popover is detached onto <body> — hence this block. */
@media (prefers-reduced-motion: reduce) {
    .fa-att-dot--live,
    .dark .fa-att-dot--live { animation: none !important; }
    .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill,
    .fa-glass-topbar .fa-tb-iconbtn.fa-att-pill:active,
    :is(.fa-glass-topbar, body) .fa-att-btn,
    :is(.fa-glass-topbar, body) .fa-att-btn:hover,
    :is(.fa-glass-topbar, body) .fa-att-btn:active,
    :is(.fa-glass-topbar, body) .fa-att-link {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}
