/* ==========================================================================
   RETAILACTIVE — TEMPLATE DESIGN  (built on the FTrack framework)
   v0.4.0 — V1 on Bootstrap 5.2.3 · high-contrast palette · rounded corners · design guideline

   ONE SHARED CSS FILE for every RetailActive page. No per-page CSS,
   no <style> blocks in pages, no style="" attributes, no !important.

   Style: Retail Audit — SQUARE corners, slim header, borders instead of
   shadows (shadows only on floating layers: dropdowns, tooltips).

   Color: the FTrack palette (ftrack.vn), HIGH-CONTRAST variant (v0.3):
     · Neutral first — white, grey, near-black. Color is the exception.
     · FTrack green #6AB745 = logo, primary button (with DARK text), active
       stripe, status dots, avatar.
     · Green TEXT, links and the focus ring use the deep greens (≥ WCAG AA).
     · Control edges ≥ 3:1, text ≥ 6:1.
     · Red #e61e25 (FTrack logo pin) only for errors / alerts.
     · No blue, no navy.

   LAYER 1 — TOKENS      (--ra-*)
   LAYER 2 — BASE        (light reset, typography)
   LAYER 3 — LAYOUT      (.ra-app, header, sidebar, pagebar, main)
   LAYER 4 — COMPONENTS  (.ra-btn, .ra-dropdown, .ra-search ...)
   V1 · BS5 — BOOTSTRAP 5.2 THEME for V1 (body.ra--v1) — the MAIN version
   V2       — MODERN LAYOUT (.ra--v2 / .ra2-*, Lark-style shell)
   V3       — V2 SKIN FOR THE ORIGINAL FTRACK/AdminLTE DOM (body.ra-v3)
   LAYER 5 — UTILITIES
   ========================================================================== */


/* ==========================================================================
   LAYER 1 — TOKENS
   ========================================================================== */
:root {
  /* ---------- Brand green (= --ft-green-*) ----------------------------- */
  --ra-green-050: #f2f9ef;   /* hover tint                                  */
  --ra-green-100: #e2f2da;   /* active nav / selected item background       */
  --ra-green-300: #b9dfa8;
  --ra-green-500: #6AB745;   /* ⭐ FTrack brand green                        */
  --ra-green-600: #5ea83a;   /* button hover                                */
  --ra-green-700: #539a31;   /* button pressed                              */
  --ra-green-800: #2f6a1f;   /* green TEXT, links, focus ring               */
  --ra-green-900: #285c1a;   /* text on --ra-green-100                      */

  /* FTrack green #6AB745 is the visible brand colour: logo, primary button,
     active stripe, status dots, avatar. It is too light to carry WHITE text
     (2.48:1), so everything placed ON it is dark (7.1:1), and anything that
     must read as text or focus uses the deep greens. All pairs ≥ WCAG AA.  */
  --ra-brand:           var(--ra-green-500);
  --ra-primary:         var(--ra-green-500);  /* fills, stripes, dots          */
  --ra-primary-hover:   var(--ra-green-600);  /* dark text on it 5.9:1 ✓       */
  --ra-primary-pressed: var(--ra-green-700);  /* dark text on it 4.9:1 ✓       */
  --ra-primary-on:      #16191d;              /* text ON green, 7.1:1 ✓        */
  --ra-primary-btn-text: #fff;                /* primary BUTTON at rest: white on
                                                 #6AB745 = 2.48:1 (below AA) — chosen by the
                                                 team (Duc, Oct 2026); hover / pressed turn
                                                 the text dark (5.9:1 / 4.9:1)            */
  --ra-primary-surface: var(--ra-green-050);
  --ra-primary-border:  var(--ra-green-300);
  --ra-primary-text:    var(--ra-green-800);  /* green text on white 6.6:1 ✓   */
  --ra-active-text:     var(--ra-green-900);  /* on --ra-green-100, 7.1:1 ✓    */
  --ra-focus:           var(--ra-green-800);  /* focus ring, 6.6:1 ✓           */

  /* ---------- Semantic (only when something is wrong) ----------------- */
  --ra-warning:         #ffc107;
  --ra-warning-on:      #212529;
  --ra-warning-text:    #8f6b00;
  --ra-danger:          #e61e25;  /* FTrack logo pin                        */
  --ra-danger-on:       #ffffff;
  --ra-danger-text:     #c1151b;

  /* ---------- Surface (= --ft-bg-*, --ft-border-*) --------------------- */
  --ra-bg-app:      #ffffff;
  --ra-bg-surface:  #ffffff;
  --ra-bg-sidebar:  #f4f5f3;   /* separate from white content, calm        */
  --ra-bg-subtle:   #f6f7f5;   /* thead, placeholder blocks                 */
  --ra-bg-hover:    #e8ebe6;

  --ra-border:        #c4c9ce;  /* dividers (decorative)                    */
  --ra-border-strong: #7d858c;  /* control & card edges — 3.75:1 ✓ (≥3:1)  */

  /* ---------- Text (= --ft-text-*) ------------------------------------- */
  --ra-text:         #16191d;  /* 17.6:1 ✓                                 */
  --ra-text-heading: #16191d;
  --ra-text-muted:   #3f454b;  /* secondary labels, icons — 9.7:1 ✓       */
  --ra-text-soft:    #545b62;  /* meta, section labels — 6.9:1 (6.0 on sidebar) ✓ */

  /* ---------- Links: green, never blue --------------------------------- */
  --ra-link:        var(--ra-primary-text);
  --ra-link-hover:  var(--ra-active-text);

  /* ---------- Header (white, like ftrack.vn) --------------------------- */
  --ra-header-bg:     var(--ra-bg-surface);
  --ra-header-border: var(--ra-border);
  --ra-header-text:   var(--ra-text);
  --ra-header-muted:  var(--ra-text-soft);
  --ra-header-hover:  var(--ra-green-050);
  --ra-header-input:  var(--ra-bg-sidebar);
  --ra-tooltip-bg:    var(--ra-text);

  /* ---------- Typography (= --ft-fs-*, Inter) -------------------------- */
  --ra-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, sans-serif;
  --ra-fs-xs:   0.75rem;   /* 12px — section label, badge                  */
  --ra-fs-sm:   0.8125rem; /* 13px — meta, breadcrumb                      */
  --ra-fs-base: 0.875rem;  /* 14px — body / menu (FTrack default)          */
  --ra-fs-md:   1rem;      /* 16px                                         */
  --ra-fs-lg:   1.125rem;  /* 18px — brand                                 */
  --ra-fs-xl:   1.25rem;   /* 20px — page title                            */

  --ra-fw-regular:  400;
  --ra-fw-medium:   500;
  --ra-fw-semibold: 600;

  /* ---------- Spacing (4px scale) -------------------------------------- */
  --ra-space-1:  4px;
  --ra-space-2:  8px;
  --ra-space-3: 12px;
  --ra-space-4: 16px;
  --ra-space-5: 24px;
  --ra-space-6: 32px;

  /* ---------- Shape: SQUARE -------------------------------------------- */
  --ra-radius: 0;
  --ra-shadow-pop: 0 4px 12px rgba(16, 24, 40, 0.10); /* = --ft-shadow-lg  */

  /* ---------- Layout --------------------------------------------------- */
  --ra-header-h:        48px;
  --ra-sidebar-w:       232px;
  --ra-sidebar-w-mini:  52px;

  /* ---------- Motion --------------------------------------------------- */
  --ra-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ra-dur:  180ms;

  /* ---------- Z-index -------------------------------------------------- */
  --ra-z-sidebar:  1010;
  --ra-z-header:   1030;
  --ra-z-dropdown: 1040;
  --ra-z-backdrop: 1005;
  --ra-z-tooltip:  1070;
}


/* ==========================================================================
   LAYER 2 — BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body.ra {
  margin: 0;
  font-family: var(--ra-font-sans);
  font-size: var(--ra-fs-base);
  line-height: 1.5;
  color: var(--ra-text);
  background: var(--ra-bg-app);
  -webkit-font-smoothing: antialiased;
}

/* links: V2 relies on these; V1 uses Bootstrap's --bs-link-* (set in the V1 theme) */
.ra:not(.ra--v1) a { color: var(--ra-link); text-decoration: none; }
.ra:not(.ra--v1) a:hover { color: var(--ra-link-hover); text-decoration: underline; }

.ra h1, .ra h2, .ra h3 {
  margin: 0;
  color: var(--ra-text-heading);
  font-weight: var(--ra-fw-medium);
  line-height: 1.25;
}

.ra button { font: inherit; }
.ra button:not(.btn) { color: inherit; }   /* never override Bootstrap's .btn colours */

.ra :focus-visible {
  outline: 2px solid var(--ra-focus);
  outline-offset: 1px;
}

.ra-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}


/* ==========================================================================
   LAYER 3 — LAYOUT
   ========================================================================== */

/* ---------- Header ---------------------------------------------------- */
.ra-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--ra-z-header);
  height: var(--ra-header-h);
  display: flex;
  align-items: center;
  gap: var(--ra-space-3);
  padding: 0 var(--ra-space-3) 0 0;
  background: var(--ra-header-bg);
  color: var(--ra-header-text);
  border-bottom: 1px solid var(--ra-header-border);
}

.ra-header__toggle {
  flex: none;
  width: var(--ra-sidebar-w-mini);
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--ra-header-text);
  cursor: pointer;
}
.ra-header__toggle:hover { background: var(--ra-header-hover); }

.ra-brand {
  display: flex;
  align-items: center;
  gap: var(--ra-space-2);
  white-space: nowrap;
  color: var(--ra-header-text);
}
.ra .ra-brand:hover { text-decoration: none; }
.ra-brand__name {
  font-size: var(--ra-fs-lg);
  font-weight: var(--ra-fw-semibold);
  letter-spacing: -0.01em;
  color: var(--ra-header-text);
}
.ra-brand__name b { color: var(--ra-brand); font-weight: inherit; } /* logo mark, large + bold */
.ra-brand__pin { margin-right: 2px; font-size: 16px; color: var(--ra-danger); }
.ra-brand__by {
  font-size: var(--ra-fs-xs);
  color: var(--ra-header-muted);
}

.ra-header__search { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }

.ra-header__actions {
  display: flex;
  align-items: center;
  gap: var(--ra-space-2);
  margin-left: auto;
}

/* ---------- Sidebar --------------------------------------------------- */
.ra-sidebar {
  position: fixed;
  top: var(--ra-header-h);
  bottom: 0;
  left: 0;
  z-index: var(--ra-z-sidebar);
  width: var(--ra-sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--ra-bg-sidebar);
  border-right: 1px solid var(--ra-border);
  overflow: hidden;
  transition: width var(--ra-dur) var(--ra-ease),
              transform var(--ra-dur) var(--ra-ease);
}

.ra-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--ra-space-3) 0;
}

.ra-nav__section {
  margin: var(--ra-space-4) 0 var(--ra-space-1);
  padding: 0 var(--ra-space-4);
  font-size: var(--ra-fs-xs);
  font-weight: var(--ra-fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ra-text-soft);
  white-space: nowrap;
}

.ra-nav__list { list-style: none; margin: 0; padding: 0; }

.ra .ra-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--ra-space-3);
  height: 36px;
  padding: 0 var(--ra-space-4);
  color: var(--ra-text);
  white-space: nowrap;
  border-left: 3px solid transparent;
}
.ra .ra-nav__link:hover {
  background: var(--ra-bg-hover);
  text-decoration: none;
}
.ra .ra-nav__link.is-active {
  background: var(--ra-green-100);
  border-left-color: var(--ra-primary);
  color: var(--ra-primary-text);
  font-weight: var(--ra-fw-medium);
}

.ra-nav__icon {
  flex: none;
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--ra-text-muted);
}
.ra-nav__link.is-active .ra-nav__icon { color: var(--ra-active-text); }

.ra-nav__label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }

.ra-nav__count {
  flex: none;
  min-width: 20px;
  padding: 0 var(--ra-space-1);
  font-size: var(--ra-fs-xs);
  line-height: 18px;
  text-align: center;
  color: var(--ra-text-muted);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border);
}

/* Dropdown item: .ra-nav__toggle opens .ra-nav__sub (Bootstrap collapse) */
.ra-nav__caret { flex: none; font-size: 11px; color: var(--ra-text-muted); transition: transform var(--ra-dur) var(--ra-ease); }
.ra-nav__toggle:not(.collapsed) .ra-nav__caret { transform: rotate(180deg); }
.ra-nav__sub { list-style: none; margin: 0; padding: 0; }
.ra .ra-nav__sub .ra-nav__link { padding-left: calc(var(--ra-space-4) + 18px + var(--ra-space-3)); }
.ra-app.is-collapsed .ra-nav__caret,
.ra-app.is-collapsed .ra-nav__sub { display: none; }

.ra-sidebar__foot {
  flex: none;
  border-top: 1px solid var(--ra-border);
}
.ra-sidebar__collapse {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  gap: var(--ra-space-3);
  padding: 0 var(--ra-space-4) 0 calc(var(--ra-space-4) + 3px);
  background: transparent;
  border: 0;
  color: var(--ra-text-muted);
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
}
.ra-sidebar__collapse:hover { background: var(--ra-bg-hover); color: var(--ra-text); }
.ra-sidebar__collapse .ra-nav__icon { transition: transform var(--ra-dur) var(--ra-ease); }

/* ---------- Collapsed sidebar (desktop) ------------------------------- */
.ra-app.is-collapsed .ra-sidebar { width: var(--ra-sidebar-w-mini); }
.ra-app.is-collapsed .ra-nav__label,
.ra-app.is-collapsed .ra-nav__count { display: none; }
.ra-app.is-collapsed .ra-nav__section {
  height: 1px;
  margin: var(--ra-space-3) var(--ra-space-3);
  padding: 0;
  overflow: hidden;
  color: transparent;
  background: var(--ra-border);
}
.ra-app.is-collapsed .ra-nav__link,
.ra .ra-app.is-collapsed .ra-nav__link,
.ra-app.is-collapsed .ra-sidebar__collapse {
  justify-content: center;
  padding: 0;
}
.ra-app.is-collapsed .ra-sidebar__collapse .ra-nav__icon { transform: rotate(180deg); }

/* Tooltip while collapsed — reads data-tip */
.ra-tip {
  position: fixed;
  z-index: var(--ra-z-tooltip);
  padding: var(--ra-space-1) var(--ra-space-2);
  font-size: var(--ra-fs-sm);
  color: var(--ra-bg-surface);
  background: var(--ra-tooltip-bg);
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}
.ra-tip[hidden] { display: none; }

/* ---------- Main ------------------------------------------------------ */
.ra-main {
  min-height: 100vh;
  padding-top: var(--ra-header-h);
  margin-left: var(--ra-sidebar-w);
}
.ra-app.is-collapsed .ra-main { margin-left: var(--ra-sidebar-w-mini); }

/* ---------- Page bar: breadcrumb + title ------------------------------- */
.ra-pagebar {
  position: sticky;
  top: var(--ra-header-h);
  z-index: 5;
  background: var(--ra-bg-surface);
  border-bottom: 1px solid var(--ra-border);
  padding: var(--ra-space-2) var(--ra-space-5) var(--ra-space-3);
}

.ra-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ra-space-1);
  margin: 0 0 var(--ra-space-1);
  padding: 0;
  list-style: none;
  font-size: var(--ra-fs-sm);
  color: var(--ra-text-muted);
}
.ra-breadcrumb li { display: inline-flex; align-items: center; gap: var(--ra-space-1); }
.ra-breadcrumb li + li::before {
  content: "\203A";              /* › */
  color: var(--ra-text-soft);
  padding: 0 var(--ra-space-1);
}
.ra-breadcrumb a { color: var(--ra-text-muted); }
.ra-breadcrumb a:hover { color: var(--ra-primary-text); }
.ra-breadcrumb [aria-current="page"] { color: var(--ra-text); }

.ra-pagebar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ra-space-2) var(--ra-space-4);
}
.ra-pagebar__title { font-size: var(--ra-fs-xl); }
.ra-pagebar__title .ra-sep { color: var(--ra-text-soft); padding: 0 var(--ra-space-1); }
.ra-pagebar__meta {
  display: flex;
  align-items: center;
  gap: var(--ra-space-3);
  font-size: var(--ra-fs-sm);
  color: var(--ra-text-muted);
}

.ra-content { padding: var(--ra-space-5); }


/* ==========================================================================
   LAYER 4 — COMPONENTS
   ========================================================================== */

/* ---------- Search (in the header) ------------------------------------- */
.ra-search {
  position: relative;
  width: 100%;
  max-width: 440px;
}
.ra-search__icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--ra-header-muted);
  pointer-events: none;
}
.ra-search__input {
  width: 100%;
  height: 30px;
  padding: 0 var(--ra-space-3) 0 30px;
  font: inherit;
  color: var(--ra-header-text);
  background: var(--ra-header-input);
  border: 1px solid var(--ra-header-border);
  border-radius: var(--ra-radius);
}
.ra-search__input::placeholder { color: var(--ra-header-muted); }
.ra-search__input:focus {
  outline: none;
  background: var(--ra-bg-surface);
  border-color: var(--ra-primary);
  box-shadow: 0 0 0 1px var(--ra-primary);
}
.ra-search__input:focus + .ra-search__kbd { display: none; }
.ra-search__kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 5px;
  font-size: var(--ra-fs-xs);
  line-height: 16px;
  color: var(--ra-header-muted);
  border: 1px solid var(--ra-header-border);
}

/* ---------- Buttons --------------------------------------------------- */
.ra-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--ra-space-2);
  height: 30px;
  padding: 0 var(--ra-space-3);
  font-size: var(--ra-fs-base);
  font-weight: var(--ra-fw-medium);
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--ra-radius);
  cursor: pointer;
  transition: background-color var(--ra-dur) var(--ra-ease),
              border-color var(--ra-dur) var(--ra-ease);
}
.ra-btn__caret { font-size: 10px; opacity: 0.8; }

.ra-btn--primary {
  background: var(--ra-primary);
  border-color: var(--ra-primary);
  color: var(--ra-primary-on);
}
.ra-btn--primary:hover { background: var(--ra-primary-hover); border-color: var(--ra-primary-hover); }

/* quiet button in the header */
.ra-btn--ghost {
  background: transparent;
  border-color: var(--ra-header-border);
  color: var(--ra-header-text);
}
.ra-btn--ghost:hover { background: var(--ra-header-hover); border-color: var(--ra-primary-border); }

/* outline button on white */
.ra-btn--outline {
  background: var(--ra-bg-surface);
  border-color: var(--ra-border-strong);
  color: var(--ra-text);
}
.ra-btn--outline:hover { background: var(--ra-bg-subtle); }

.ra-btn--sm { height: 26px; padding: 0 var(--ra-space-2); font-size: var(--ra-fs-sm); }

/* icon button in the header */
.ra-iconbtn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: var(--ra-radius);
  color: var(--ra-header-text);
  cursor: pointer;
}
.ra-iconbtn:hover { background: var(--ra-header-hover); color: var(--ra-primary-text); }
.ra-iconbtn__dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--ra-danger);
  border: 1px solid var(--ra-header-bg);
}

/* ---------- Avatar (square) ------------------------------------------- */
.ra-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ra-fs-sm);
  font-weight: var(--ra-fw-semibold);
  color: var(--ra-primary-on);
  background: var(--ra-brand);
}

.ra-user {
  display: inline-flex;
  align-items: center;
  gap: var(--ra-space-2);
  height: 36px;
  padding: 0 var(--ra-space-1);
  background: transparent;
  border: 0;
  color: var(--ra-header-text);
  cursor: pointer;
}
.ra-user:hover { background: var(--ra-header-hover); }

/* ---------- Dropdown -------------------------------------------------- */
.ra-dropdown { position: relative; }

.ra-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: var(--ra-z-dropdown);
  min-width: 220px;
  padding: var(--ra-space-1) 0;
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border-strong);
  border-radius: var(--ra-radius);
  box-shadow: var(--ra-shadow-pop);
  color: var(--ra-text);
}
.ra-dropdown__menu[hidden] { display: none; }

.ra-dropdown__header {
  padding: var(--ra-space-2) var(--ra-space-3) var(--ra-space-1);
  font-size: var(--ra-fs-xs);
  font-weight: var(--ra-fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ra-text-soft);
}

.ra .ra-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--ra-space-2);
  width: 100%;
  padding: 7px var(--ra-space-3);
  font-size: var(--ra-fs-base);
  text-align: left;
  color: var(--ra-text);
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.ra .ra-dropdown__item:hover { background: var(--ra-bg-subtle); text-decoration: none; }
.ra .ra-dropdown__item.is-selected {
  border-left-color: var(--ra-primary);
  color: var(--ra-primary-text);
  font-weight: var(--ra-fw-medium);
}
.ra-dropdown__item .ra-nav__icon { width: 16px; }
.ra-dropdown__note {
  padding: var(--ra-space-1) var(--ra-space-3) var(--ra-space-2);
  font-size: var(--ra-fs-xs);
  color: var(--ra-text-soft);
}
.ra-dropdown__code {
  flex: none;
  width: 24px;
  font-size: var(--ra-fs-xs);
  font-weight: var(--ra-fw-semibold);
  color: var(--ra-text-soft);
}
.ra-dropdown__divider { height: 1px; margin: var(--ra-space-1) 0; background: var(--ra-border); }

/* ---------- Status chip (square) -------------------------------------- */
.ra-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px var(--ra-space-2);
  font-size: var(--ra-fs-sm);
  color: var(--ra-text);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border-strong);
}
.ra-chip__dot { width: 6px; height: 6px; background: var(--ra-primary); }

/* ---------- Placeholder for unbuilt blocks ----------------------------- */
.ra-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ra-space-2);
  min-height: 420px;
  padding: var(--ra-space-6);
  text-align: center;
  color: var(--ra-text-muted);
  background: var(--ra-bg-subtle);
  border: 1px dashed var(--ra-border-strong);
}
.ra-placeholder__title { font-size: var(--ra-fs-md); font-weight: var(--ra-fw-medium); color: var(--ra-text); }

/* ---------- Backdrop (sidebar mobile) ---------------------------------- */
.ra-backdrop {
  position: fixed;
  inset: var(--ra-header-h) 0 0 0;
  z-index: var(--ra-z-backdrop);
  background: rgba(33, 37, 41, 0.40);
}
.ra-backdrop[hidden] { display: none; }


/* ==========================================================================
   V1 · BOOTSTRAP 5.2 THEME   <body class="ra ra--v1">
   Load order:  bootstrap.min.css  →  aisle.css  (always last)
   Write plain Bootstrap 5 markup (.btn, .dropdown, .form-control, .breadcrumb,
   .badge, .table, .modal, .offcanvas …); this layer maps the --ra-* tokens onto
   Bootstrap's --bs-* variables: square corners + the high-contrast palette.
   ========================================================================== */
body.ra--v1 {
  --bs-body-font-family: var(--ra-font-sans);
  --bs-body-font-size: var(--ra-fs-base);
  --bs-body-color: var(--ra-text);
  --bs-body-bg: var(--ra-bg-surface);
  --bs-border-color: var(--ra-border);
  --bs-border-color-translucent: var(--ra-border);
  --bs-border-radius: var(--ra1-r);
  --bs-border-radius-sm: var(--ra1-r-sm);
  --bs-border-radius-lg: var(--ra1-r-lg);
  --bs-border-radius-xl: var(--ra1-r-lg);
  --bs-border-radius-2xl: var(--ra1-r-lg);
  --bs-link-color: var(--ra-link);
  --bs-link-hover-color: var(--ra-link-hover);
  /* utilities (.text-primary, .bg-primary, .border-success …) use the deep
     green so they work as text AND under white text; buttons are themed below */
  --bs-primary: #2f6a1f;      --bs-primary-rgb: 47, 106, 31;
  --bs-success: #2f6a1f;      --bs-success-rgb: 47, 106, 31;
  --bs-secondary: #3f454b;    --bs-secondary-rgb: 63, 69, 75;
  --bs-danger: #c1151b;       --bs-danger-rgb: 193, 21, 27;   /* 6.2:1 as text ✓ */
}
body.ra--v1 .text-muted,
body.ra--v1 .text-secondary { color: var(--ra-text-muted) !important; } /* vendor !imp */

/* ---------- Buttons ---------------------------------------------------- */
body.ra--v1 .btn {
  --bs-btn-border-radius: var(--ra1-r);
  --bs-btn-font-weight: var(--ra-fw-medium);
  --bs-btn-focus-box-shadow: 0 0 0 2px var(--ra-bg-surface), 0 0 0 4px var(--ra-focus);
  /* icon + label sit on one line with a fixed gap, at every size */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
body.ra--v1 .btn-sm {
  --bs-btn-padding-y: 0;
  --bs-btn-padding-x: var(--ra-space-2);
  --bs-btn-font-size: var(--ra-fs-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
}
body.ra--v1 .btn-primary,
body.ra--v1 .btn-success {
  --bs-btn-color: var(--ra-primary-btn-text);
  --bs-btn-bg: var(--ra-primary);
  --bs-btn-border-color: var(--ra-primary);
  --bs-btn-hover-color: var(--ra-primary-on);
  --bs-btn-hover-bg: var(--ra-primary-hover);
  --bs-btn-hover-border-color: var(--ra-primary-hover);
  --bs-btn-active-color: var(--ra-primary-on);
  --bs-btn-active-bg: var(--ra-primary-pressed);
  --bs-btn-active-border-color: var(--ra-primary-pressed);
  --bs-btn-disabled-color: var(--ra-primary-btn-text);
  --bs-btn-disabled-bg: var(--ra-primary);
  --bs-btn-disabled-border-color: var(--ra-primary);
}
body.ra--v1 .btn-outline-secondary {
  --bs-btn-color: var(--ra-text);
  --bs-btn-bg: var(--ra-bg-surface);
  --bs-btn-border-color: var(--ra-border-strong);
  --bs-btn-hover-color: var(--ra-text);
  --bs-btn-hover-bg: var(--ra-bg-hover);
  --bs-btn-hover-border-color: var(--ra-text-muted);
  --bs-btn-active-color: var(--ra-text);
  --bs-btn-active-bg: var(--ra-bg-hover);
  --bs-btn-active-border-color: var(--ra-text-muted);
  --bs-btn-disabled-color: var(--ra-text-soft);
  --bs-btn-disabled-border-color: var(--ra-border);
}
body.ra--v1 .btn-outline-secondary > .fas,
body.ra--v1 .btn-outline-secondary > .far { color: var(--ra-text-muted); }
body.ra--v1 .btn .ra-btn__key { font-weight: var(--ra-fw-regular); color: var(--ra-text-muted); }
body.ra--v1 .dropdown-toggle::after { margin-left: 2px; border-top-width: .32em; border-right-width: .32em; border-left-width: .32em; }

/* header icon buttons built on .btn */
body.ra--v1 .ra-iconbtn.btn,
body.ra--v1 .ra-user.btn { --bs-btn-padding-x: 0; --bs-btn-hover-bg: var(--ra-bg-hover); --bs-btn-active-bg: var(--ra-bg-hover); color: var(--ra-text); }
body.ra--v1 .ra-iconbtn.btn { justify-content: center; width: 32px; height: 32px; font-size: 15px; }
body.ra--v1 .ra-iconbtn.btn:hover { color: var(--bs-btn-hover-color, var(--ra-text)); background: var(--bs-btn-hover-bg); }
body.ra--v1 .ra-user.btn { height: 36px; padding: 0 var(--ra-space-1); }
body.ra--v1 .ra-user.btn::after { color: var(--ra-text-muted); }

/* ---------- Forms ------------------------------------------------------ */
body.ra--v1 .form-control,
body.ra--v1 .form-select {
  color: var(--ra-text);
  border-color: var(--ra-border-strong);
  border-radius: var(--ra1-r);
}
body.ra--v1 .form-control::placeholder { color: var(--ra-text-soft); opacity: 1; }
body.ra--v1 .form-control:focus,
body.ra--v1 .form-select:focus {
  border-color: var(--ra-focus);
  box-shadow: 0 0 0 1px var(--ra-focus);
}
body.ra--v1 .form-control-sm { height: 30px; font-size: var(--ra-fs-sm); }
body.ra--v1 .form-check-input:checked { background-color: var(--ra-primary-text); border-color: var(--ra-primary-text); }
body.ra--v1 .form-check-input { border-color: var(--ra-border-strong); }
body.ra--v1 .form-switch .form-check-input { transition: background-position .3s ease-in-out, background-color .3s ease-in-out, border-color .3s ease-in-out; }
@media (prefers-reduced-motion: reduce) { body.ra--v1 .form-switch .form-check-input { transition: none; } }
body.ra--v1 .form-range::-webkit-slider-thumb { background-color: var(--ra-primary); }
body.ra--v1 .form-range::-webkit-slider-thumb:active { background-color: var(--ra-primary-pressed); }
body.ra--v1 .form-range::-moz-range-thumb { background-color: var(--ra-primary); }
body.ra--v1 .form-range::-moz-range-thumb:active { background-color: var(--ra-primary-pressed); }
body.ra--v1 .form-range:focus { box-shadow: none; }
body.ra--v1 .form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--ra-focus); }
body.ra--v1 .form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--ra-focus); }

/* header search on .form-control */
body.ra--v1 .ra-search .form-control { padding-left: 30px; background-color: var(--ra-bg-sidebar); }
body.ra--v1 .ra-search .form-control:focus { background-color: var(--ra-bg-surface); }
body.ra--v1 .ra-search .form-control:focus ~ .ra-search__kbd { display: none; }
body.ra--v1 .ra-search__icon { color: var(--ra-text-muted); }
body.ra--v1 .ra-search__kbd {           /* Bootstrap styles <kbd> dark */
  padding: 0 5px;
  font-size: var(--ra-fs-xs);
  color: var(--ra-text-muted);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border-strong);
  border-radius: 0;
}

/* ---------- Dropdowns -------------------------------------------------- */
body.ra--v1 .dropdown-menu {
  --bs-dropdown-min-width: 220px;
  --bs-dropdown-padding-y: var(--ra-space-1);
  --bs-dropdown-font-size: var(--ra-fs-base);
  --bs-dropdown-color: var(--ra-text);
  --bs-dropdown-border-color: var(--ra-border-strong);
  --bs-dropdown-border-radius: var(--ra1-r-lg);
  --bs-dropdown-inner-border-radius: max(0px, calc(var(--ra1-r-lg) - 1px));
  --bs-dropdown-divider-bg: var(--ra-border);
  --bs-dropdown-divider-margin-y: var(--ra-space-1);
  --bs-dropdown-link-color: var(--ra-text);
  --bs-dropdown-link-hover-color: var(--ra-text);
  --bs-dropdown-link-hover-bg: var(--ra-bg-hover);
  --bs-dropdown-link-active-color: var(--ra-active-text);
  --bs-dropdown-link-active-bg: var(--ra-green-100);
  --bs-dropdown-item-padding-x: var(--ra-space-3);
  --bs-dropdown-item-padding-y: 7px;
  --bs-dropdown-header-color: var(--ra-text-soft);
  --bs-dropdown-header-padding-x: var(--ra-space-3);
  --bs-dropdown-header-padding-y: var(--ra-space-2);
  box-shadow: var(--ra-shadow-pop);
}
body.ra--v1 .dropdown-item { display: flex; align-items: center; border-left: 3px solid transparent; }
body.ra--v1 .dropdown-item.active { font-weight: var(--ra-fw-medium); border-left-color: var(--ra-primary); }
body.ra--v1 .dropdown-item:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: -2px; }
body.ra--v1 .dropdown-header {
  font-size: var(--ra-fs-xs);
  font-weight: var(--ra-fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
body.ra--v1 .dropdown-item-text.ra-dropdown__note { max-width: 240px; white-space: normal; }

/* ---------- Breadcrumb ------------------------------------------------- */
body.ra--v1 .breadcrumb {
  --bs-breadcrumb-divider: "\203A";
  --bs-breadcrumb-divider-color: var(--ra-text-soft);
  --bs-breadcrumb-item-padding-x: 6px;
  --bs-breadcrumb-item-active-color: var(--ra-text);
  --bs-breadcrumb-margin-bottom: var(--ra-space-1);
  --bs-breadcrumb-font-size: var(--ra-fs-sm);
}
body.ra--v1 .breadcrumb a { color: var(--ra-text-muted); text-decoration: none; }
body.ra--v1 .breadcrumb a:hover { color: var(--ra-primary-text); text-decoration: underline; }

/* ---------- Badges, close ---------------------------------------------- */
body.ra--v1 .badge { --bs-badge-border-radius: var(--ra1-r-sm); --bs-badge-font-weight: var(--ra-fw-semibold); }
body.ra--v1 .btn-close { border-radius: var(--ra1-r-sm); opacity: .75; }
body.ra--v1 .btn-close:focus { box-shadow: 0 0 0 2px var(--ra-focus); }

/* ---------- Shell on Bootstrap ------------------------------------------ */
/* .offcanvas-lg sets background-color: transparent !important on lg+ */
body.ra--v1 .ra-sidebar { background-color: var(--ra-bg-sidebar) !important; } /* vendor !imp */
body.ra--v1 .ra-sidebar .offcanvas-header .ra-brand__pin { margin-right: 2px; }
.ra .ra-nav__link.is-active { color: var(--ra-active-text); }


/* ---------- V1 refine: calm chrome ------------------------------------
   Borders only where they group something (header edge, sidebar edge,
   menus, inputs). Every other control is a GHOST: no border, a fill on
   hover/open. Contrast lives in the text colours, not in the outlines.  */

/* .btn-ghost — the default control in headers, toolbars and page heads */
body.ra--v1 .btn-ghost {
  --bs-btn-color: var(--ra-text);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--ra-text);
  --bs-btn-hover-bg: var(--ra-bg-hover);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--ra-text);
  --bs-btn-active-bg: var(--ra-bg-hover);
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: var(--ra-text-soft);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
  --bs-btn-font-weight: var(--ra-fw-medium);
}
body.ra--v1 .btn-ghost > .fas,
body.ra--v1 .btn-ghost > .far { color: var(--ra-text-muted); }
body.ra--v1 .btn-ghost:hover > .fas,
body.ra--v1 .btn-ghost:hover > .far,
body.ra--v1 .btn-ghost.show > .fas,
body.ra--v1 .btn-ghost.show > .far { color: var(--ra-text); }
body.ra--v1 .btn-sm { height: 32px; padding: 0 10px; }

/* thin chevron instead of Bootstrap's solid caret */
body.ra--v1 .dropdown-toggle::after {
  width: 6px;
  height: 6px;
  margin-left: 4px;
  vertical-align: middle;
  border: 0;
  border-right: 1.5px solid var(--ra-text-soft);
  border-bottom: 1.5px solid var(--ra-text-soft);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--ra-dur) var(--ra-ease);
}
body.ra--v1 .dropdown-toggle.show::after { transform: translateY(1px) rotate(-135deg); }

/* header rhythm */
body.ra--v1 .ra-header { gap: var(--ra-space-2); }
body.ra--v1 .ra-header__actions { gap: 2px; }
body.ra--v1 .ra-header__divider { width: 1px; height: 20px; margin: 0 var(--ra-space-2); background: var(--ra-border); }
body.ra--v1 .ra-header__toggle { color: var(--ra-text-muted); }
body.ra--v1 .ra-header__toggle:hover { color: var(--ra-text); background: var(--ra-bg-hover); }
body.ra--v1 .ra-iconbtn.btn { width: 32px; padding: 0; }
body.ra--v1 .ra-iconbtn__dot { top: 7px; right: 7px; border-color: var(--ra-bg-surface); }
body.ra--v1 .ra-user.btn { width: 36px; justify-content: center; padding: 0; margin-left: var(--ra-space-1); }
body.ra--v1 .ra-avatar { width: 28px; height: 28px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-primary-on); background: var(--ra-brand); }

/* sidebar counts: plain numbers, no boxes */
body.ra--v1 .ra-nav__count {
  min-width: 0;
  padding: 0;
  font-size: var(--ra-fs-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ra-text-soft);
  background: none;
  border: 0;
}
body.ra--v1 .ra-nav__link.is-active .ra-nav__count { color: var(--ra-active-text); }
/* one vertical line: ☰ icon centre = sidebar icon centre = 26px;
   section labels, icons and the collapse button all start at 16px */
body.ra.ra--v1 .ra-nav__link { height: 38px; gap: var(--ra-space-3); padding: 0 var(--ra-space-4) 0 13px; } /* 13 + 3px stripe = 16 */
body.ra--v1 .ra-nav__icon { width: 20px; }
body.ra--v1 .ra-nav__section { padding: 0 var(--ra-space-4); }
body.ra--v1 .ra-sidebar__collapse { gap: var(--ra-space-3); padding: 0 var(--ra-space-4); }
body.ra.ra--v1 .ra-app.is-collapsed .ra-nav__link { padding: 0 3px 0 0; }  /* re-centre past the stripe */
body.ra--v1 .ra-app.is-collapsed .ra-sidebar__collapse { padding: 0; }
/* right edges: header items and page-head items end on the same 16/24 grid */
body.ra--v1 .ra-header { padding-right: var(--ra-space-4); }
body.ra--v1 .ra-pagebar__meta > .btn:last-child { margin-right: -2px; }
body.ra--v1 .ra-nav__link:hover { color: var(--ra-text); }
body.ra--v1 .ra-nav__link.is-active:hover { color: var(--ra-active-text); }
body.ra--v1 .ra-nav__section { margin-top: var(--ra-space-5); }

/* page head: title + one quiet meta line */
body.ra--v1 .ra-pagebar { padding: var(--ra-space-3) var(--ra-space-5) var(--ra-space-4); }
body.ra--v1 .ra-pagebar__title { font-size: var(--ra-fs-xl); font-weight: var(--ra-fw-semibold); letter-spacing: -0.01em; }
body.ra--v1 .ra-pagebar__meta { gap: var(--ra-space-2); font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-pagebar__meta .btn-ghost { margin-left: var(--ra-space-2); }
body.ra--v1 .ra-pagebar__sep { color: var(--ra-text-soft); }
body.ra--v1 .ra-status { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .ra-status__dot { width: 8px; height: 8px; background: var(--ra-primary); }

/* content placeholder: quieter */
body.ra--v1 .ra-placeholder { color: var(--ra-text-muted); background: var(--ra-bg-subtle); border: 1px dashed var(--ra-border); }

/* menus: light edge + shadow (the shadow separates, the edge just finishes) */
body.ra--v1 .dropdown-menu { --bs-dropdown-border-color: var(--ra-border); }


/* ---------- V1 shell (final) -------------------------------------------
   ┌──────────┬──────────────────────────────────────────────┐
   │  brand   │ breadcrumb                  context · me     │ ← topbar (content column only)
   │──────────┼──────────────────────────────────────────────│
   │  menu    │  Page title                 [Export] [+ New] │ ← page head on the canvas
   │          │  ┌card┐ ┌card┐ ┌card┐ ┌card┐                 │
   │          │  ┌────── card ──────┐ ┌────── card ──────┐   │ ← white cards on grey canvas
   └──────────┴──────────────────────────────────────────────┘
   Three surfaces: white chrome (sidebar + topbar), grey canvas, white cards. */
body.ra--v1 {
  --ra1-topbar-h:       56px;
  --ra1-sidebar-w:      248px;
  --ra1-sidebar-w-mini: 64px;
  --ra1-canvas:         #f3f4f2;
  --ra1-card-border:    #dde1dc;
  --ra1-filter-border:  #e4e7e2;
  --ra1-table-head-chart: #22302a; /* .ra-table--chart header — a table shown as a chart */   /* edge of the pickers in .ra-filters only — lighter than other controls */
  --ra1-nav-hover:      #f1f3f0;
  background: var(--ra1-canvas);
}
body.ra--v1 a { text-decoration: none; }
body.ra--v1 .ra-content a:not(.btn):hover { text-decoration: underline; }

/* sidebar: full height, white */
body.ra--v1 .ra-sidebar {
  top: 0;
  width: var(--ra1-sidebar-w);
  border-right: 1px solid var(--ra-border);
}
body.ra--v1 .ra-sidebar,
body.ra--v1 .ra-sidebar.offcanvas-lg { background-color: var(--ra-bg-surface) !important; } /* vendor !imp */
body.ra--v1 .ra-app.is-collapsed .ra-sidebar { width: var(--ra1-sidebar-w-mini); }

body.ra--v1 .ra-sidebar__brand {
  flex: none;
  align-items: center;
  height: var(--ra1-topbar-h);
  padding: 0 var(--ra-space-4);
  border-bottom: 1px solid var(--ra-border);
}
body.ra--v1 .ra-brand { display: flex; align-items: center; gap: 10px; color: var(--ra-text); }
body.ra--v1 .ra-brand:hover { color: var(--ra-text); }
body.ra--v1 .ra-brand__pin { width: 20px; margin: 0; font-size: 20px; text-align: center; color: var(--ra-danger); }
body.ra--v1 .ra-brand__text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
body.ra--v1 .ra-brand__name { font-size: 17px; font-weight: var(--ra-fw-bold, 700); letter-spacing: -0.01em; color: var(--ra-text); }
body.ra--v1 .ra-brand__name b { font-weight: inherit; color: var(--ra-brand); }  /* logotype */
body.ra--v1 .ra-brand__by { display: block; margin-top: 2px; font-size: 11px; font-weight: var(--ra-fw-medium); color: var(--ra-text-soft); }
body.ra--v1 .ra-app.is-collapsed .ra-sidebar__brand { justify-content: center; padding: 0; }
body.ra--v1 .ra-app.is-collapsed .ra-sidebar__brand .ra-brand__text { display: none; }

body.ra--v1 .ra-nav { padding: var(--ra-space-3) 0; }
body.ra.ra--v1 .ra-nav__link { height: 40px; color: var(--ra-text); }
body.ra.ra--v1 .ra-nav__link:hover { color: var(--ra-text); background: var(--ra1-nav-hover); }
body.ra.ra--v1 .ra-nav__link.is-active {
  font-weight: var(--ra-fw-semibold);
  color: var(--ra-active-text);
  background: var(--ra-green-100);
  border-left-color: var(--ra-brand);
}
body.ra--v1 .ra-nav__icon { color: var(--ra-text-muted); }
body.ra--v1 .ra-sidebar__foot { border-top-color: var(--ra-border); }
body.ra--v1 .ra-sidebar__collapse { height: 44px; color: var(--ra-text-muted); }
body.ra--v1 .ra-sidebar__collapse:hover { background: var(--ra1-nav-hover); }

/* topbar: content column only */
body.ra--v1 .ra-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--ra1-sidebar-w);
  z-index: var(--ra-z-header);
  height: var(--ra1-topbar-h);
  display: flex;
  align-items: center;
  gap: var(--ra-space-2);
  padding: 0 var(--ra-space-4) 0 var(--ra-space-5);
  background: var(--ra-bg-surface);
  border-bottom: 1px solid var(--ra-border);
  transition: left var(--ra-dur) var(--ra-ease);
}
body.ra--v1 .ra-app.is-collapsed .ra-topbar { left: var(--ra1-sidebar-w-mini); }
body.ra--v1 .ra-topbar__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
body.ra--v1 .ra-topbar__divider { width: 1px; height: 20px; margin: 0 var(--ra-space-2); background: var(--ra-border); }
body.ra--v1 .ra-topbar .breadcrumb { --bs-breadcrumb-font-size: var(--ra-fs-base); }

/* main column on the canvas */
body.ra--v1 .ra-main {
  min-height: 100vh;
  margin-left: var(--ra1-sidebar-w);
  padding-top: var(--ra1-topbar-h);
  background: var(--ra1-canvas);
}
body.ra--v1 .ra-app.is-collapsed .ra-main { margin-left: var(--ra1-sidebar-w-mini); }

body.ra--v1 .ra-pagehead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ra-space-3) var(--ra-space-5);
  padding: var(--ra-space-5) var(--ra-space-5) var(--ra-space-4);
}
body.ra--v1 .ra-pagehead__title { margin: 0; font-size: 24px; font-weight: var(--ra-fw-semibold); letter-spacing: -0.015em; color: var(--ra-text); }
body.ra--v1 .ra-pagehead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2); margin-top: 6px; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-pagehead__sep { color: var(--ra-text-soft); }
body.ra--v1 .ra-pagehead__actions { display: flex; align-items: center; gap: var(--ra-space-2); }
body.ra--v1 .ra-content { padding: 0 var(--ra-space-5) var(--ra-space-6); }
/* .ra-content--surface: white content that covers the canvas down to the bottom (a page with no page head, e.g. welcome) */
body.ra--v1 .ra-content--surface { min-height: calc(100vh - var(--ra1-topbar-h)); padding-top: var(--ra-space-5); background: var(--ra-bg-surface); }

/* ---------- Bootstrap cards & tables ---------------------------------- */
body.ra--v1 .card {
  --bs-card-border-color: var(--ra1-card-border);
  --bs-card-border-radius: var(--ra1-r-lg);
  --bs-card-inner-border-radius: max(0px, calc(var(--ra1-r-lg) - 1px));
  --bs-card-cap-bg: transparent;
  --bs-card-cap-padding-y: 0;
  --bs-card-cap-padding-x: 20px;
  --bs-card-spacer-x: 20px;
  --bs-card-spacer-y: 16px;
  --bs-card-color: var(--ra-text);
}
body.ra--v1 .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ra-space-3);
  min-height: 52px;
}
body.ra--v1 .card-header .btn-ghost { margin-right: -10px; }
/* footer under a table: count on the left, pagination on the right */
body.ra--v1 .card-footer { padding: 10px 20px; border-top: 1px solid var(--ra1-card-border); }
body.ra--v1 .card-title { margin: 0; font-size: 15px; font-weight: var(--ra-fw-semibold); color: var(--ra-text); }

body.ra--v1 .ra-kpi .card-body { padding: 16px 20px 18px; }
body.ra--v1 .ra-kpi__label { font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-kpi__value { margin-top: var(--ra-space-2); font-size: 28px; font-weight: var(--ra-fw-semibold); line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-bars { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; padding-bottom: 20px; }
body.ra--v1 .ra-bars .placeholder { display: block; height: 18px; }
body.ra--v1 .placeholder { background-color: var(--ra-text-soft); }

body.ra--v1 .table {
  --bs-table-color: var(--ra-text);
  --bs-table-border-color: var(--ra1-card-border);
  --bs-table-hover-bg: var(--ra1-nav-hover);
  font-size: var(--ra-fs-base);
}
body.ra--v1 .table > :not(caption) > * > * { padding: 12px 16px; }
body.ra--v1 .table > :not(caption) > * > :first-child { padding-left: 20px; }
body.ra--v1 .table > :not(caption) > * > :last-child { padding-right: 20px; }
/* .ra-table--dense — tables with 8+ columns: tighter gaps so they fit a laptop */
body.ra--v1 .ra-table--dense > :not(caption) > * > * { padding-left: 10px; padding-right: 10px; }
body.ra--v1 .ra-table--dense > :not(caption) > * > :first-child { padding-left: 20px; }
body.ra--v1 .ra-table--dense > :not(caption) > * > :last-child { padding-right: 20px; }

/* .ra-orderrow__head — header row of an order: its own fill, a click on it shows / hides the products */
body.ra--v1 .ra-orderrow__head { cursor: pointer; }
body.ra--v1 .ra-orderrow__head > * { background-color: var(--ra-bg-surface); }
/* .ra-orderrow__price — the "Price" title shows only while the products are open (collapse show); the column keeps its width */
body.ra--v1 .ra-orderrow__head[aria-expanded="false"] .ra-orderrow__price { visibility: hidden; }
/* .ra-table--grid — tables stacked under each other with the same columns (one per category):
   fixed layout, so every table splits its width the same way and the columns line up.
   First column 30 % (--ra-grid-first on the table changes it), the others share the rest;
   long text wraps instead of widening a column */
body.ra--v1 .ra-table--grid { table-layout: fixed; min-width: 720px; }
body.ra--v1 .ra-table--grid > thead > tr > :first-child { width: var(--ra-grid-first, 30%); }
body.ra--v1 .table.ra-table--grid > :not(caption) > tr > * { white-space: normal; overflow-wrap: anywhere; }   /* .table: beats the nowrap of thead th */
/* column titles wrap between words only (never "PROMO|TION"); many columns → a wider table that scrolls, so each title fits */
body.ra--v1 .table.ra-table--grid > thead > tr > * { overflow-wrap: normal; }
body.ra--v1 .ra-table--grid:has(> thead > tr > :nth-child(6)) { min-width: 900px; }
body.ra--v1 .ra-table--grid:has(> thead > tr > :nth-child(9)) { min-width: 1200px; }
body.ra--v1 .table > thead > tr > th {
  font-size: var(--ra-fs-xs);
  font-weight: var(--ra-fw-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ra-text-soft);
  background: var(--ra-bg-subtle);
}
body.ra--v1 .table > tbody > tr:last-child > * { border-bottom: 0; }
/* column hover — opt-in: only a .table.ra-table-hover-column. Hovering any cell (header too) fills that
   column's body cells with the row-hover tint (fill only, same token in light / dark). aisle-main.js writes the column of the
   hovered cell on its table (data-ra-hcol, columns 1–32); no :has(:hover) — re-checked for every
   cell of the table, it froze the page for seconds on a few hundred rows.
   Rows with colspan shift the count, so a merged cell may tint its neighbour column */
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="1"] > tbody > tr > :nth-child(1) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="2"] > tbody > tr > :nth-child(2) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="3"] > tbody > tr > :nth-child(3) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="4"] > tbody > tr > :nth-child(4) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="5"] > tbody > tr > :nth-child(5) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="6"] > tbody > tr > :nth-child(6) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="7"] > tbody > tr > :nth-child(7) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="8"] > tbody > tr > :nth-child(8) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="9"] > tbody > tr > :nth-child(9) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="10"] > tbody > tr > :nth-child(10) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="11"] > tbody > tr > :nth-child(11) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="12"] > tbody > tr > :nth-child(12) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="13"] > tbody > tr > :nth-child(13) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="14"] > tbody > tr > :nth-child(14) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="15"] > tbody > tr > :nth-child(15) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="16"] > tbody > tr > :nth-child(16) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="17"] > tbody > tr > :nth-child(17) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="18"] > tbody > tr > :nth-child(18) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="19"] > tbody > tr > :nth-child(19) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="20"] > tbody > tr > :nth-child(20) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="21"] > tbody > tr > :nth-child(21) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="22"] > tbody > tr > :nth-child(22) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="23"] > tbody > tr > :nth-child(23) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="24"] > tbody > tr > :nth-child(24) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="25"] > tbody > tr > :nth-child(25) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="26"] > tbody > tr > :nth-child(26) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="27"] > tbody > tr > :nth-child(27) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="28"] > tbody > tr > :nth-child(28) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="29"] > tbody > tr > :nth-child(29) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="30"] > tbody > tr > :nth-child(30) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="31"] > tbody > tr > :nth-child(31) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
body.ra--v1 .table.ra-table-hover-column[data-ra-hcol="32"] > tbody > tr > :nth-child(32) { --bs-table-accent-bg: var(--bs-table-hover-bg); }
/* .ra-table--chart — a table that IS the chart (dashboard scorecards, heatmaps,
   lists in a report): dark header so it reads as a visual, not a data list */
body.ra--v1 .ra-table--chart > thead > tr > th {
  color: #fff;
  background: var(--ra1-table-head-chart);
  border-bottom-color: var(--ra1-table-head-chart);
}
/* compact rows: a chart table shows many rows in little height (13px, 6px rows) */
body.ra--v1 .ra-table--chart { font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-table--chart > :not(caption) > * > * { padding-top: 6px; padding-bottom: 6px; line-height: 1.35; }
body.ra--v1 .ra-table--chart > thead > tr > th { padding-top: 8px; padding-bottom: 8px; }
body.ra--v1 .ra-table--chart > tbody > tr > * { white-space: nowrap; }   /* one line per row; long remarks use .ra-table__wrap-text */
body.ra--v1 .ra-table--chart > tbody > tr > .ra-table__wrap-text { white-space: normal; }
body.ra--v1 .ra-tablewrap .table .ra-table__wrap-text { white-space: normal; min-width: 280px; }   /* a long text cell (description) wraps instead of widening the table */
body.ra--v1 .table .ra-col-fit { width: 1%; white-space: nowrap; }   /* on a <th>: the column is only as wide as its content; the free width goes to the other columns */


/* ---------- KPI notes, bar lists, table states ------------------------- */
body.ra--v1 .ra-kpi__value { margin-top: 6px; font-size: 30px; letter-spacing: -0.02em; }
body.ra--v1 .ra-kpi__slash { margin: 0 4px; font-weight: var(--ra-fw-regular); color: var(--ra-text-soft); }
body.ra--v1 .ra-kpi__note,
body.ra--v1 .ra-kpi__delta { display: block; margin-top: 4px; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-kpi__delta { font-weight: var(--ra-fw-medium); color: var(--ra-primary-text); }
body.ra--v1 .ra-kpi__delta > .fas { margin-right: 4px; font-size: 11px; }

/* single-series horizontal bars: label · bar · value (value always visible —
   #6AB745 is 2.4:1 on white, so the number, not the bar, carries the data) */
body.ra--v1 .ra-barlist { display: flex; flex-direction: column; gap: 14px; margin: 4px 0; padding: 0; list-style: none; }
body.ra--v1 .ra-barlist__row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 40px;
  align-items: center;
  gap: var(--ra-space-3);
  font-size: var(--ra-fs-base);
}
body.ra--v1 .ra-barlist__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ra-text); }
body.ra--v1 .ra-barlist__track { position: relative; height: 12px; }
body.ra--v1 .ra-barlist__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--ra-bar, 0%);
  min-width: 2px;
  background: var(--ra-brand);
  transition: width 400ms var(--ra-ease);
}
body.ra--v1 .ra-barlist__row:hover .ra-barlist__bar { background: var(--ra-green-600); }
body.ra--v1 .ra-barlist__value { font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; color: var(--ra-text); }

/* table */
body.ra--v1 .ra-table__primary { font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .ra-table__primary:hover { color: var(--ra-primary-text); }
body.ra--v1 .ra-table__nowrap { white-space: nowrap; }
body.ra--v1 .ra-table__sub { display: block; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-regular); color: var(--ra-text-soft); white-space: nowrap; }   /* second line in a cell */
body.ra--v1 .table td { color: var(--ra-text-muted); }

/* status = dot + label (never colour alone); text stays in text colours */
body.ra--v1 .ra-state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .ra-state__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ra-text-soft); }
body.ra--v1 .ra-state--active  .ra-state__dot { background: var(--ra-brand); }
body.ra--v1 .ra-state--planned .ra-state__dot { background: transparent; border: 1.5px solid var(--ra-text-soft); }
body.ra--v1 .ra-state--ending  .ra-state__dot { background: var(--ra-warning); }
body.ra--v1 .ra-state--missed  .ra-state__dot { background: var(--ra-danger); }

@media (max-width: 575.98px) {
  body.ra--v1 .ra-barlist__row { grid-template-columns: 96px minmax(0, 1fr) 36px; }
}


/* ---------- Dashboard pieces: filters, done-vs-expected bars, fix list ----
   .ra-filters           row of dropdown filters above the tiles ("As of" on the right)
   .ra-barlist--target   bar = done, grey track = plan, dark line = expected
                         (.ra-barlist__mark). Bar colour = status; the status
                         is ALSO written as text, never colour alone.
   .ra-fixlist           "Fix now" list: status badge · what · who            */
/* page tabs never wrap: on a narrow screen the row scrolls sideways */
body.ra--v1 .ra-content > .nav-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; }
body.ra--v1 .ra-content > .nav-tabs::-webkit-scrollbar { display: none; }
/* ---------- Report tabs: .ra-reporttabs -----------------------------------
   The sub-pages of a project's Report (Client KPI · Progress · QC · Media ·
   Visits) as one white bar of equal tiles: icon box · name · count. Each
   tile is its own page (a link). The open one (.is-active) is filled light
   green with a green icon box and a green underline. Other page sections
   stay plain .nav-tabs. On a narrow screen the bar scrolls sideways.      */
body.ra--v1 .ra-reporttabs {
  display: flex;
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra1-card-border);
  border-radius: var(--ra1-r-lg);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
body.ra--v1 .ra-reporttabs::-webkit-scrollbar { display: none; }
body.ra--v1 .ra-reporttabs__item {
  flex: 1 0 180px;
  display: flex;
  align-items: center;
  gap: var(--ra-space-3);
  padding: var(--ra-space-3);
  color: var(--ra-text-muted);
  font-size: 15px;
  font-weight: var(--ra-fw-semibold);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
body.ra--v1 .ra-reporttabs__item + .ra-reporttabs__item { border-left: 1px solid var(--ra1-card-border); }
body.ra--v1 .ra-reporttabs__item:hover { color: var(--ra-text); background: var(--ra1-nav-hover); }
/* beats the content-link underline (.ra-content a:not(.btn):hover) */
body.ra--v1 .ra-content .ra-reporttabs a.ra-reporttabs__item:hover { text-decoration: none; }
body.ra--v1 .ra-reporttabs__item:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: -2px; }
body.ra--v1 .ra-reporttabs__item.is-active {
  color: var(--ra-text-heading);
  background: var(--ra-primary-surface);
  box-shadow: inset 0 -3px 0 var(--ra-brand);
}
body.ra--v1 .ra-reporttabs__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ra1-card-border);
  border-radius: var(--ra1-r);
  background: var(--ra-bg-surface);
  color: var(--ra-text-soft);
  font-size: 14px;
}
body.ra--v1 .ra-reporttabs__item.is-active .ra-reporttabs__icon {
  border-color: var(--ra-brand);
  background: var(--ra-brand);
  color: var(--ra-primary-btn-text);
}
body.ra--v1 .ra-reporttabs__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.ra--v1 .ra-reporttabs__count {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ra-bg-subtle);
  color: var(--ra-text-muted);
  font-size: 12px;
  font-weight: var(--ra-fw-semibold);
  font-variant-numeric: tabular-nums;
}
body.ra--v1 .ra-reporttabs__item.is-active .ra-reporttabs__count { background: transparent; color: var(--ra-primary-text); }
@media (max-width: 767.98px) {
  body.ra--v1 .ra-reporttabs__item { flex-basis: auto; font-size: 14px; }
  body.ra--v1 .ra-reporttabs__icon { width: 32px; height: 32px; }
}
/* ---------- Tab dock: .ra-tabdock -----------------------------------------
   Holds .ra-reporttabs (+ .ra-subtabs). From 992px it sticks under the fixed
   topbar while the page scrolls, on the canvas colour so content slides
   under it. Below 992px it scrolls away (the screen is too short).
   While stuck, a dock holding both bars shows only .ra-subtabs (scroll-state
   query; browsers without it keep both bars). */
body.ra--v1 .ra-tabdock { display: grid; gap: var(--ra-space-2); margin: -8px 0 var(--ra-space-3); padding-top: 8px; padding-bottom: 4px; background: var(--ra1-canvas); }
@media (min-width: 992px) {
  body.ra--v1 .ra-tabdock { position: sticky; top: var(--ra1-topbar-h); z-index: calc(var(--ra-z-header) - 10); container-type: scroll-state; }
  @container scroll-state(stuck: top) {
    body.ra--v1 .ra-tabdock:has(> .ra-subtabs) > .ra-reporttabs { display: none; }
  }
}
/* ---------- Sub-tabs: .ra-subtabs -----------------------------------------
   Level 2 under .ra-reporttabs: the sections inside one big tab (a dashboard:
   01 Executive · 02 MSL & Stock · 03 SOS & Shelf …). A white bar of
   numbered pills; the open one (.is-active) is filled brand green with white
   text, like the primary button. Order is the reading order, so the number
   (.ra-subtabs__num) stays. On a narrow screen the bar scrolls sideways.  */
body.ra--v1 .ra-subtabs {
  display: flex;
  gap: var(--ra-space-1);
  padding: 6px;
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra1-card-border);
  border-radius: var(--ra1-r-lg);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
body.ra--v1 .ra-subtabs::-webkit-scrollbar { display: none; }
/* smaller than the level-1 tiles on purpose: 14px label, 9 × 14 padding */
body.ra--v1 .ra-subtabs__item {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--ra-space-2);
  padding: 9px 14px;
  border: 0;
  border-radius: var(--ra1-r);
  background: transparent;
  color: var(--ra-text-muted);
  font-size: var(--ra-fs-base);
  font-weight: var(--ra-fw-semibold);
  line-height: 1.45;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
body.ra--v1 .ra-subtabs__item:hover { color: var(--ra-text); background: var(--ra1-nav-hover); }
/* beats the content-link underline (.ra-content a:not(.btn):hover) */
body.ra--v1 .ra-content .ra-subtabs a.ra-subtabs__item:hover { text-decoration: none; }
body.ra--v1 .ra-subtabs__item:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: 2px; }
body.ra--v1 .ra-subtabs__num { font-size: 11px; font-weight: var(--ra-fw-bold, 700); color: var(--ra-text-soft); font-variant-numeric: tabular-nums; }
body.ra--v1 .ra-subtabs__item.is-active,
body.ra--v1 .ra-content .ra-subtabs a.ra-subtabs__item.is-active:hover {
  background: var(--ra-brand);
  color: var(--ra-primary-btn-text);
  font-weight: var(--ra-fw-bold, 700);
}
body.ra--v1 .ra-subtabs__item.is-active .ra-subtabs__num { color: inherit; opacity: .85; }
/* ---------- Section head: .ra-sectionhead --------------------------------
   Between the sub-tabs and the filters: one line saying where you are
   (report in green · what it covers › Tab 2 of 7), the open section's name
   and the question it answers. Right: how fresh the data is and who the
   report is for. Smaller than the page title (.ra-pagehead__title).      */
body.ra--v1 .ra-sectionhead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px var(--ra-space-5);
  padding: 0 2px;
}
/* a long eyebrow wraps inside the main part; the meta stays on the right */
body.ra--v1 .ra-sectionhead__main { flex: 1 1 0; min-width: 0; }
body.ra--v1 .ra-sectionhead__eyebrow { margin: 0; font-size: 12px; font-weight: var(--ra-fw-semibold); color: var(--ra-text-muted); }
body.ra--v1 .ra-sectionhead__eyebrow b { color: var(--ra-primary-text); }
body.ra--v1 .ra-sectionhead__title { margin: 2px 0; font-size: 20px; font-weight: var(--ra-fw-bold, 700); letter-spacing: -0.015em; color: var(--ra-text-heading); }
body.ra--v1 .ra-sectionhead__desc { margin: 0; max-width: 80ch; color: var(--ra-text-muted); }
body.ra--v1 .ra-sectionhead__meta { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); text-align: right; white-space: nowrap; }
body.ra--v1 .ra-sectionhead__meta b { font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
@media (max-width: 575.98px) {
  body.ra--v1 .ra-sectionhead__main { flex-basis: 100%; }
  body.ra--v1 .ra-sectionhead__meta { text-align: left; white-space: normal; }
}
/* ---------- Labels in several languages: .ra-langbar + .ra-i18n -----------
   ONE label column, one language at a time. .ra-langbar picks the language
   for every table inside the target form; each tab counts the labels still
   missing. While translating, the default-language text (.ra-i18n__ref)
   is its own column, so all inputs of a row stay on one line. Never stack one input per language in a row.  */
body.ra--v1 .ra-langbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2) var(--ra-space-3); margin-bottom: var(--ra-space-3); }
body.ra--v1 .ra-langbar__label { font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-langbar__label .fas { margin-right: 6px; }
body.ra--v1 .ra-langbar__manage { margin-left: auto; }
body.ra--v1 .ra-langtabs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }   /* 7 languages: the row scrolls, never wraps */
body.ra--v1 .ra-langtabs::-webkit-scrollbar { display: none; }
body.ra--v1 .ra-langtabs .btn { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
body.ra--v1 .ra-langtabs .btn:where(:not(.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-dark)) { background: var(--ra-bg-surface); }
body.ra--v1 .ra-langtabs__code { font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-text-soft); }
body.ra--v1 .ra-langtabs__default { font-size: var(--ra-fs-xs); color: var(--ra-text-soft); }
body.ra--v1 .ra-langtabs .btn-check:checked + .btn .ra-langtabs__code,
body.ra--v1 .ra-langtabs .btn-check:checked + .btn .ra-langtabs__default { color: inherit; }
body.ra--v1 .ra-langtabs .badge { font-size: 10px; }
/* more than 6 languages: picker instead of tabs */
body.ra--v1 .ra-langbar .btn-outline-secondary { background: var(--ra-bg-surface); }
body.ra--v1 .ra-langpick { display: inline-flex; align-items: center; gap: 6px; min-width: 200px; text-align: left; }
body.ra--v1 .ra-langpick::after { margin-left: auto; }
body.ra--v1 .ra-langmenu { --bs-dropdown-min-width: 580px; padding: 6px; }
body.ra--v1 .ra-langmenu.show { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; }
body.ra--v1 .ra-langmenu .dropdown-item { display: flex; align-items: center; gap: var(--ra-space-2); border-radius: var(--ra1-r-sm); cursor: pointer; }
body.ra--v1 .ra-langmenu .ra-langtabs__code { flex: none; width: 22px; }
body.ra--v1 .ra-langmenu__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.ra--v1 .ra-langmenu__name .ra-langtabs__default { margin-left: 6px; }
body.ra--v1 .ra-langmenu__done { font-size: 11px; color: var(--ra-primary-text); }
body.ra--v1 .ra-langmenu .badge:not([hidden]) ~ .ra-langmenu__done { display: none; }   /* tick = nothing missing */
body.ra--v1 .ra-langmenu .btn-check:checked + .dropdown-item { font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); }
body.ra--v1 .ra-langmenu .btn-check:focus-visible + .dropdown-item { outline: 2px solid var(--ra-focus); outline-offset: -2px; }
body.ra--v1 .ra-langbar__done { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
@media (max-width: 575.98px) {
  body.ra--v1 .ra-langmenu { --bs-dropdown-min-width: 260px; }
  body.ra--v1 .ra-langmenu.show { grid-template-columns: 1fr; }
}
body.ra--v1 .ra-i18n { min-width: 180px; }
body.ra--v1 .ra-i18n__ref { color: var(--ra-text-muted); white-space: nowrap; }
body.ra--v1 .ra-langstep { display: inline-flex; align-items: center; gap: 2px; }
body.ra--v1 .ra-langbar__hint { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
/* tables whose cells are inputs */
body.ra--v1 .ra-table--form > :not(caption) > * > * { padding-top: 8px; padding-bottom: 8px; }
body.ra--v1 .ra-table--form th[scope="row"] { font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-table--form .ra-time { width: 108px; }
body.ra--v1 .ra-table--form .ra-cellnote { min-width: 140px; }
body.ra--v1 .ra-table--form tr.is-off > :not(.ra-cell-status) { opacity: 0.5; }   /* the Active switch itself stays full strength */
body.ra--v1 .ra-only-active tr.is-off { display: none; }
body.ra--v1 .ra-switch-only { display: inline-block; min-height: 0; margin: 0; vertical-align: middle; }

/* setting tables: small controls inside cells */
body.ra--v1 .ra-help { margin-left: 4px; padding: 0; font-size: 11px; line-height: 1; color: var(--ra-text-soft); background: none; border: 0; border-radius: 50%; cursor: help; }
body.ra--v1 .ra-help:hover,
body.ra--v1 .ra-help:focus-visible { color: var(--ra-primary-text); }
body.ra--v1 .ra-checkpair { display: flex; gap: var(--ra-space-3); }
body.ra--v1 .ra-checkpair .form-check { min-height: 0; margin: 0; white-space: nowrap; cursor: pointer; }
body.ra--v1 .ra-table--form .ra-upload { min-width: 164px; height: 30px; padding-top: 0; padding-bottom: 0; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-table--form .ra-qty { width: 60px; text-align: right; }
/* .ra-budget — a total against a ceiling (sum of the [data-ra-sum-item] inputs of active rows) */
body.ra--v1 .ra-budget { display: flex; align-items: center; gap: var(--ra-space-2); margin-right: var(--ra-space-3); }
body.ra--v1 .ra-budget__text { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); white-space: nowrap; }
body.ra--v1 .ra-budget__text b { font-size: var(--ra-fs-base); font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-budget .progress { width: 96px; }
body.ra--v1 .ra-budget.is-over .ra-budget__text b { color: var(--ra-danger-text); }
body.ra--v1 .ra-budget.is-over .progress-bar { background-color: var(--ra-danger); }

/* .ra-colour — a data colour chosen by the user (status on maps / charts).
   These are DATA colours, not UI colours: always shown with their name. */
body.ra--v1 .ra-colour { flex: none; display: inline-block; width: 14px; height: 14px; border-radius: var(--ra1-r-sm); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
body.ra--v1 .ra-colour--none   { background: linear-gradient(to top right, transparent 46%, var(--ra-danger) 46%, var(--ra-danger) 54%, transparent 54%), var(--ra-bg-surface); }
body.ra--v1 .ra-colour--green  { background: #3f9a2a; }
body.ra--v1 .ra-colour--lime   { background: #9ccc3c; }
body.ra--v1 .ra-colour--amber  { background: #ffc107; }
body.ra--v1 .ra-colour--orange { background: #f0791a; }
body.ra--v1 .ra-colour--red    { background: #d92027; }
body.ra--v1 .ra-colour--pink   { background: #e0559a; }
body.ra--v1 .ra-colour--purple { background: #8a4fc7; }
body.ra--v1 .ra-colour--brown  { background: #8b5e34; }
body.ra--v1 .ra-colour--grey   { background: #7d858c; }
body.ra--v1 .ra-colour--teal   { background: #00a39a; }
body.ra--v1 .ra-colour--forest { background: #1b6b3a; }
body.ra--v1 .ra-colour--olive  { background: #7a8a1f; }
body.ra--v1 .ra-colour--coral  { background: #ef6f5e; }
body.ra--v1 .ra-colour--maroon { background: #8c2f39; }
body.ra--v1 .ra-colourpick { display: inline-flex; align-items: center; gap: var(--ra-space-2); min-width: 132px; background: var(--ra-bg-surface); }
body.ra--v1 .ra-colourpick::after { margin-left: auto; }
body.ra--v1 .ra-colourmenu { --bs-dropdown-min-width: 440px; padding: 6px; }
body.ra--v1 .ra-colourmenu.show { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 6px; }
body.ra--v1 .ra-colourmenu .dropdown-item { display: flex; align-items: center; gap: var(--ra-space-2); border-radius: var(--ra1-r-sm); cursor: pointer; }
body.ra--v1 .ra-colourmenu .btn-check:checked + .dropdown-item { font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); }
body.ra--v1 .ra-colourmenu__custom { grid-column: 1 / -1; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--ra-border); }
body.ra--v1 .ra-colourmenu__customlabel { display: flex; align-items: center; justify-content: space-between; gap: var(--ra-space-2); padding: var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem); cursor: pointer; }
body.ra--v1 .ra-colourmenu__colour { width: 44px; height: 28px; padding: 0; border: 1px solid var(--ra-border-strong); border-radius: var(--ra1-r-sm); background: none; cursor: pointer; }
body.ra--v1 .ra-colourmenu__colour:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: 2px; }
body.ra--v1 .ra-colour--custom { background: var(--ra-custom, #7d858c); }
body.ra--v1 .ra-colourmenu .btn-check:focus-visible + .dropdown-item { outline: 2px solid var(--ra-focus); outline-offset: -2px; }
/* a card whose title is an editable, translatable group name */
body.ra--v1 .ra-grouphead { flex: 1 1 auto; display: flex; align-items: center; gap: var(--ra-space-3); min-width: 0; padding: 10px 0; }
body.ra--v1 .ra-grouphead__no { flex: none; display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); border-radius: var(--ra1-r-sm); }
body.ra--v1 .ra-grouphead__input { flex: 0 1 300px; min-width: 140px; }
body.ra--v1 .ra-grouphead__input .form-control { font-weight: var(--ra-fw-semibold); }
/* a card that folds: chevron in the header (.ra-fold) + Bootstrap .collapse */
body.ra--v1 .ra-fold .fas { transition: transform var(--ra-dur) var(--ra-ease); }
body.ra--v1 .ra-fold[aria-expanded="false"] .fas { transform: rotate(-90deg); }
/* the three status tables share one column grid, so they line up under each other */
body.ra--v1 .ra-table--status { table-layout: fixed; min-width: 680px; }
body.ra--v1 .ra-table--status th:first-child { width: 76px; }
body.ra--v1 .ra-table--status .ra-i18n__ref,
body.ra--v1 .ra-table--status th[data-ra-lang-not] { width: 27%; white-space: normal; }
body.ra--v1 .ra-table--status th:nth-last-child(2) { width: 172px; }
body.ra--v1 .ra-table--status th:last-child { width: 92px; }
body.ra--v1 .ra-table--status .ra-i18n { min-width: 0; }

/* ---------- Catalogues (products, POSM): type switch, category cards ---------------------
   .ra-typetabs   a segmented switch with a count per option (one type at a time)
   .ra-catmeta    category title + code + one line of facts, in a card header
   .ra-thumb      square image tile (initials when there is no picture)
   .ra-drag       grip in the Order column: rows can be dragged to reorder   */
body.ra--v1 .ra-typetabs .btn { gap: 6px; }
body.ra--v1 .ra-typetabs .btn:where(:not(.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-dark)) { background: var(--ra-bg-surface); }
body.ra--v1 .ra-typetabs__count { font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; color: var(--ra-text-soft); }
body.ra--v1 .ra-typetabs .btn-check:checked + .btn .ra-typetabs__count { color: inherit; }
body.ra--v1 .ra-typehint { margin: 0 0 var(--ra-space-3); font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-typehint .fas { margin-right: 6px; color: var(--ra-text-soft); }
body.ra--v1 .ra-thumb { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-text-muted); background: var(--ra-bg-hover); border: 1px solid var(--ra1-card-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-catmeta { min-width: 0; }
body.ra--v1 .ra-catmeta .card-title { margin: 0; }
body.ra--v1 .ra-catmeta__code { margin-left: var(--ra-space-2); font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-regular); color: var(--ra-text-soft); }
body.ra--v1 .ra-catmeta__line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--ra-space-3); margin-top: 2px; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-catmeta__line .ra-state { font-size: inherit; }
body.ra--v1 .ra-catmeta__item .fas { margin-right: 5px; font-size: 11px; color: var(--ra-text-soft); }
body.ra--v1 .ra-drag { margin-right: var(--ra-space-2); color: var(--ra-border-strong); cursor: grab; }
body.ra--v1 .ra-table--products { table-layout: fixed; min-width: 920px; }
body.ra--v1 .ra-table--products th:nth-child(1) { width: 112px; }
body.ra--v1 .ra-table--products th:nth-child(2) { width: 72px; }
body.ra--v1 .ra-table--products th:nth-child(3) { width: 120px; }
body.ra--v1 .ra-table--products th:nth-last-child(3) { width: 130px; }
body.ra--v1 .ra-table--products th:nth-last-child(2) { width: 120px; }
body.ra--v1 .ra-table--products th:last-child { width: 108px; }
body.ra--v1 .ra-table--products td.ra-cell-status { overflow: visible; }
body.ra--v1 .ra-table--nonum th:nth-last-child(3) { width: auto; }   /* no numeric column: that slot is the name / competitor */
body.ra--v1 .ra-table--products td { overflow: hidden; text-overflow: ellipsis; }
body.ra--v1 .ra-table--products tr.is-off > :not(.ra-cell-status) { opacity: 0.55; }

/* ---------- Assortment sets: .ra-setcard ---------------------------------
   One card per set — the same three facts in the same place on every card,
   so sets can be compared at a glance (products · stores · what is recorded). */
body.ra--v1 .ra-setcard .card-header { gap: var(--ra-space-3); }
body.ra--v1 .ra-setcard__code { display: inline-block; margin-right: var(--ra-space-2); padding: 1px 6px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); border-radius: var(--ra1-r-sm); vertical-align: 1px; }
body.ra--v1 .ra-facts { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; }
body.ra--v1 .ra-facts dt { margin-top: var(--ra-space-3); font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-medium); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ra-text-soft); }
body.ra--v1 .ra-facts dt:first-child { margin-top: 0; }
body.ra--v1 .ra-facts dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--ra-space-2); margin: 0; color: var(--ra-text-muted); }
body.ra--v1 .ra-facts dd b { font-size: 22px; font-weight: var(--ra-fw-semibold); line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-facts dd span { font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-chips { gap: 4px; padding-top: 4px; }
body.ra--v1 .ra-chips .badge { font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-setcard__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding-left: 10px; padding-right: 10px; }
body.ra--v1 .ra-setcard__actions .ra-iconbtn { margin-left: auto; }

/* ---------- Account tree: .ra-tree -----------------------------------------
   A hierarchy built from <details> (one manager) inside nested <ul>.
   Closed by default below the first levels, so 300 accounts stay scannable;
   every row says how many people sit under it. Leaves (.ra-tree__leaves)
   flow in columns. Search + expand/collapse are wired in aisle-main.js.  */
body.ra--v1 .ra-tree,
body.ra--v1 .ra-tree ul { margin: 0; padding: 0; list-style: none; }
body.ra--v1 .ra-tree ul { margin-left: 21px; padding-left: 12px; border-left: 1px solid var(--ra-border); }
body.ra--v1 .ra-tree__row { display: flex; align-items: center; gap: var(--ra-space-2); min-height: 40px; padding: 4px var(--ra-space-2); border-radius: var(--ra1-r); cursor: pointer; list-style: none; }
body.ra--v1 .ra-tree__row::-webkit-details-marker { display: none; }
body.ra--v1 .ra-tree__row:hover { background: var(--ra1-nav-hover); }
body.ra--v1 .ra-tree__row:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: -2px; }
body.ra--v1 .ra-tree__chev { flex: none; width: 12px; font-size: 10px; text-align: center; color: var(--ra-text-soft); transition: transform var(--ra-dur) var(--ra-ease); }
body.ra--v1 details[open] > .ra-tree__row > .ra-tree__chev { transform: rotate(90deg); }
body.ra--v1 .ra-tree__avatar { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; font-size: 10px; font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); border-radius: 50%; }
body.ra--v1 .ra-tree__name { font-weight: var(--ra-fw-medium); color: var(--ra-text); white-space: nowrap; }
body.ra--v1 .ra-tree__meta { margin-left: auto; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); text-align: right; }
body.ra--v1 .ra-tree__leaves { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px var(--ra-space-4); padding-top: 4px; padding-bottom: var(--ra-space-2); }
body.ra--v1 .ra-tree__leaf { display: flex; align-items: center; gap: var(--ra-space-2); min-height: 28px; padding: 0 var(--ra-space-2); font-size: var(--ra-fs-sm); color: var(--ra-text); border-radius: var(--ra1-r-sm); }
body.ra--v1 .ra-tree__leaf .ra-state__dot { flex: none; width: 6px; height: 6px; background: var(--ra-brand); border-radius: 50%; }
body.ra--v1 .ra-tree .is-match > details > .ra-tree__row .ra-tree__name,
body.ra--v1 .ra-tree__leaf.is-match { background: var(--ra-green-100); color: var(--ra-active-text); border-radius: var(--ra1-r-sm); box-shadow: 0 0 0 3px var(--ra-green-100); }
body.ra--v1 .ra-tree__leaf.is-match { box-shadow: none; font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-tree__root { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2) var(--ra-space-4); margin-bottom: var(--ra-space-2); padding: var(--ra-space-2) var(--ra-space-3); background: var(--ra-bg-subtle); border: 1px solid var(--ra1-card-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-person { display: inline-flex; align-items: center; gap: var(--ra-space-2); font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .ra-levels { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2) var(--ra-space-3); padding: var(--ra-space-3) 20px; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); border-bottom: 1px solid var(--ra1-card-border); }
body.ra--v1 .ra-levels .fas { font-size: 10px; color: var(--ra-text-soft); }
body.ra--v1 .ra-levels b { margin-right: 4px; font-size: var(--ra-fs-md); font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-card-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--ra-space-1) var(--ra-space-2); }
body.ra--v1 .ra-levels__note { margin-left: auto; }
body.ra--v1 .ra-perm { margin: 0; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .ra-perm .fas { width: 16px; margin-right: 6px; font-size: 12px; color: var(--ra-primary-text); }
/* role cards (project team) */
body.ra--v1 .ra-rolecard { height: 100%; padding: var(--ra-space-3) var(--ra-space-4) var(--ra-space-4); background: var(--ra-bg-subtle); border: 1px solid var(--ra1-card-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-rolecard__head { display: flex; align-items: baseline; gap: var(--ra-space-2); margin-bottom: var(--ra-space-2); }
body.ra--v1 .ra-rolecard__role { font-size: var(--ra-fs-lg); font-weight: var(--ra-fw-semibold); color: var(--ra-text-heading); }
body.ra--v1 .ra-rolecard__name { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-rolecard__count { margin-left: auto; font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; color: var(--ra-text-muted); }
body.ra--v1 .ra-rolecard__text { margin: 4px 0 var(--ra-space-3); font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-rolecard__people { display: grid; gap: 6px; margin: 0; padding: var(--ra-space-3) 0 0; list-style: none; border-top: 1px solid var(--ra1-card-border); }
body.ra--v1 .ra-rolecard__people li { display: flex; align-items: center; gap: var(--ra-space-2); font-size: var(--ra-fs-sm); color: var(--ra-text); }
body.ra--v1 .ra-rolecard__scope { margin-left: auto; font-size: var(--ra-fs-xs); color: var(--ra-text-muted); }
@media (max-width: 575.98px) {
  body.ra--v1 .ra-tree ul { margin-left: 9px; padding-left: 6px; }
  body.ra--v1 .ra-levels__note { flex-basis: 100%; margin-left: 0; }
  body.ra--v1 .ra-filters__asof { flex-basis: 100%; margin-left: 0; }
  body.ra--v1 .ra-tree__row { flex-wrap: wrap; }
  body.ra--v1 .ra-tree__meta { flex-basis: 100%; margin-left: 54px; text-align: left; }
}

/* ---------- Import pages (one pattern for every import) --------------------
   1 template (.ra-filerow) → 2 upload (.ra-dropzone) → 3 check result
   (.ra-stats + error table + .ra-actionbar) → history table.
   .ra-preview is a DESIGN-ONLY state switcher; remove it in the product.   */
body.ra--v1 .ra-step { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: var(--ra-space-2); font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); border-radius: 50%; vertical-align: 1px; }
body.ra--v1 .ra-filerow { display: flex; align-items: center; gap: var(--ra-space-3); padding: var(--ra-space-3); background: var(--ra-bg-subtle); border: 1px solid var(--ra1-card-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-filerow__icon { flex: none; font-size: 24px; color: var(--ra-primary-text); }
body.ra--v1 .ra-filerow__text { flex: 1 1 auto; min-width: 0; }
body.ra--v1 .ra-filerow__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-filerow__meta { display: block; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-filerow .btn { flex: none; }
body.ra--v1 .ra-filerow .btn-outline-secondary { background: var(--ra-bg-surface); }
body.ra--v1 .ra-note { margin: var(--ra-space-3) 0 0; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-note .badge { margin-right: var(--ra-space-2); }
body.ra--v1 .ra-hints { margin: var(--ra-space-3) 0; padding-left: 18px; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-hints li + li { margin-top: 4px; }
body.ra--v1 .ra-dropzone { padding: var(--ra-space-6) var(--ra-space-4); text-align: center; background: var(--ra-bg-subtle); border: 2px dashed var(--ra-border-strong); border-radius: var(--ra1-r-lg); }
body.ra--v1 .ra-dropzone.is-dragover { background: var(--ra-green-050); border-color: var(--ra-focus); }
body.ra--v1 .ra-dropzone__icon { font-size: 28px; color: var(--ra-text-soft); }
body.ra--v1 .ra-dropzone__title { margin: var(--ra-space-2) 0 2px; font-size: var(--ra-fs-md); font-weight: var(--ra-fw-semibold); color: var(--ra-text-heading); }
body.ra--v1 .ra-dropzone__text { margin: 0 0 var(--ra-space-3); font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-dropzone .btn:where(:not(.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-dark)) { background: var(--ra-bg-surface); }
/* [data-ra-dropzone] (RA.dropzone): the whole zone opens the file picker; .has-file = a file is chosen */
body.ra--v1 .ra-dropzone[data-ra-dropzone] { cursor: pointer; transition: background-color .15s, border-color .15s; }
body.ra--v1 .ra-dropzone[data-ra-dropzone]:hover { border-color: var(--ra-focus); }
body.ra--v1 .ra-dropzone[data-ra-dropzone]:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: 2px; }
body.ra--v1 .ra-dropzone.has-file { background: var(--ra-green-050); border-style: solid; border-color: var(--ra-focus); }
body.ra--v1 .ra-dropzone.has-file .ra-dropzone__icon { color: var(--ra-primary-text); }
body.ra--v1 .ra-dropzone__file { display: block; margin: 0 0 var(--ra-space-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-dropzone__file:empty { display: none; }
body.ra--v1 .ra-fieldset { margin: var(--ra-space-4) 0 0; }
body.ra--v1 .ra-fieldset legend { float: none; margin-bottom: var(--ra-space-1); font-size: var(--ra-fs-base); font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.ra--v1 .ra-stats__cell { padding: var(--ra-space-4) 20px; border-left: 1px solid var(--ra1-card-border); }
body.ra--v1 .ra-stats__cell:first-child { border-left: 0; }
body.ra--v1 .ra-stats__value { display: block; font-size: 28px; font-weight: var(--ra-fw-semibold); line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-stats__label { display: block; margin-top: 4px; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-actionbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ra-space-3); padding-top: var(--ra-space-3); padding-bottom: var(--ra-space-3); }
body.ra--v1 .ra-actionbar > .ra-text-muted { flex: 1 1 320px; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-actionbar__buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--ra-space-2); margin-left: auto; }
body.ra--v1 .ra-alert__actions { display: flex; flex-wrap: wrap; gap: var(--ra-space-2); margin-top: var(--ra-space-3); }
body.ra--v1 .ra-alert__actions .btn-outline-secondary { background: var(--ra-bg-surface); }
body.ra--v1 .ra-preview { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-3); margin-bottom: var(--ra-space-3); padding: var(--ra-space-2) var(--ra-space-3); border: 1px dashed var(--ra-border-strong); border-radius: var(--ra1-r); }
body.ra--v1 .ra-preview__label { font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-preview__label .fas { margin-right: 6px; }
body.ra--v1 .ra-preview .btn:where(:not(.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-dark)) { background: var(--ra-bg-surface); }
@media (max-width: 767.98px) {
  body.ra--v1 .ra-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.ra--v1 .ra-stats__cell:nth-child(odd) { border-left: 0; }
  body.ra--v1 .ra-stats__cell:nth-child(n + 3) { border-top: 1px solid var(--ra1-card-border); }
}

/* one field + its button on a line (stacks on phones) */
body.ra--v1 .ra-inlineform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--ra-space-3); }
body.ra--v1 .ra-inlineform__field { flex: 0 1 360px; min-width: 220px; }
body.ra--v1 .ra-inlineform .form-label { margin-bottom: var(--ra-space-1); font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-table__fileicon { margin-right: var(--ra-space-2); color: var(--ra-text-soft); }
/* .ra-empty — a list with nothing in it: say why, offer the way out */
body.ra--v1 .ra-empty { padding: 56px var(--ra-space-5); text-align: center; }
body.ra--v1 .ra-empty__icon { font-size: 28px; color: var(--ra-text-soft); }
body.ra--v1 .ra-empty__title { margin: var(--ra-space-3) 0 var(--ra-space-1); font-size: var(--ra-fs-md); font-weight: var(--ra-fw-semibold); color: var(--ra-text-heading); }
body.ra--v1 .ra-empty__text { margin: 0 0 var(--ra-space-4); color: var(--ra-text-muted); }
/* .ra-filters — the page's filter row as ONE white bar:
   "FILTERS" label · pickers / search · (As of / extra on the right) · Reset.
   The pickers stay plain Bootstrap dropdowns ([data-ra-select]).
   Reset ([data-ra-filters-reset]) puts every picker back on its first option
   and empties the search boxes; it never touches view switches. */
body.ra--v1 .ra-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ra-space-2);
  margin-bottom: var(--ra-space-3);
  padding: 10px var(--ra-space-3);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra1-card-border);
  border-radius: var(--ra1-r-lg);
}
/* inside a card (card-body ra-filters) the card is the frame: no 2nd border */
body.ra--v1 .card > .ra-filters { margin-bottom: 0; border: 0; border-radius: 0; }
/* white fill for outline / ghost pickers only — solid variants (Search = btn-primary…) keep their own fill;
   :where() keeps the old specificity so .btn-check:checked / .active states still win */
body.ra--v1 .ra-filters .btn:where(:not(.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-dark)) { background: var(--ra-bg-surface); }
body.ra--v1 .ra-filters .btn-outline-secondary { --bs-btn-border-color: var(--ra1-filter-border); }
body.ra--v1 .ra-filters [data-ra-select] [data-ra-value] { font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-filters__label {
  margin-right: var(--ra-space-1);
  font-size: 11px;
  font-weight: var(--ra-fw-bold, 700);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ra-text-soft);
}
body.ra--v1 .ra-filters .btn.ra-filters__reset {
  margin-left: auto;
  background: transparent;
  color: var(--ra-primary-text);
  font-weight: var(--ra-fw-bold, 700);
}
body.ra--v1 .ra-filters .btn.ra-filters__reset:hover { background: var(--ra-primary-surface); color: var(--ra-active-text); }
body.ra--v1 .ra-filters__asof ~ .btn.ra-filters__reset { margin-left: 0; }
body.ra--v1 .ra-filters__search { flex: 0 1 260px; min-width: 180px; }
/* "More filters" of a filter bar (as .ra-exportfilters--more of Export): a .btn-ghost
   [data-bs-toggle="collapse"] before Reset opens .collapse.ra-filters__more — a full-width
   row INSIDE the bar (so Reset and RA.filterParams take its pickers too), dashed line on top. */
body.ra--v1 .ra-filters__more { flex: 0 0 100%; }
body.ra--v1 .ra-filters__morebody {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ra-space-2);
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed var(--ra1-card-border);
}

/* .ra-tomselect — a searchable picker (Tom Select, vendor/tom-select; JS: RA.tomSelect in aisle-main.js)
   On a filter picker ([data-ra-select]) the button stays what you see and click; Tom Select's own
   control is laid invisibly over it (.ra-tomselect__ts) only to anchor the menu below the button.
   The menu sits in <body> (dropdownParent, so a .card with overflow: hidden cannot cut it) and
   carries .dropdown-menu: it takes the theme's menu look (light / dark) from above; here: the
   list, the search box, the states. Without vendor/tom-select the plain menu scrolls. */
body.ra--v1 [data-ra-select].ra-tomselect > .dropdown-menu { max-height: min(360px, 60vh); overflow-y: auto; }
body.ra--v1 .ra-tomselect__ts { position: absolute; inset: 0; pointer-events: none; }
body.ra--v1 .ra-tomselect__ts > .ts-control { height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; }
body.ra--v1 .ra-tomselect__menu {
  width: auto;
  min-width: 240px;   /* Tom Select sets width = the button's; never narrower than this */
  max-width: min(360px, calc(100vw - 32px));
  margin: 4px 0 0;
  padding: var(--ra-space-1) 0;
  font-size: var(--bs-dropdown-font-size);
}
body.ra--v1 .ra-tomselect__menu .dropdown-input-wrap { padding: var(--ra-space-1) var(--ra-space-2) var(--ra-space-2); border-bottom: 1px solid var(--ra-border); }
body.ra--v1 .ra-tomselect__menu .dropdown-input {
  height: 32px;
  padding: 0 var(--ra-space-2);
  color: var(--ra-text);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border-strong);
  border-radius: var(--ra1-r);
  box-shadow: none;
}
body.ra--v1 .ra-tomselect__menu .dropdown-input:focus { border-color: var(--ra-focus); box-shadow: 0 0 0 1px var(--ra-focus); outline: 0; }
body.ra--v1 .ra-tomselect__menu .ts-dropdown-content { max-height: min(320px, 50vh); padding-top: var(--ra-space-1); }
body.ra--v1 .ra-tomselect__menu .option,
body.ra--v1 .ra-tomselect__menu .no-results {
  padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);
  color: var(--bs-dropdown-link-color);
  cursor: pointer;
}
body.ra--v1 .ra-tomselect__menu .option.active { color: var(--bs-dropdown-link-hover-color); background: var(--bs-dropdown-link-hover-bg); }
body.ra--v1 .ra-tomselect__menu .option.selected { font-weight: var(--ra-fw-medium); color: var(--bs-dropdown-link-active-color); background: var(--bs-dropdown-link-active-bg); }
body.ra--v1 .ra-tomselect__menu .no-results { color: var(--ra-text-soft); cursor: default; }
body.ra--v1 .ra-tomselect__menu .highlight { font-weight: var(--ra-fw-semibold); color: inherit; background: none; }
/* a <select class="form-select ra-tomselect"> in a form: the control keeps the form-select look */
body.ra--v1 .ts-wrapper.ra-tomselect.focus .ts-control { border-color: var(--ra-focus); box-shadow: 0 0 0 1px var(--ra-focus); }
body.ra--v1 .ra-filters__asof { margin-left: auto; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
/* [data-ra-datetime] — date + time picker (Tempus Dominus 6, vendor/tempus-dominus; JS: RA.dateTime in aisle-main.js).
   The widget is added to <body>; its --td-* colours read the --ra-* tokens, so dark mode follows by itself.
   Selected day / hour = brand fill, hover = the usual hover fill (no coloured bar). */
body.ra--v1 .tempus-dominus-widget.light,
body.ra--v1 .tempus-dominus-widget {
  --td-widget-background: var(--ra-bg-surface);
  --td-font-color: var(--ra-text);
  --td-dow-color: var(--ra-text-soft);
  --td-disabled-color: var(--ra-text-soft);
  --td-alternate-color: var(--ra-text-soft);
  --td-btn-hover-bg: var(--ra-bg-hover);
  --td-active-bg: var(--ra-primary);
  --td-active-color: #fff;
  --td-active-border-color: var(--ra-primary);
  --td-range-bg: var(--ra-green-100);
  --td-primary-border-color: var(--ra-border);
  --td-secondary-border-color: var(--ra-border);
  --td-border-radius: var(--ra1-r-sm);
  font-family: inherit;
  border: 1px solid var(--ra1-card-border);
  border-radius: var(--ra1-r-lg);
  box-shadow: var(--ra-shadow-pop);
  z-index: 1080;
}
body.ra--v1 .tempus-dominus-widget .toolbar div { border-radius: var(--ra1-r-sm); }

/* QC of a card (QC page visit-edit; JS: RA.qc in aisle-main.js)
   .ra-qcbar      card footer: QC code (n) — opens the modal, n = the card's codes · Save
   .ra-qcstate    card header, right: the form chip + the card's QC state
   .ra-qccodes    the shared modal: groups Code 1–8 in columns, each group kept whole
   .ra-qcsum      right column: one row per card — name (jump link) · state (n errors)
   .ra-formnav__link[data-ra-qc-result]  the jump list: a red dot = the card has codes */
body.ra--v1 .ra-form td .form-select-sm { min-width: 84px; }
body.ra--v1 .ra-qcbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2); }
body.ra--v1 .ra-qcstate { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--ra-space-2); }
body.ra--v1 .ra-qccodes { columns: 2 240px; column-gap: var(--ra-space-5); }
body.ra--v1 .ra-qccodes__group { break-inside: avoid; margin-bottom: var(--ra-space-4); }
body.ra--v1 .ra-qccodes__head { display: flex; align-items: baseline; gap: var(--ra-space-2); margin-bottom: var(--ra-space-1); font-size: var(--ra-fs-base); font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-qccodes__count { font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); color: var(--ra-danger-text); }
body.ra--v1 .ra-qccodes .form-check { padding-top: 2px; padding-bottom: 2px; }
body.ra--v1 .ra-qccodes .form-check-label b { display: inline-block; min-width: 2.25em; }
body.ra--v1 .ra-qcsum { margin: 0; padding: 0 var(--ra-space-4) var(--ra-space-3); list-style: none; }
body.ra--v1 .ra-qcsum__row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--ra-space-2); padding: var(--ra-space-2) 0; border-bottom: 1px solid var(--ra-border); }
body.ra--v1 .ra-qcsum__row:last-child { border-bottom: 0; }
body.ra--v1 .ra-qcsum__name { flex: 1 1 auto; min-width: 0; color: var(--ra-text); text-decoration: none; }
body.ra--v1 .ra-qcsum__name:hover { text-decoration: underline; }
body.ra--v1 .ra-formnav__link[data-ra-qc-result]::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; border: 1.5px solid var(--ra-text-soft); border-radius: 50%; }
body.ra--v1 .ra-formnav__link[data-ra-qc-result="error"]::before { background: var(--ra-danger); border-color: var(--ra-danger); }

body.ra--v1 .ra-barlist--target .ra-barlist__row { grid-template-columns: 128px minmax(0, 1fr) 76px 84px; }
body.ra--v1 .ra-barlist--target .ra-barlist__track { background: var(--ra-bg-hover); border-radius: var(--ra1-r-sm); }
body.ra--v1 .ra-barlist--target .ra-barlist__bar { border-radius: var(--ra1-r-sm); }
body.ra--v1 .ra-barlist__bar--risk,
body.ra--v1 .ra-barlist__row:hover .ra-barlist__bar--risk { background: var(--ra-warning-text); }
body.ra--v1 .ra-barlist__bar--behind,
body.ra--v1 .ra-barlist__row:hover .ra-barlist__bar--behind { background: var(--ra-danger-text); }
body.ra--v1 .ra-barlist__mark { position: absolute; top: -5px; bottom: -5px; left: var(--ra-mark, 0%); width: 2px; background: var(--ra-text); }
body.ra--v1 .ra-barlist__legend { margin: var(--ra-space-4) 0 0; font-size: var(--ra-fs-sm); color: var(--ra-text-soft); }
@media (max-width: 575.98px) {
  body.ra--v1 .ra-barlist--target .ra-barlist__row { grid-template-columns: 96px minmax(0, 1fr) 68px; }
  body.ra--v1 .ra-barlist--target .ra-state { display: none; }   /* bar colour + value remain; status is in the table below */
}

body.ra--v1 .ra-kpi__value .badge { font-size: 0.6em; vertical-align: middle; }
body.ra--v1 .ra-fixlist .list-group-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: var(--ra-space-3); }
body.ra--v1 .ra-fixlist .badge { padding: 6px 4px; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; }
body.ra--v1 .ra-fixlist__who { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); white-space: nowrap; }
@media (max-width: 575.98px) {
  body.ra--v1 .ra-fixlist .list-group-item { grid-template-columns: 96px minmax(0, 1fr); }
  body.ra--v1 .ra-fixlist__who { grid-column: 2; }
}

/* ---------- V1 · highlight theme ---------------------------------------
   Stronger frame: a DEEP FTRACK-GREEN topbar across the full width (logo
   on the left), a PALE-GREEN menu, a darker canvas so white cards pop.
   ┌──────────────────────────────────────────────────────────┐
   │ ☰  RetailActive            View as · Market │ EN 🔔 (TN) │ ← #1e3518
   ├──────────┬───────────────────────────────────────────────┤
   │ ▌Home    │  Home › RetailActive › Overview                │
   │  Projects│  RetailActive overview        [Export][+ New] │ ← canvas #e3e7e0
   │  …       │  [card] [card] [card] [card]                  │
   └──────────┴───────────────────────────────────────────────┘
   Contrast: white on topbar 13.3:1 · logo green on topbar 5.4:1 ·
   menu text 15.9:1 · active item dark text on #6AB745 6.9:1          */
body.ra--v1 {
  --ra1-topbar-bg:    #1e3518;
  --ra1-topbar-text:  #ffffff;
  --ra1-topbar-muted: #c3d1bd;   /* 8.4:1 on the topbar */
  --ra1-topbar-hover: rgba(255, 255, 255, 0.10);
  --ra1-topbar-line:  rgba(255, 255, 255, 0.16);
  --ra1-side-bg:      #152911;   /* deep green menu (team choice, 2026-10-09)  */
  --ra1-side-text:    #ffffff;   /* menu text, 15.6:1                           */
  --ra1-side-muted:   #999999;   /* icons, section labels, counts, small text 6.0:1 */
  --ra1-side-hover:   rgba(255, 255, 255, 0.08);
  --ra1-side-line:    rgba(255, 255, 255, 0.10);
  --ra1-canvas:       #e3e7e0;
  --ra1-card-border:  #d3d9cf;
}

/* topbar */
body.ra--v1 .ra-topbar,
body.ra--v1 .ra-app.is-collapsed .ra-topbar {
  left: 0;
  gap: var(--ra-space-3);
  padding: 0 var(--ra-space-4) 0 10px;   /* ☰ centre = menu icon centre (26px) */
  color: var(--ra1-topbar-text);
  background: var(--ra1-topbar-bg);
  border-bottom: 0;
  z-index: 1040;
}
body.ra--v1 .ra-topbar__brand { display: flex; align-items: center; gap: var(--ra-space-3); min-width: 0; }
body.ra--v1 .ra-topbar .ra-brand,
body.ra--v1 .ra-topbar .ra-brand:hover { color: var(--ra1-topbar-text); }
body.ra--v1 .ra-topbar .ra-brand__name { color: var(--ra1-topbar-text); }
body.ra--v1 .ra-topbar .ra-brand__name b { color: var(--ra-brand); }
body.ra--v1 .ra-topbar .ra-brand__by { color: var(--ra1-topbar-muted); }
body.ra--v1 .ra-topbar .ra-brand__pin { color: #ff4d4f; }   /* FTrack red, lifted for the dark bar */
body.ra--v1 .ra-topbar__divider { background: var(--ra1-topbar-line); }

/* .btn-ghost-dark — borderless control ON the dark topbar */
body.ra--v1 .btn-ghost-dark {
  --bs-btn-color: var(--ra1-topbar-text);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--ra1-topbar-text);
  --bs-btn-hover-bg: var(--ra1-topbar-hover);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--ra1-topbar-text);
  --bs-btn-active-bg: var(--ra1-topbar-hover);
  --bs-btn-active-border-color: transparent;
  --bs-btn-font-weight: var(--ra-fw-medium);
  --bs-btn-focus-box-shadow: 0 0 0 2px var(--ra1-topbar-bg), 0 0 0 4px var(--ra-brand);
}
/* icon buttons on the topbar (☰, theme, bell): the generic .ra-iconbtn hover is a
   LIGHT fill — on the dark bar it must stay the translucent topbar hover */
body.ra--v1 .ra-iconbtn.btn.btn-ghost-dark {
  --bs-btn-hover-bg: var(--ra1-topbar-hover);
  --bs-btn-active-bg: var(--ra1-topbar-hover);
  color: var(--ra1-topbar-text);
}
body.ra--v1 .ra-iconbtn.btn.btn-ghost-dark:hover,
body.ra--v1 .ra-iconbtn.btn.btn-ghost-dark:focus-visible,
body.ra--v1 .ra-iconbtn.btn.btn-ghost-dark:active { color: var(--ra1-topbar-text); background: var(--ra1-topbar-hover); }
body.ra--v1 .btn-ghost-dark > .fas,
body.ra--v1 .btn-ghost-dark > .far,
body.ra--v1 .btn-ghost-dark .ra-btn__key { color: var(--ra1-topbar-muted); }
body.ra--v1 .btn-ghost-dark:hover > .fas,
body.ra--v1 .btn-ghost-dark:hover > .far,
body.ra--v1 .btn-ghost-dark.show > .fas,
body.ra--v1 .btn-ghost-dark.show > .far { color: var(--ra1-topbar-text); }
body.ra--v1 .btn-ghost-dark.dropdown-toggle::after { border-color: var(--ra1-topbar-muted); }
body.ra--v1 .ra-topbar .ra-iconbtn__dot { background: #ff4d4f; border-color: var(--ra1-topbar-bg); }
body.ra--v1 .ra-topbar :focus-visible { outline-color: var(--ra-brand); }

/* menu: pale FTrack green, below the topbar */
body.ra--v1 .ra-sidebar,
body.ra--v1 .ra-sidebar.offcanvas-lg { background-color: var(--ra1-side-bg) !important; } /* vendor !imp */
body.ra--v1 .ra-sidebar { border-right: 1px solid var(--ra1-side-line); }
@media (min-width: 992px) {
  body.ra--v1 .ra-sidebar { top: var(--ra1-topbar-h); }
}
body.ra--v1 .ra-nav { padding-top: var(--ra-space-4); }
body.ra.ra--v1 .ra-nav__link:hover { background: var(--ra1-side-hover); }
body.ra.ra--v1 .ra-nav__link.is-active,
body.ra.ra--v1 .ra-nav__link.is-active:hover {
  font-weight: var(--ra-fw-semibold);
  color: #0f1f0a;
  background: var(--ra-brand);
  border-left-color: var(--ra-green-900);
}
body.ra--v1 .ra-nav__link.is-active .ra-nav__icon,
body.ra--v1 .ra-nav__link.is-active .ra-nav__count { color: #0f1f0a; }
body.ra--v1 .ra-sidebar .offcanvas-header { border-bottom-color: var(--ra1-side-line); }

/* page head + cards on the darker canvas */
body.ra--v1 .ra-pagehead .breadcrumb { --bs-breadcrumb-margin-bottom: 6px; }
body.ra--v1 .card { --bs-card-border-color: var(--ra1-card-border); }


/* ---------- V1 · corners: ROUNDED (client decision, 2026-10-07) --------
   Every V1 radius reads these three variables — never hard-code a radius. */
body.ra--v1 {
  --ra1-r-sm: 4px;   /* badges, tooltips, progress, bar ends            */
  --ra1-r:    6px;   /* buttons, inputs, menu items, pagination, alerts */
  --ra1-r-lg: 12px;  /* cards, dropdowns, modals, toasts, popovers — softer (2026-10-09) */
}
body.ra--v1 .ra-avatar,
body.ra--v1 .ra-status__dot,
body.ra--v1 .ra-iconbtn__dot { border-radius: 50%; }
body.ra--v1 .ra-barlist__bar { border-radius: 0 var(--ra1-r-sm) var(--ra1-r-sm) 0; }
body.ra--v1 .ra-tip { border-radius: var(--ra1-r-sm); }
body.ra--v1 .card { overflow: hidden; }   /* rounded cards clip the table header */

/* menu: inset rounded tiles, icons still on the 16px line (☰ centre = 26px) */
body.ra.ra--v1 .ra-nav__link {
  margin: 0 var(--ra-space-2) 2px;
  padding-left: 5px;                 /* 8 margin + 5 + 3 border = 16 */
  border-radius: var(--ra1-r);
  border-left-color: transparent;
}
body.ra.ra--v1 .ra-nav__link.is-active,
body.ra.ra--v1 .ra-nav__link.is-active:hover { border-left-color: transparent; }
body.ra.ra--v1 .ra-app.is-collapsed .ra-nav__link { margin: 0 var(--ra-space-2) 2px; padding: 0 3px 0 0; }


/* ---------- Brand architecture -----------------------------------------
   CLIENT brand (RetailActive) owns the header — wordmark or logo image.
   PLATFORM brand (FTrack) is credited quietly but on every page:
     · .ra-poweredby  — bottom of the left menu (pin only when collapsed)
     · #ra-about      — "About this platform" modal in the account menu
     · sign-in page   — .ra-auth__foot: name in text, version, website (see .ra-auth)
   Never put the FTrack pin or "powered by" in the header.               */
body.ra--v1 .ra-brand__logo { display: block; width: auto; height: 28px; }
body.ra--v1 .ra-topbar .ra-brand__name { font-size: 19px; }

body.ra--v1 .ra-poweredby {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--ra-space-2);
  padding: var(--ra-space-3) var(--ra-space-4);
  border-top: 1px solid var(--ra1-side-line);
  text-decoration: none;
}
body.ra--v1 .ra-poweredby:hover { background: var(--ra1-side-hover); }
body.ra--v1 .ra-poweredby__label {
  font-size: 11px;
  font-weight: var(--ra-fw-medium);
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ra-text-soft);
}
body.ra--v1 .ra-poweredby__logo { width: auto; height: 28px; }
body.ra--v1 .ra-poweredby__mark { display: none; width: auto; height: 24px; }
body.ra--v1 .ra-app.is-collapsed .ra-poweredby { justify-content: center; padding: var(--ra-space-3) 0; }
body.ra--v1 .ra-app.is-collapsed .ra-poweredby__label,
body.ra--v1 .ra-app.is-collapsed .ra-poweredby__logo { display: none; }
body.ra--v1 .ra-app.is-collapsed .ra-poweredby__mark { display: block; }
@media (max-width: 991.98px) {   /* the drawer always shows the full credit */
  body.ra--v1 .ra-app.is-collapsed .ra-poweredby { justify-content: flex-start; padding: var(--ra-space-3) var(--ra-space-4); }
  body.ra--v1 .ra-app.is-collapsed .ra-poweredby__label,
  body.ra--v1 .ra-app.is-collapsed .ra-poweredby__logo { display: block; }
  body.ra--v1 .ra-app.is-collapsed .ra-poweredby__mark { display: none; }
}

/* Bootstrap modal + About content */
body.ra--v1 .modal {
  --bs-modal-padding: 20px;
  --bs-modal-header-padding: 16px 20px;
  --bs-modal-border-color: var(--ra-border);
  --bs-modal-border-radius: var(--ra1-r-lg);
  --bs-modal-inner-border-radius: max(0px, calc(var(--ra1-r-lg) - 1px));
  --bs-modal-header-border-color: var(--ra-border);
  --bs-modal-footer-border-color: var(--ra-border);
  --bs-modal-box-shadow: var(--ra-shadow-pop);
}
body.ra--v1 .modal-backdrop { --bs-backdrop-bg: #0f1a0b; --bs-backdrop-opacity: 0.5; }
body.ra--v1 .modal-title { font-size: var(--ra-fs-md); font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-about__logo { display: block; width: auto; height: 64px; margin: 4px 0 var(--ra-space-4); }
body.ra--v1 .ra-about__lead { margin-bottom: var(--ra-space-4); color: var(--ra-text); }
body.ra--v1 .ra-about__facts { display: grid; grid-template-columns: 96px 1fr; gap: 6px var(--ra-space-3); margin: 0; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-about__facts dt { font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-about__facts dd { margin: 0; color: var(--ra-text); }
body.ra--v1 .ra-about__facts a { color: var(--ra-link); }


/* ---------- Sign-in page: .ra-auth ---------------------------------------
   Three brands, three places — never mixed:
     1. CLIENT        .ra-auth__client   top of the form
     2. RETAILACTIVE  .ra-auth__brand    deep-green panel (slim bar < lg)
     3. FTRACK        .ra-auth__foot     footer: name (text only), version, website
   ┌───────────────┬──────────────────────────────┐
   │ RetailActive  │                        EN ▾  │
   │               │   [N] Northfield Foods       │
   │ Every store   │   Sign in                    │
   │ visit, …      │   [email] [password] [Sign in]│
   │ © RetailActive│  Powered by FTrack · 2.0.1 · … │
   └───────────────┴──────────────────────────────┘
   Contrast: white on panel 13.3:1 · muted on panel 8.4:1 · green 5.4:1  */
body.ra--v1 .ra-auth {
  display: grid;
  grid-template-columns: minmax(360px, 5fr) 7fr;
  min-height: 100vh;
  background: var(--ra-bg-surface);
}
body.ra--v1 .ra-auth__brand {
  display: flex;
  flex-direction: column;
  padding: var(--ra-space-6) 48px;
  color: var(--ra1-topbar-text);
  background:
    radial-gradient(circle at 100% 100%, rgba(106, 183, 69, 0.28) 0, rgba(106, 183, 69, 0) 55%),
    var(--ra1-topbar-bg);
}
body.ra--v1 .ra-auth__brand .ra-brand__name { font-size: 22px; color: var(--ra1-topbar-text); }
body.ra--v1 .ra-auth__brand .ra-brand__logo { height: 32px; }
body.ra--v1 .ra-auth__pitch { margin: auto 0; padding: var(--ra-space-6) 0; max-width: 400px; }
body.ra--v1 .ra-auth__headline {
  margin: 0 0 var(--ra-space-5);
  font-size: 30px;
  font-weight: var(--ra-fw-semibold);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
body.ra--v1 .ra-auth__points { display: grid; gap: var(--ra-space-3); margin: 0; padding: 0; list-style: none; color: var(--ra1-topbar-muted); }
body.ra--v1 .ra-auth__points li { display: flex; align-items: baseline; gap: var(--ra-space-3); }
body.ra--v1 .ra-auth__points .fas { flex: none; font-size: var(--ra-fs-xs); color: var(--ra-brand); }
body.ra--v1 .ra-auth__copy { margin: 0; font-size: var(--ra-fs-xs); color: var(--ra1-topbar-muted); }

body.ra--v1 .ra-auth__main { display: flex; flex-direction: column; min-width: 0; padding: var(--ra-space-4) var(--ra-space-5); }
body.ra--v1 .ra-auth__tools { display: flex; justify-content: flex-end; }
body.ra--v1 .ra-auth__panel { width: 100%; max-width: 380px; margin: auto; padding: var(--ra-space-6) 0; }

/* 1. client */
body.ra--v1 .ra-auth__client { display: flex; align-items: center; gap: var(--ra-space-3); margin-bottom: var(--ra-space-6); }
body.ra--v1 .ra-auth__client-logo { display: block; width: auto; height: 40px; }
body.ra--v1 .ra-auth__client-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: var(--ra-fs-xl);
  font-weight: 700;
  color: var(--ra-bg-surface);
  background: var(--ra-text);
  border-radius: var(--ra1-r-lg);
}
body.ra--v1 .ra-auth__client-name { font-size: var(--ra-fs-lg); font-weight: var(--ra-fw-semibold); letter-spacing: -0.01em; color: var(--ra-text); }

body.ra--v1 .ra-auth__title { margin: 0 0 var(--ra-space-1); font-size: 24px; font-weight: var(--ra-fw-semibold); letter-spacing: -0.01em; color: var(--ra-text-heading); }
body.ra--v1 .ra-auth__lead { margin: 0 0 var(--ra-space-5); color: var(--ra-text-muted); }
body.ra--v1 .ra-auth__lead strong { font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-auth .form-label { margin-bottom: var(--ra-space-1); font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-auth .form-control,
body.ra--v1 .ra-auth .input-group > .btn,
body.ra--v1 .ra-auth form > .btn { height: 40px; }
body.ra--v1 .ra-auth .input-group > .btn { width: 40px; padding: 0; color: var(--ra-text-muted); border-color: var(--ra-border-strong); }
body.ra--v1 .ra-auth__labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ra-space-3); }
body.ra--v1 .ra-auth__labelrow a { font-size: var(--ra-fs-sm); color: var(--ra-link); }
body.ra--v1 .ra-auth__help { margin: var(--ra-space-5) 0 0; font-size: var(--ra-fs-sm); color: var(--ra-text-soft); }
/* single sign-on (signin.html, signin-sso.html):
   .ra-auth__or     "or" line between the password form and the SSO button
   .ra-auth__who    the email the SSO step is for, with "Change"
   .ra-auth__wait   spinner + title while the browser goes to the identity provider
   .ra-auth__facts  provider error code + reference of a failed sign-in
   .ra-auth__preview  the design-preview state switcher above the panel (template only) */
body.ra--v1 .ra-auth__or { display: flex; align-items: center; gap: var(--ra-space-3); margin: var(--ra-space-4) 0; font-size: var(--ra-fs-sm); color: var(--ra-text-soft); }
body.ra--v1 .ra-auth__or::before,
body.ra--v1 .ra-auth__or::after { content: ""; flex: 1; border-top: 1px solid var(--ra-border); }
body.ra--v1 .ra-auth__who { display: flex; align-items: center; justify-content: space-between; gap: var(--ra-space-3); margin-bottom: var(--ra-space-4); padding: 10px 12px; font-size: var(--ra-fs-sm); background: var(--ra-bg-subtle); border-radius: var(--ra1-r); }
body.ra--v1 .ra-auth__whoname { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-auth__wait { text-align: center; }
body.ra--v1 .ra-auth__wait .spinner-border { width: 40px; height: 40px; margin-bottom: var(--ra-space-4); color: var(--ra-primary); }
body.ra--v1 .ra-auth__facts { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--ra-space-3); margin: 0 0 var(--ra-space-4); font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-auth__facts dt { font-weight: var(--ra-fw-regular); color: var(--ra-text-muted); }
body.ra--v1 .ra-auth__facts dd { margin: 0; }
body.ra--v1 .ra-auth__preview { margin-bottom: var(--ra-space-5); }
/* self sign-up (signup.html — a sign-up link from Admin → Users → Sign-up links):
   .ra-auth__panel--wide  a wider panel for the details form
   .ra-signup__step       "Step 2 of 4 · Way in" above the title
   .ra-signup__terms      the privacy terms, in a scrolling box, read before agreeing
   .ra-signup__ways       ways in as radio cards (.btn-check + .ra-signup__way): chosen = fill
   .ra-signup__ai         "From ID card" tag on a field the AI filled
   .ra-signup__otp        the 6-digit code input · .ra-signup__send the "Send code" button
   .ra-signup__tips       photo tips · .ra-signup__done the success head */
body.ra--v1 .ra-auth__panel--wide { max-width: 520px; }
body.ra--v1 .ra-signup__preview { flex-wrap: wrap; }
body.ra--v1 .ra-signup__step { margin: 0 0 var(--ra-space-2); font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-primary-text); text-transform: uppercase; letter-spacing: .04em; }
body.ra--v1 .ra-signup__terms { max-height: 260px; margin-bottom: var(--ra-space-4); padding: var(--ra-space-3) var(--ra-space-4); overflow-y: auto; font-size: var(--ra-fs-sm); background: var(--ra-bg-subtle); border: 1px solid var(--ra-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-signup__terms h2 { margin: 0 0 var(--ra-space-2); font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-semibold); color: var(--ra-text-heading); }
body.ra--v1 .ra-signup__terms h3 { margin: var(--ra-space-3) 0 2px; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-signup__terms p { margin: 0; color: var(--ra-text-muted); }
body.ra--v1 .ra-signup__terms a { color: var(--ra-link); }
body.ra--v1 .ra-signup__ways { display: grid; gap: var(--ra-space-2); margin: 0; padding: 0; border: 0; }
body.ra--v1 .ra-signup__way { display: flex; align-items: flex-start; gap: var(--ra-space-3); padding: 12px 14px; cursor: pointer; border: 1px solid var(--ra-border-strong); border-radius: var(--ra1-r); }
body.ra--v1 .ra-signup__way:hover { background: var(--ra-bg-subtle); }
body.ra--v1 .btn-check:checked + .ra-signup__way { background: var(--ra-green-100); border-color: var(--ra-brand); }
body.ra--v1 .btn-check:focus-visible + .ra-signup__way { outline: 2px solid var(--ra-focus); outline-offset: 2px; }
body.ra--v1 .ra-signup__wayicon { flex: none; width: 20px; margin-top: 3px; text-align: center; color: var(--ra-text-muted); }
body.ra--v1 .btn-check:checked + .ra-signup__way .ra-signup__wayicon { color: var(--ra-active-text); }
body.ra--v1 .ra-signup__wayname { display: block; font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-signup__waysub { display: block; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-signup__label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ra-space-2); }
body.ra--v1 .ra-signup__ai { flex: none; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-regular); color: var(--ra-text-soft); }
body.ra--v1 .ra-signup__ai i { margin-right: 4px; }
body.ra--v1 .ra-auth .input-group > .ra-signup__send { width: auto; padding: 0 var(--ra-space-3); color: var(--ra-text); }
body.ra--v1 .ra-signup__otp { font-family: var(--bs-font-monospace); font-size: 20px; letter-spacing: .5em; text-align: center; }
body.ra--v1 .ra-signup__tips { display: grid; gap: 4px; margin: 0; padding: 0; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); list-style: none; }
body.ra--v1 .ra-signup__tips i { margin-right: var(--ra-space-2); font-size: var(--ra-fs-xs); color: var(--ra-brand); }
body.ra--v1 .ra-signup__done { text-align: center; }
body.ra--v1 .ra-signup__doneicon { margin-bottom: var(--ra-space-3); font-size: 44px; color: var(--ra-brand); }

/* 3. platform */
body.ra--v1 .ra-auth__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ra-space-2) var(--ra-space-5);
  padding-top: var(--ra-space-3);
  font-size: var(--ra-fs-xs);
  color: var(--ra-text-soft);
  border-top: 1px solid var(--ra1-card-border);
}
body.ra--v1 .ra-auth__powered { color: var(--ra-text-soft); text-decoration: none; }   /* text only — no logo on the sign-in page */
body.ra--v1 .ra-auth__powered strong { font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-auth__powered:hover strong { text-decoration: underline; }
body.ra--v1 .ra-auth__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-1) var(--ra-space-4); margin: 0; padding: 0; list-style: none; }
body.ra--v1 .ra-auth__meta a { color: var(--ra-link); text-decoration: none; }
body.ra--v1 .ra-auth__meta a:hover { text-decoration: underline; }

@media (max-width: 991.98px) {   /* brand panel → slim bar; client logo stays on the form */
  body.ra--v1 .ra-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  body.ra--v1 .ra-auth__brand { flex-direction: row; align-items: center; height: 56px; padding: 0 var(--ra-space-4); background: var(--ra1-topbar-bg); }
  body.ra--v1 .ra-auth__brand .ra-brand__name { font-size: 19px; }
  body.ra--v1 .ra-auth__pitch,
  body.ra--v1 .ra-auth__copy { display: none; }
  body.ra--v1 .ra-auth__main { padding: var(--ra-space-3) var(--ra-space-4) var(--ra-space-4); }
  body.ra--v1 .ra-auth__panel { padding: var(--ra-space-5) 0; }
}

/* ---------- Status pages: .ra-syspage (404 · 500 · maintenance · success) -----------
   The sign-in frame (.ra-auth) + two moving parts, CSS / inline SVG only (no JS):
     · .ra-syspage__map — on the green panel: drifting map dots, trails, pinging stores (lg+)
     · .ra-syspage__art — above the title: the page's SVG (404 pin, 500 bolt, gears, success check)
   <div class="ra-auth ra-syspage"> … <aside class="ra-auth__brand"> logo · .ra-syspage__map ·
   .ra-auth__pitch (headline + .ra-syspage__note) · copy </aside> …
   <div class="ra-auth__panel"> .ra-syspage__art · title · lead · buttons · help </div>
   SVG parts are classed (fills / strokes from tokens), digits use font-size in the SVG
   (scales with the drawing). Motion stops with prefers-reduced-motion.  */
body.ra--v1 .ra-syspage .ra-auth__brand { position: relative; overflow: hidden; isolation: isolate; }
body.ra--v1 .ra-syspage__note { margin: 0; color: var(--ra1-topbar-muted); }
body.ra--v1 .ra-syspage__map {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, rgba(255, 255, 255, 0) 1.5px);
  background-size: 24px 24px;
  animation: ra-syspage-drift 60s linear infinite;
}
body.ra--v1 .ra-syspage__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
body.ra--v1 .ra-syspage__trail {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
  animation: ra-syspage-dash 2.4s linear infinite;
}
body.ra--v1 .ra-syspage__ping {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--ra-brand);
  border: 2px solid var(--ra1-topbar-text);
  border-radius: 50%;
  animation: ra-syspage-ping 2.8s var(--ra-ease) infinite;
}
body.ra--v1 .ra-syspage__ping:nth-of-type(1) { left: 18%; top: 34%; }
body.ra--v1 .ra-syspage__ping:nth-of-type(2) { left: 64%; top: 22%; animation-delay: 0.7s; }
body.ra--v1 .ra-syspage__ping:nth-of-type(3) { left: 78%; top: 58%; animation-delay: 1.4s; }
body.ra--v1 .ra-syspage__ping:nth-of-type(4) { left: 30%; top: 74%; animation-delay: 2.1s; }

body.ra--v1 .ra-syspage__art { margin-bottom: var(--ra-space-4); }
body.ra--v1 .ra-syspage__art svg { display: block; width: 100%; max-width: 320px; height: auto; overflow: visible; }
body.ra--v1 .ra-syspage__digit { font-family: var(--ra-font-sans); font-weight: 700; letter-spacing: -0.04em; fill: var(--ra-text-heading); }
body.ra--v1 .ra-syspage__route {
  fill: none;
  stroke: var(--ra-brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
  animation: ra-syspage-dash 1.6s linear infinite;
}
body.ra--v1 .ra-syspage__stop { fill: var(--ra-bg-surface); stroke: var(--ra-brand); stroke-width: 3; }
body.ra--v1 .ra-syspage__pin { fill: var(--ra-brand); }
body.ra--v1 .ra-syspage__pin-dot { fill: var(--ra-bg-surface); }
body.ra--v1 .ra-syspage__shackle { fill: none; stroke: var(--ra-text-heading); stroke-width: 6; stroke-linecap: round; }
body.ra--v1 .ra-syspage__bob { animation: ra-syspage-bob 2.4s var(--ra-ease) infinite; }
body.ra--v1 .ra-syspage__shadow {
  fill: var(--ra-border-strong);
  transform-box: fill-box;
  transform-origin: center;
  animation: ra-syspage-shadow 2.4s var(--ra-ease) infinite;
}
body.ra--v1 .ra-syspage__shake { transform-box: fill-box; transform-origin: center; animation: ra-syspage-shake 3s ease-in-out infinite; }
body.ra--v1 .ra-syspage__bolt { fill: var(--ra-warning); animation: ra-syspage-flicker 3s steps(1) infinite; }
body.ra--v1 .ra-syspage__spark {
  fill: var(--ra-warning);
  transform-box: fill-box;
  transform-origin: center;
  animation: ra-syspage-spark 1.2s ease-out infinite;
}
body.ra--v1 .ra-syspage__spark:nth-of-type(2) { animation-delay: 0.4s; }
body.ra--v1 .ra-syspage__spark:nth-of-type(3) { animation-delay: 0.8s; }
body.ra--v1 .ra-syspage__gear { color: var(--ra-brand); transform-box: fill-box; transform-origin: center; animation: ra-syspage-spin 8s linear infinite; }
body.ra--v1 .ra-syspage__gear--small { color: var(--ra-text-soft); animation-duration: 5.2s; animation-direction: reverse; }
body.ra--v1 .ra-syspage__teeth { fill: none; stroke: currentColor; }
body.ra--v1 .ra-syspage__hub { fill: currentColor; }
body.ra--v1 .ra-syspage__hole { fill: var(--ra-bg-surface); }
body.ra--v1 .ra-syspage__track { fill: var(--ra-bg-subtle); }
body.ra--v1 .ra-syspage__bar {
  fill: var(--ra-brand);
  transform-box: fill-box;
  transform-origin: left center;
  animation: ra-syspage-load 3.2s var(--ra-ease) infinite alternate;
}
/* success: the badge pops in, the check draws once (end state = no animation), a halo pulses */
body.ra--v1 .ra-syspage__badge {
  fill: var(--ra-brand);
  transform-box: fill-box;
  transform-origin: center;
  animation: ra-syspage-pop 0.5s var(--ra-ease) both;
}
body.ra--v1 .ra-syspage__check {
  fill: none;
  stroke: var(--ra-bg-surface);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  animation: ra-syspage-draw 0.5s 0.35s var(--ra-ease) both;
}
body.ra--v1 .ra-syspage__halo {
  fill: none;
  stroke: var(--ra-brand);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: ra-syspage-halo 2.4s 0.8s ease-out infinite;
}
body.ra--v1 .ra-syspage__dot {
  fill: var(--ra-brand);
  transform-box: fill-box;
  transform-origin: center;
  animation: ra-syspage-twinkle 2.4s ease-in-out infinite;
}
body.ra--v1 .ra-syspage__dot:nth-of-type(odd) { fill: var(--ra-text-soft); }
body.ra--v1 .ra-syspage__dot:nth-of-type(2) { animation-delay: 0.6s; }
body.ra--v1 .ra-syspage__dot:nth-of-type(3) { animation-delay: 1.2s; }
body.ra--v1 .ra-syspage__dot:nth-of-type(4) { animation-delay: 1.8s; }

@keyframes ra-syspage-drift { to { background-position: 240px 120px; } }
@keyframes ra-syspage-dash { to { stroke-dashoffset: -24; } }
@keyframes ra-syspage-ping {
  0% { box-shadow: 0 0 0 0 rgba(106, 183, 69, 0.6); }
  80%, 100% { box-shadow: 0 0 0 20px rgba(106, 183, 69, 0); }
}
@keyframes ra-syspage-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ra-syspage-shadow { 50% { transform: scale(0.6); opacity: 0.5; } }
@keyframes ra-syspage-shake {
  0%, 70%, 100% { transform: rotate(0); }
  74% { transform: rotate(-8deg); }
  78% { transform: rotate(6deg); }
  82% { transform: rotate(-4deg); }
  86% { transform: rotate(0); }
}
@keyframes ra-syspage-flicker { 0%, 70% { opacity: 1; } 72% { opacity: 0.2; } 74% { opacity: 1; } 76% { opacity: 0.3; } 80%, 100% { opacity: 1; } }
@keyframes ra-syspage-spark { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes ra-syspage-spin { to { transform: rotate(360deg); } }
@keyframes ra-syspage-load { from { transform: scaleX(0.15); } to { transform: scaleX(1); } }
@keyframes ra-syspage-pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ra-syspage-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ra-syspage-halo { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes ra-syspage-twinkle { 0%, 100% { transform: scale(0.6); opacity: 0.4; } 50% { transform: scale(1.2); opacity: 1; } }

/* .ra-result — in-app result view (menu + topbar stay): the status-page drawing on a card in .ra-content
   <section class="card ra-result"><div class="card-body"> .ra-syspage__art · __title · __lead ·
   __facts (dl: what was saved) · __actions (ONE primary) · __help </div></section> */
body.ra--v1 .ra-result { max-width: 600px; margin: var(--ra-space-5) auto; text-align: center; }
body.ra--v1 .ra-result .card-body { padding: var(--ra-space-6) var(--ra-space-5); }
body.ra--v1 .ra-result .ra-syspage__art svg { max-width: 260px; margin-inline: auto; }
body.ra--v1 .ra-result__title { margin: 0 0 var(--ra-space-2); font-size: var(--ra-fs-xl); font-weight: var(--ra-fw-semibold); color: var(--ra-text-heading); }
body.ra--v1 .ra-result__lead { margin: 0 0 var(--ra-space-4); color: var(--ra-text-muted); }
body.ra--v1 .ra-result__facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px var(--ra-space-4);
  margin: 0 0 var(--ra-space-5);
  padding: var(--ra-space-3) var(--ra-space-4);
  border-radius: var(--ra-radius);
  background: var(--ra-bg-subtle);
  font-size: var(--ra-fs-sm);
  text-align: left;
}
body.ra--v1 .ra-result__facts dt { font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-result__facts dd { margin: 0; color: var(--ra-text); }
body.ra--v1 .ra-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ra-space-2); }
body.ra--v1 .ra-result__help { margin: var(--ra-space-4) 0 0; font-size: var(--ra-fs-sm); color: var(--ra-text-soft); }

/* Email template preview (Admin → Email template): subject / when above, the email in an iframe —
   the email keeps its own light colours (inline CSS), so the frame stays light in dark mode too */
body.ra--v1 .ra-emailmeta { display: grid; grid-template-columns: max-content 1fr; gap: var(--ra-space-1) var(--ra-space-4); margin: 0 0 var(--ra-space-4); }
body.ra--v1 .ra-emailmeta dt { font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-emailmeta dd { margin: 0; color: var(--ra-text); }
body.ra--v1 .ra-emailframe { display: block; width: 100%; height: calc(100vh - 280px); min-height: 560px; border: 1px solid var(--ra-border); border-radius: var(--ra1-r-lg); background: #f4f5f3; }

@media (max-width: 991.98px) {   /* green panel is a slim bar: no map */
  body.ra--v1 .ra-syspage__map { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.ra--v1 .ra-syspage .ra-syspage__map,
  body.ra--v1 .ra-syspage [class*="ra-syspage__"],
  body.ra--v1 .ra-result [class*="ra-syspage__"] { animation: none; }
}


/* ---------- Wide tables: .ra-tablewrap ---------------------------------
   Tells users a table continues off-screen. Four cues, all automatic:
     · edge shadow on the side that has more content
     · ‹ › buttons at header height, only when that direction can scroll
     · optional sticky first column (.ra-table-sticky) keeps row context
     · always-visible thin scrollbar (macOS hides it otherwise)
   Markup:
   <div class="ra-tablewrap" data-ra-tablewrap>
     <button class="ra-tablewrap__btn ra-tablewrap__btn--left"  data-ra-scroll="left"  …>
     <button class="ra-tablewrap__btn ra-tablewrap__btn--right" data-ra-scroll="right" …>
     <div class="table-responsive" tabindex="0" role="region" aria-label="… (scrolls horizontally)">
       <table class="table ra-table-sticky"> … </table>
   JS (aisle-main.js) toggles .is-overflowing / .can-left / .can-right. */
body.ra--v1 .ra-tablewrap { position: relative; }
body.ra--v1 .ra-tablewrap > .table-responsive {
  scrollbar-width: thin;
  scrollbar-color: var(--ra-border-strong) var(--ra-bg-subtle);
}
body.ra--v1 .ra-tablewrap > .table-responsive::-webkit-scrollbar { height: 10px; }
body.ra--v1 .ra-tablewrap > .table-responsive::-webkit-scrollbar-track { background: var(--ra-bg-subtle); }
body.ra--v1 .ra-tablewrap > .table-responsive::-webkit-scrollbar-thumb {
  background: var(--ra-border-strong);
  border: 2px solid var(--ra-bg-subtle);
  border-radius: 10px;
}
body.ra--v1 .ra-tablewrap > .table-responsive:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: -2px; }
body.ra--v1 .ra-tablewrap .table { white-space: nowrap; }
body.ra--v1 .ra-num { font-variant-numeric: tabular-nums; }

/* edge shadows */
body.ra--v1 .ra-tablewrap::before,
body.ra--v1 .ra-tablewrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 10px;            /* stop above the scrollbar */
  z-index: 3;
  width: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--ra-dur) var(--ra-ease);
}
body.ra--v1 .ra-tablewrap::before { left: 0;  background: linear-gradient(to right, rgba(22, 25, 29, 0.16), rgba(22, 25, 29, 0)); }
body.ra--v1 .ra-tablewrap::after  { right: 0; background: linear-gradient(to left,  rgba(22, 25, 29, 0.16), rgba(22, 25, 29, 0)); }
body.ra--v1 .ra-tablewrap.can-left::before,
body.ra--v1 .ra-tablewrap.can-right::after { opacity: 1; }

/* sticky first column — the left shadow moves to its edge */
body.ra--v1 .ra-table-sticky > :not(caption) > tr > :first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: var(--ra-bg-surface);
}
/* the 200px floor comes from body cells only, and not from a cell that opens with a control or a picture (checkbox,
   thumb, avatar — bare or in a link): such a column is as wide as its content, header included.
   :has() stays on the cell — on the table it restyles every cell on each row change (≈100× slower appends) */
body.ra--v1 .ra-table-sticky > tbody > tr > :first-child:not(.ra-table__check, :has(> :is(input, .form-check, .toggle-switch, img, picture, svg, .ra-thumb, .ra-avatar), > :is(a, button) > :is(img, picture, svg, .ra-thumb, .ra-avatar))) { min-width: 200px; }
/* a menu opened in the first column: its cell goes above the next rows' sticky cells (each has its own z-index),
   the edge shadows (3) and the scroll buttons (4) */
body.ra--v1 .ra-table-sticky > :not(caption) > tr > :first-child:has(> .dropdown > .dropdown-menu.show, > .dropdown-menu.show) { z-index: 5; }
body.ra--v1 .ra-table-sticky > thead > tr > :first-child { background-color: var(--ra-bg-subtle); }
body.ra--v1 .ra-table-sticky.ra-table--chart > thead > tr > :first-child { background-color: var(--ra1-table-head-chart); }
body.ra--v1 .ra-table-sticky > :not(caption) > tr > :first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: -14px;
  bottom: 0;
  width: 14px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(22, 25, 29, 0.14), rgba(22, 25, 29, 0));
  opacity: 0;
  transition: opacity var(--ra-dur) var(--ra-ease);
}
body.ra--v1 .ra-tablewrap.can-left .ra-table-sticky > :not(caption) > tr > :first-child::after { opacity: 1; }
body.ra--v1 .ra-tablewrap.has-sticky::before { display: none; }

/* ‹ › scroll buttons, at header-row height */
body.ra--v1 .ra-tablewrap__btn {
  position: absolute;
  top: min(150px, calc(50% - 15px));   /* centred, at most 150px down, never below a short table */
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 12px;
  color: var(--ra-text);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border-strong);
  border-radius: 50%;
  box-shadow: var(--ra-shadow-pop);
  cursor: pointer;
}
body.ra--v1 .ra-tablewrap__btn:hover { background: var(--ra-green-050); border-color: var(--ra-primary-text); }
body.ra--v1 .ra-tablewrap__btn--left  { left: 8px; }
body.ra--v1 .ra-tablewrap__btn--right { right: 8px; }
body.ra--v1 .ra-tablewrap.has-sticky .ra-tablewrap__btn--left { left: 208px; }
body.ra--v1 .ra-tablewrap.can-left  .ra-tablewrap__btn--left,
body.ra--v1 .ra-tablewrap.can-right .ra-tablewrap__btn--right { display: inline-flex; }
@media (max-width: 575.98px) {
  body.ra--v1 .ra-table-sticky > :not(caption) > tr > :first-child { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  body.ra--v1 .ra-table-sticky > tbody > tr > :first-child:not(.ra-table__check, :has(> :is(input, .form-check, .toggle-switch, img, picture, svg, .ra-thumb, .ra-avatar), > :is(a, button) > :is(img, picture, svg, .ra-thumb, .ra-avatar))) { min-width: 150px; }
  body.ra--v1 .ra-tablewrap.has-sticky .ra-tablewrap__btn--left { left: 158px; }
}
/* the sticky column can be wider than 200px (.ra-table--grid: 30 % of the table): the ‹ button follows its real
   right edge, so it never covers the frozen column. Browsers without anchor positioning keep the fixed offsets above */
@supports (anchor-name: --a) {
  body.ra--v1 .ra-tablewrap { anchor-scope: --ra-sticky-col; }
  body.ra--v1 .ra-table-sticky > thead > tr > :first-child { anchor-name: --ra-sticky-col; }
  body.ra--v1 .ra-tablewrap.has-sticky .ra-tablewrap__btn--left { position-anchor: --ra-sticky-col; left: calc(anchor(right, 200px) + 8px); }
}
@media (prefers-reduced-motion: reduce) {
  body.ra--v1 .ra-tablewrap::before, body.ra--v1 .ra-tablewrap::after { transition: none; }
}


/* ---------- Bootstrap components, themed (full set) ---------------------
   Every component in the Design guideline reads the same tokens: text
   colours, the three greens, --ra1-r* corners, no blue anywhere.        */

/* Accordion */
body.ra--v1 .accordion {
  --bs-accordion-color: var(--ra-text);
  --bs-accordion-border-color: var(--ra1-card-border);
  --bs-accordion-border-radius: var(--ra1-r-lg);
  --bs-accordion-inner-border-radius: max(0px, calc(var(--ra1-r-lg) - 1px));
  --bs-accordion-btn-padding-x: 20px;
  --bs-accordion-btn-padding-y: 14px;
  --bs-accordion-btn-color: var(--ra-text);
  --bs-accordion-btn-focus-border-color: var(--ra-focus);
  --bs-accordion-btn-focus-box-shadow: inset 0 0 0 2px var(--ra-focus);
  --bs-accordion-body-padding-x: 20px;
  --bs-accordion-active-color: var(--ra-active-text);
  --bs-accordion-active-bg: var(--ra-green-050);
}
body.ra--v1 .accordion-button { font-weight: var(--ra-fw-medium); font-size: var(--ra-fs-base); }

/* Alerts — quiet: tinted surface + coloured left edge + icon. No "info" blue:
   .alert-info is restyled neutral. */
body.ra--v1 .alert {
  --bs-alert-padding-x: 16px;
  --bs-alert-padding-y: 12px;
  --bs-alert-border-radius: var(--ra1-r);
  display: flex;
  gap: var(--ra-space-3);
  align-items: flex-start;
  font-size: var(--ra-fs-base);
  border-left-width: 3px;
}
body.ra--v1 .alert > .fas, body.ra--v1 .alert > .far { margin-top: 3px; }
body.ra--v1 .alert-success { --bs-alert-color: var(--ra-active-text); --bs-alert-bg: var(--ra-green-050); --bs-alert-border-color: var(--ra-green-300); border-left-color: var(--ra-brand); }
body.ra--v1 .alert-warning { --bs-alert-color: #6b5000; --bs-alert-bg: #fffaeb; --bs-alert-border-color: #ffe08a; border-left-color: var(--ra-warning); }
body.ra--v1 .alert-danger  { --bs-alert-color: var(--ra-danger-text); --bs-alert-bg: #fdeded; --bs-alert-border-color: #f7b6b8; border-left-color: var(--ra-danger); }
body.ra--v1 .alert-info,
body.ra--v1 .alert-secondary { --bs-alert-color: var(--ra-text); --bs-alert-bg: var(--ra-bg-subtle); --bs-alert-border-color: var(--ra-border); border-left-color: var(--ra-text-muted); }
body.ra--v1 .alert .alert-link { color: inherit; }

/* Badges — utility colours that pass AA */
body.ra--v1 .text-bg-success,
body.ra--v1 .text-bg-primary { color: #fff !important; background-color: var(--ra-primary-text) !important; } /* vendor !imp */
body.ra--v1 .text-bg-brand   { color: var(--ra-primary-on); background-color: var(--ra-brand); }
body.ra--v1 .text-bg-warning { color: #16191d !important; } /* vendor !imp */
body.ra--v1 .text-bg-secondary,
body.ra--v1 .text-bg-info,
body.ra--v1 .text-bg-light   { color: var(--ra-text) !important; background-color: #cfd5ca !important; } /* vendor !imp — no blue; visible on white and on the canvas */

/* Button group */
body.ra--v1 .btn-group > .btn-outline-secondary.active,
body.ra--v1 .btn-check:checked + .btn-outline-secondary {
  color: var(--ra-active-text);
  background: var(--ra-green-100);
  border-color: var(--ra-primary-text);
}

/* List group */
body.ra--v1 .list-group {
  --bs-list-group-color: var(--ra-text);
  --bs-list-group-border-color: var(--ra1-card-border);
  --bs-list-group-border-radius: var(--ra1-r-lg);
  --bs-list-group-item-padding-x: 16px;
  --bs-list-group-item-padding-y: 10px;
  --bs-list-group-action-color: var(--ra-text);
  --bs-list-group-action-hover-color: var(--ra-text);
  --bs-list-group-action-hover-bg: var(--ra1-nav-hover);
  --bs-list-group-active-color: var(--ra-active-text);
  --bs-list-group-active-bg: var(--ra-green-100);
  --bs-list-group-active-border-color: var(--ra1-card-border);
}
body.ra--v1 .list-group-item.active { font-weight: var(--ra-fw-semibold); }

/* Navs & tabs — tabs are underlined, pills are brand-filled */
body.ra--v1 .nav {
  --bs-nav-link-color: var(--ra-text-muted);
  --bs-nav-link-hover-color: var(--ra-text);
  --bs-nav-link-font-weight: var(--ra-fw-medium);
  --bs-nav-link-padding-x: 14px;
  --bs-nav-link-padding-y: 10px;
}
body.ra--v1 .nav-link { font-size: var(--ra-fs-base); }
body.ra--v1 .nav-link:focus-visible { box-shadow: none; outline: 2px solid var(--ra-focus); outline-offset: -2px; }
body.ra--v1 .nav-tabs {
  --bs-nav-tabs-border-color: var(--ra1-card-border);
  --bs-nav-tabs-border-radius: 0;
  --bs-nav-tabs-link-hover-border-color: transparent;
  --bs-nav-tabs-link-active-color: var(--ra-text);
  --bs-nav-tabs-link-active-bg: transparent;
  --bs-nav-tabs-link-active-border-color: transparent;
  gap: var(--ra-space-1);
}
body.ra--v1 .nav-tabs .nav-link { margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; }
body.ra--v1 .nav-tabs .nav-link:hover { border-bottom-color: var(--ra-border); }
body.ra--v1 .nav-tabs .nav-link.active { font-weight: var(--ra-fw-semibold); border-bottom-color: var(--ra-brand); }
body.ra--v1 .nav-pills {
  --bs-nav-pills-border-radius: var(--ra1-r);
  --bs-nav-pills-link-active-color: var(--ra-primary-on);
  --bs-nav-pills-link-active-bg: var(--ra-brand);
}
body.ra--v1 .nav-pills .nav-link.active { font-weight: var(--ra-fw-semibold); }

/* Navbar (in-page) on the topbar colours */
body.ra--v1 .navbar.ra-navbar {
  --bs-navbar-color: var(--ra1-topbar-muted);
  --bs-navbar-hover-color: var(--ra1-topbar-text);
  --bs-navbar-active-color: var(--ra1-topbar-text);
  --bs-navbar-brand-color: var(--ra1-topbar-text);
  --bs-navbar-brand-hover-color: var(--ra1-topbar-text);
  --bs-navbar-toggler-border-color: var(--ra1-topbar-line);
  background: var(--ra1-topbar-bg);
}
body.ra--v1 .navbar.ra-navbar .nav-link.active { box-shadow: inset 0 -2px 0 var(--ra-brand); }

/* Pagination */
body.ra--v1 .pagination {
  --bs-pagination-color: var(--ra-text);
  --bs-pagination-font-size: var(--ra-fs-base);
  --bs-pagination-border-color: var(--ra1-card-border);
  --bs-pagination-border-radius: var(--ra1-r);
  --bs-pagination-hover-color: var(--ra-text);
  --bs-pagination-hover-bg: var(--ra1-nav-hover);
  --bs-pagination-hover-border-color: var(--ra1-card-border);
  --bs-pagination-focus-color: var(--ra-text);
  --bs-pagination-focus-bg: var(--ra1-nav-hover);
  --bs-pagination-focus-box-shadow: 0 0 0 2px var(--ra-focus);
  --bs-pagination-active-color: var(--ra-primary-on);
  --bs-pagination-active-bg: var(--ra-brand);
  --bs-pagination-active-border-color: var(--ra-brand);
  --bs-pagination-disabled-color: var(--ra-text-soft);
  --bs-pagination-disabled-border-color: var(--ra1-card-border);
}
body.ra--v1 .page-item.active .page-link { font-weight: var(--ra-fw-semibold); }

/* Progress */
body.ra--v1 .progress {
  --bs-progress-height: 8px;
  --bs-progress-bg: #e2e5e0;
  --bs-progress-border-radius: var(--ra1-r-sm);
  --bs-progress-bar-bg: var(--ra-brand);
}

/* Spinners inherit currentColor: use .text-success (deep green) */
body.ra--v1 .spinner-border, body.ra--v1 .spinner-grow { --bs-spinner-width: 1.5rem; --bs-spinner-height: 1.5rem; }

/* Toasts */
body.ra--v1 .toast {
  --bs-toast-border-color: var(--ra1-card-border);
  --bs-toast-border-radius: var(--ra1-r-lg);
  --bs-toast-header-color: var(--ra-text);
  --bs-toast-header-bg: var(--ra-bg-surface);
  --bs-toast-header-border-color: var(--ra1-card-border);
  --bs-toast-box-shadow: var(--ra-shadow-pop);
  --bs-toast-font-size: var(--ra-fs-base);
}
body.ra--v1 .toast-container { z-index: 1090; }

/* Tooltips & popovers */
body.ra--v1 .tooltip {
  --bs-tooltip-bg: var(--ra-text);
  --bs-tooltip-color: #fff;
  --bs-tooltip-font-size: var(--ra-fs-sm);
  --bs-tooltip-border-radius: var(--ra1-r-sm);
  --bs-tooltip-opacity: 1;
}
body.ra--v1 .popover {
  --bs-popover-font-size: var(--ra-fs-base);
  --bs-popover-border-color: var(--ra1-card-border);
  --bs-popover-border-radius: var(--ra1-r-lg);
  --bs-popover-inner-border-radius: max(0px, calc(var(--ra1-r-lg) - 1px));
  --bs-popover-box-shadow: var(--ra-shadow-pop);
  --bs-popover-header-bg: var(--ra-bg-subtle);
  --bs-popover-header-color: var(--ra-text);
  --bs-popover-header-font-size: var(--ra-fs-base);
  --bs-popover-body-color: var(--ra-text);
}
body.ra--v1 .popover-header { font-weight: var(--ra-fw-semibold); }

/* Carousel — slides are content panels, indicators in the brand green */
body.ra--v1 .carousel-indicators [data-bs-target] { width: 24px; height: 4px; background-color: var(--ra-text-soft); opacity: .5; }
body.ra--v1 .carousel-indicators .active { background-color: var(--ra-brand); opacity: 1; }
body.ra--v1 .carousel-control-prev-icon,
body.ra--v1 .carousel-control-next-icon { filter: invert(1) grayscale(1) brightness(.2); }

/* Offcanvas (generic, not the menu) */
body.ra--v1 .offcanvas:not(.ra-sidebar) {
  --bs-offcanvas-border-color: var(--ra1-card-border);
  --bs-offcanvas-padding-x: 20px;
  --bs-offcanvas-padding-y: 16px;
}
body.ra--v1 .offcanvas-title { font-size: var(--ra-fs-md); font-weight: var(--ra-fw-semibold); }

/* Form labels & help */
body.ra--v1 .form-label { margin-bottom: 6px; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .form-text { font-size: var(--ra-fs-sm); color: var(--ra-text-soft); }
body.ra--v1 .form-control, body.ra--v1 .form-select { font-size: var(--ra-fs-base); min-height: 36px; }


/* Danger button: the palette's danger red (white text 6.2:1) */
body.ra--v1 .btn-danger {
  --bs-btn-bg: var(--ra-danger-text);
  --bs-btn-border-color: var(--ra-danger-text);
  --bs-btn-hover-bg: #a30f14;
  --bs-btn-hover-border-color: #a30f14;
  --bs-btn-active-bg: #8c0c10;
  --bs-btn-active-border-color: #8c0c10;
  --bs-btn-disabled-bg: var(--ra-danger-text);
  --bs-btn-disabled-border-color: var(--ra-danger-text);
}
body.ra--v1 .text-danger { color: var(--ra-danger-text) !important; } /* vendor !imp */

/* ---------- Design guideline pages (.ra-doc-*) ------------------------- */
body.ra--v1 .ra-doc-hide,
body.ra--v1 [aria-expanded="true"] > .ra-doc-show { display: none; }
body.ra--v1 [aria-expanded="true"] > .ra-doc-hide { display: inline; }
body.ra--v1 .ra-doc-tabs { margin: 0 var(--ra-space-5) var(--ra-space-4); }
body.ra--v1 .ra-doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ra-space-4); }
@media (min-width: 1200px) {
  body.ra--v1 .ra-doc--toc { grid-template-columns: minmax(0, 1fr) 220px; align-items: start; }
}
body.ra--v1 .ra-doc__toc { position: sticky; top: calc(var(--ra1-topbar-h) + 16px); max-height: calc(100vh - 96px); overflow-y: auto; }
body.ra--v1 .ra-doc__toc .list-group-item { padding: 6px 12px; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-doc-section { scroll-margin-top: calc(var(--ra1-topbar-h) + 16px); }
body.ra--v1 .ra-doc-section > .card-body > h2,
body.ra--v1 .ra-doc-h2 { margin: 0 0 4px; font-size: 18px; font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-doc-h3 { margin: var(--ra-space-5) 0 var(--ra-space-2); font-size: 15px; font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-doc-lead { margin: 0 0 var(--ra-space-4); color: var(--ra-text-muted); }
body.ra--v1 .ra-doc-rules { margin: 0 0 var(--ra-space-4); padding-left: 18px; color: var(--ra-text); }
body.ra--v1 .ra-doc-rules li { margin-bottom: 4px; }
body.ra--v1 .ra-doc-rules li::marker { color: var(--ra-primary-text); }
body.ra--v1 .ra-doc-demo {
  padding: var(--ra-space-5);
  background: var(--ra1-canvas);
  border: 1px solid var(--ra1-card-border);
  border-radius: var(--ra1-r);
}
body.ra--v1 .ra-doc-demo--white { background: var(--ra-bg-surface); }
body.ra--v1 .ra-doc-demo > :last-child { margin-bottom: 0; }
body.ra--v1 .ra-doc-codebar { display: flex; justify-content: flex-end; margin-top: var(--ra-space-2); }
body.ra--v1 .ra-doc-code {
  margin: var(--ra-space-2) 0 0;
  padding: var(--ra-space-4);
  max-height: 360px;
  overflow: auto;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #e8efe4;
  background: #16211a;
  border-radius: var(--ra1-r);
  white-space: pre;
}
body.ra--v1 code:not(.ra-doc-code code) {
  padding: 1px 5px;
  font-size: 0.9em;
  color: var(--ra-active-text);
  background: var(--ra-green-050);
  border-radius: var(--ra1-r-sm);
}
body.ra--v1 .ra-doc-table { margin: 0; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-tablewrap .ra-doc-table { white-space: normal; }   /* prose tables wrap; data tables stay on one line */
body.ra--v1 .ra-doc-table th, body.ra--v1 .ra-doc-table td:first-child { white-space: nowrap; }
body.ra--v1 .ra-doc-table td, body.ra--v1 .ra-doc-table th { vertical-align: middle; }
body.ra--v1 .ra-doc-do, body.ra--v1 .ra-doc-dont {
  height: 100%;
  padding: var(--ra-space-4);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra1-card-border);
  border-top: 3px solid var(--ra-brand);
  border-radius: var(--ra1-r);
}
body.ra--v1 .ra-doc-dont { border-top-color: var(--ra-danger); }
body.ra--v1 .ra-doc-do h3, body.ra--v1 .ra-doc-dont h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--ra-space-2); font-size: var(--ra-fs-base); font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-doc-do h3 .fas { color: var(--ra-primary-text); }
body.ra--v1 .ra-doc-dont h3 .fas { color: var(--ra-danger-text); }
body.ra--v1 .ra-doc-do ul, body.ra--v1 .ra-doc-dont ul { margin: 0; padding-left: 18px; }

/* colour swatches */
body.ra--v1 .ra-swatch { overflow: hidden; background: var(--ra-bg-surface); border: 1px solid var(--ra1-card-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-swatch__chip { display: flex; align-items: flex-end; height: 72px; padding: 8px 10px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-swatch__body { padding: 10px 12px; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-swatch__name { font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-swatch__hex { font-family: SFMono-Regular, Menlo, monospace; color: var(--ra-text-muted); }
body.ra--v1 .ra-swatch__use { margin-top: 4px; color: var(--ra-text-soft); }
/* swatch fills — documentation only (the one place hex values are listed) */
.ra-sw-brand    { background: #6AB745; color: #16191d; }
.ra-sw-hover    { background: #5ea83a; color: #16191d; }
.ra-sw-pressed  { background: #539a31; color: #16191d; }
.ra-sw-deep     { background: #2f6a1f; color: #fff; }
.ra-sw-active   { background: #285c1a; color: #fff; }
.ra-sw-tint     { background: #e2f2da; color: #285c1a; }
.ra-sw-topbar   { background: #1e3518; color: #fff; }
.ra-sw-menu     { background: #152911; color: #ffffff; }
.ra-sw-canvas   { background: #e3e7e0; color: #16191d; }
.ra-sw-surface  { background: #ffffff; color: #16191d; box-shadow: inset 0 -1px 0 #d3d9cf; }
.ra-sw-text     { background: #16191d; color: #fff; }
.ra-sw-muted    { background: #3f454b; color: #fff; }
.ra-sw-soft     { background: #545b62; color: #fff; }
.ra-sw-line     { background: #c4c9ce; color: #16191d; }
.ra-sw-edge     { background: #7d858c; color: #fff; }
.ra-sw-danger   { background: #e61e25; color: #fff; }
.ra-sw-dangert  { background: #c1151b; color: #fff; }
.ra-sw-warning  { background: #ffc107; color: #16191d; }

/* type & spacing specimens */
body.ra--v1 .ra-type-sample { margin: 0; line-height: 1.25; color: var(--ra-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ra--v1 .ra-type--30 { font-size: 30px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
body.ra--v1 .ra-type--24 { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; }
body.ra--v1 .ra-type--18 { font-size: 18px; font-weight: 600; }
body.ra--v1 .ra-type--16 { font-size: 16px; font-weight: 600; }
body.ra--v1 .ra-type--15 { font-size: 15px; font-weight: 600; }
body.ra--v1 .ra-type--14 { font-size: 14px; }
body.ra--v1 .ra-type--13 { font-size: 13px; color: var(--ra-text-muted); }
body.ra--v1 .ra-type--12 { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ra-text-soft); }
body.ra--v1 .ra-space-bar { display: inline-block; height: 12px; background: var(--ra-brand); vertical-align: middle; }
body.ra--v1 .ra-space-bar--4  { width: 4px; }
body.ra--v1 .ra-space-bar--8  { width: 8px; }
body.ra--v1 .ra-space-bar--12 { width: 12px; }
body.ra--v1 .ra-space-bar--16 { width: 16px; }
body.ra--v1 .ra-space-bar--20 { width: 20px; }
body.ra--v1 .ra-space-bar--24 { width: 24px; }
body.ra--v1 .ra-space-bar--32 { width: 32px; }
body.ra--v1 .ra-space-bar--48 { width: 48px; }
body.ra--v1 .ra-carousel-slide { display: flex; flex-direction: column; justify-content: center; height: 200px; padding: 0 64px; background: var(--ra-bg-surface); }
body.ra--v1 .ra-carousel-slide h3 { margin: 0 0 6px; font-size: 18px; font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-carousel-slide p { margin: 0; color: var(--ra-text-muted); }
body.ra--v1 .ra-scrollspy-demo { position: relative; height: 200px; overflow-y: auto; padding: 0 var(--ra-space-4); background: var(--ra-bg-surface); border: 1px solid var(--ra1-card-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-scrollspy-demo h4 { margin: var(--ra-space-4) 0 4px; font-size: var(--ra-fs-base); font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-scrollspy-demo p { min-height: 120px; margin: 0; color: var(--ra-text-muted); }


/* ==========================================================================
   V1 · DARK MODE   <html data-ra-theme="dark">
   Set by js/aisle-theme.js (in <head>) from the saved choice; the
   topbar button [data-ra-theme-toggle] flips it. Light is the default.

   Only TOKENS change here — pages and components are the same markup.
   Same rules as light: #6AB745 stays the brand fill with DARK text on it;
   green TEXT / links / focus use the light green #8fd16c; no blue.
   Contrast on the card surface #171d14: text 14.3:1 · muted 8.6:1 ·
   soft 6.3:1 · green text 9.3:1 · control edge 3.6:1.
   ========================================================================== */
html[data-ra-theme="dark"] { color-scheme: dark; }
html[data-ra-theme="dark"],
html[data-ra-theme="dark"] body.ra--v1 {
  --ra-green-050: #1b2915;
  --ra-green-100: #24381b;
  --ra-green-300: #3d5e2e;
  --ra-green-800: #8fd16c;
  --ra-green-900: #b9e3a3;

  --ra-warning-text: #e3b93f;
  --ra-danger-text:  #ff8a8f;

  --ra-bg-app:      #0f140d;
  --ra-bg-surface:  #171d14;
  --ra-bg-sidebar:  #131a10;
  --ra-bg-subtle:   #1d2419;
  --ra-bg-hover:    #283023;

  --ra-border:        #323b2c;
  --ra-border-strong: #6f7a68;

  --ra-text:         #e8ece4;
  --ra-text-heading: #f3f5f0;
  --ra-text-muted:   #b4bcae;
  --ra-text-soft:    #98a191;

  --ra-tooltip-bg: #323c2c;
  --ra-shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.55);

  --ra1-topbar-bg:   #16280f;
  --ra1-side-bg:     #0f1d0c;
  --ra1-side-text:   #f3f5f0;
  --ra1-side-muted:  #999999;
  --ra1-side-hover:  rgba(255, 255, 255, 0.07);
  --ra1-side-line:   rgba(255, 255, 255, 0.09);
  --ra1-canvas:      #0f140d;
  --ra1-card-border: #2b3426;
  --ra1-filter-border: var(--ra-border);
  --ra1-nav-hover:   #1f2a1a;

  --bs-primary: #8fd16c;    --bs-primary-rgb: 143, 209, 108;
  --bs-success: #8fd16c;    --bs-success-rgb: 143, 209, 108;
  --bs-secondary: #b4bcae;  --bs-secondary-rgb: 180, 188, 174;
  --bs-danger: #ff8a8f;     --bs-danger-rgb: 255, 138, 143;
  --bs-emphasis-color: #f3f5f0;
}

/* Bootstrap 5.2 has no colour modes: give each component the dark surface */
html[data-ra-theme="dark"] body.ra--v1 .card       { --bs-card-bg: var(--ra-bg-surface); }
html[data-ra-theme="dark"] body.ra--v1 .dropdown-menu {
  --bs-dropdown-bg: #1f271b;
  --bs-dropdown-color: var(--ra-text);
  --bs-dropdown-link-color: var(--ra-text);
  --bs-dropdown-link-hover-color: var(--ra-text-heading);
  --bs-dropdown-link-hover-bg: var(--ra-bg-hover);
  --bs-dropdown-header-color: var(--ra-text-soft);
  --bs-dropdown-border-color: var(--ra-border);
  --bs-dropdown-divider-bg: var(--ra-border);
}
html[data-ra-theme="dark"] body.ra--v1 .modal      { --bs-modal-bg: #1b2218; --bs-modal-color: var(--ra-text); }
html[data-ra-theme="dark"] body.ra--v1 .offcanvas,
html[data-ra-theme="dark"] body.ra--v1 .offcanvas-lg { --bs-offcanvas-bg: var(--ra1-side-bg); --bs-offcanvas-color: var(--ra-text); }
html[data-ra-theme="dark"] body.ra--v1 .popover    { --bs-popover-bg: #1f271b; --bs-popover-header-bg: #252e20; --bs-popover-body-color: var(--ra-text); --bs-popover-header-color: var(--ra-text-heading); --bs-popover-border-color: var(--ra-border); }
html[data-ra-theme="dark"] body.ra--v1 .toast      { --bs-toast-bg: #1f271b; --bs-toast-header-bg: #252e20; --bs-toast-color: var(--ra-text); --bs-toast-header-color: var(--ra-text-muted); --bs-toast-border-color: var(--ra-border); }
html[data-ra-theme="dark"] body.ra--v1 .accordion  { --bs-accordion-bg: var(--ra-bg-surface); --bs-accordion-color: var(--ra-text); --bs-accordion-btn-color: var(--ra-text); --bs-accordion-border-color: var(--ra1-card-border); }
html[data-ra-theme="dark"] body.ra--v1 .list-group { --bs-list-group-bg: var(--ra-bg-surface); --bs-list-group-disabled-bg: var(--ra-bg-surface); --bs-list-group-disabled-color: var(--ra-text-soft); --bs-list-group-action-active-bg: var(--ra-bg-hover); --bs-list-group-action-active-color: var(--ra-text-heading); }
html[data-ra-theme="dark"] body.ra--v1 .table {
  --bs-table-color: var(--ra-text);
  --bs-table-border-color: var(--ra1-card-border);
  --bs-table-striped-color: var(--ra-text);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-color: var(--ra-text-heading);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
  --bs-table-active-color: var(--ra-text-heading);
  --bs-table-active-bg: rgba(255, 255, 255, 0.07);
}
html[data-ra-theme="dark"] body.ra--v1 .pagination {
  --bs-pagination-bg: var(--ra-bg-surface);
  --bs-pagination-color: var(--ra-text);
  --bs-pagination-border-color: var(--ra-border);
  --bs-pagination-hover-bg: var(--ra-bg-hover);
  --bs-pagination-hover-color: var(--ra-text-heading);
  --bs-pagination-hover-border-color: var(--ra-border);
  --bs-pagination-focus-bg: var(--ra-bg-hover);
  --bs-pagination-disabled-bg: var(--ra-bg-surface);
  --bs-pagination-disabled-color: var(--ra-text-soft);
  --bs-pagination-disabled-border-color: var(--ra-border);
}
html[data-ra-theme="dark"] body.ra--v1 .nav-tabs  { --bs-nav-tabs-link-active-bg: transparent; --bs-nav-tabs-link-active-color: var(--ra-text-heading); }
html[data-ra-theme="dark"] body.ra--v1 .progress  { --bs-progress-bg: #2a3325; }
html[data-ra-theme="dark"] body.ra--v1 .modal-backdrop,
html[data-ra-theme="dark"] body.ra--v1 .offcanvas-backdrop { --bs-backdrop-bg: #000; --bs-backdrop-opacity: 0.65; }

/* forms */
html[data-ra-theme="dark"] body.ra--v1 .form-control,
html[data-ra-theme="dark"] body.ra--v1 .form-select { color: var(--ra-text); background-color: #11160e; }
html[data-ra-theme="dark"] body.ra--v1 .form-control:disabled,
html[data-ra-theme="dark"] body.ra--v1 .form-select:disabled { color: var(--ra-text-soft); background-color: var(--ra-bg-subtle); }
html[data-ra-theme="dark"] body.ra--v1 .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b4bcae' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
html[data-ra-theme="dark"] body.ra--v1 .input-group-text { color: var(--ra-text-muted); background-color: var(--ra-bg-subtle); border-color: var(--ra-border-strong); }
html[data-ra-theme="dark"] body.ra--v1 .form-check-input:not(:checked) { background-color: #11160e; }
html[data-ra-theme="dark"] body.ra--v1 .form-check-input:checked { background-color: #3f8a24; border-color: #3f8a24; }
html[data-ra-theme="dark"] body.ra--v1 .form-switch .form-check-input:not(:checked) {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2398a191'/%3e%3c/svg%3e");
}
html[data-ra-theme="dark"] body.ra--v1 .form-text { color: var(--ra-text-soft); }
html[data-ra-theme="dark"] body.ra--v1 .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-ra-theme="dark"] body.ra--v1 .accordion-button::after { filter: invert(1) grayscale(100%) brightness(160%); }

/* fixed-colour pieces: keep their own readable pair */
html[data-ra-theme="dark"] body.ra--v1 .btn-danger {
  --bs-btn-color: #fff; --bs-btn-bg: #c1151b; --bs-btn-border-color: #c1151b;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #d42a30; --bs-btn-hover-border-color: #d42a30;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #a30f14; --bs-btn-active-border-color: #a30f14;
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #c1151b; --bs-btn-disabled-border-color: #c1151b;
}
html[data-ra-theme="dark"] body.ra--v1 .ra-barlist__bar--risk,
html[data-ra-theme="dark"] body.ra--v1 .ra-barlist__row:hover .ra-barlist__bar--risk { background: var(--ra-warning); }
html[data-ra-theme="dark"] body.ra--v1 .ra-barlist__bar--behind,
html[data-ra-theme="dark"] body.ra--v1 .ra-barlist__row:hover .ra-barlist__bar--behind { background: var(--ra-danger); }
html[data-ra-theme="dark"] body.ra--v1 .text-bg-success,
html[data-ra-theme="dark"] body.ra--v1 .text-bg-primary { color: #fff !important; background-color: #2f6a1f !important; } /* vendor !imp */
html[data-ra-theme="dark"] body.ra--v1 .text-bg-secondary,
html[data-ra-theme="dark"] body.ra--v1 .text-bg-info,
html[data-ra-theme="dark"] body.ra--v1 .text-bg-light { color: #e8ece4 !important; background-color: #3a4434 !important; } /* vendor !imp */
html[data-ra-theme="dark"] body.ra--v1 .alert-success { --bs-alert-color: #b9e3a3; --bs-alert-bg: #1b2915; --bs-alert-border-color: #3d5e2e; }
html[data-ra-theme="dark"] body.ra--v1 .alert-warning { --bs-alert-color: #f0d27a; --bs-alert-bg: #2a2410; --bs-alert-border-color: #5c4b12; }
html[data-ra-theme="dark"] body.ra--v1 .alert-danger  { --bs-alert-color: #ffb3b6; --bs-alert-bg: #2e1516; --bs-alert-border-color: #6b2326; }
html[data-ra-theme="dark"] body.ra--v1 .alert-secondary,
html[data-ra-theme="dark"] body.ra--v1 .alert-light,
html[data-ra-theme="dark"] body.ra--v1 .alert-info { --bs-alert-color: var(--ra-text); --bs-alert-bg: var(--ra-bg-subtle); --bs-alert-border-color: var(--ra-border); }
html[data-ra-theme="dark"] body.ra--v1 .alert .alert-link { color: inherit; }
html[data-ra-theme="dark"] body.ra--v1 .ra-tablewrap::before { background: linear-gradient(to right, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }
html[data-ra-theme="dark"] body.ra--v1 .ra-tablewrap::after  { background: linear-gradient(to left,  rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); }
html[data-ra-theme="dark"] body.ra--v1 .ra-table-sticky > :not(caption) > tr > :first-child::after { background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
/* the FTrack logo is drawn for light backgrounds: give it a light plate */
html[data-ra-theme="dark"] body.ra--v1 .ra-poweredby__logo,
html[data-ra-theme="dark"] body.ra--v1 .ra-about__logo { padding: 3px 6px; background: #f3f5f0; border-radius: var(--ra1-r-sm); }


/* ==========================================================================
   V2 — MODERN LAYOUT  (Lark-style shell, same FTrack palette)
   <body class="ra ra--v2"> + <div class="ra-app ra2">
   Rounded 8px controls, grey canvas, white cards, main column + right rail.
   ========================================================================== */
body.ra.ra--v2,
body.ra-v3 {   /* V3 reuses the V2 tokens */
  --ra-radius:       8px;
  --ra2-radius-card: 8px;
  --ra2-header-h:    56px;
  --ra2-nav-w:       236px;
  --ra2-nav-w-mini:  56px;
  --ra2-gutter:      8px;
  --ra2-gap:         12px;
  --ra2-canvas:      #f2f3f1;   /* grey canvas, FTrack-neutral (Lark: #f5f5f5) */
  --ra2-fill-hover:  rgba(33, 37, 41, 0.05);
  --ra2-fill-press:  rgba(33, 37, 41, 0.08);
  background: var(--ra2-canvas);
}

/* ---------- Header ---------------------------------------------------- */
.ra2-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--ra-z-header);
  height: var(--ra2-header-h);
  display: flex;
  align-items: center;
  gap: var(--ra-space-2);
  padding: 0 var(--ra-space-4) 0 var(--ra-space-3);
  background: var(--ra-bg-surface);
}

.ra2-header .ra-brand { padding: 0 var(--ra-space-2); margin-right: var(--ra-space-6); }
.ra2-header .ra-brand__name { font-size: var(--ra-fs-lg); }

.ra2-burger { display: none; }

/* Top-level tabs */
.ra2-tabs { display: flex; align-items: center; gap: var(--ra-space-2); min-width: 0; }
.ra .ra2-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--ra-space-2);
  height: 36px;
  padding: 0 var(--ra-space-3);
  font-size: var(--ra-fs-base);
  font-weight: var(--ra-fw-medium);
  color: var(--ra-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--ra-radius);
  white-space: nowrap;
  cursor: pointer;
}
.ra .ra2-tab:hover { color: var(--ra-text); background: var(--ra2-fill-hover); text-decoration: none; }
.ra .ra2-tab.is-active { color: var(--ra-text); background: var(--ra2-fill-press); }
.ra2-tab__icon { font-size: 15px; }
.ra2-tab .ra-btn__caret { margin-left: -2px; }

.ra2-actions {
  display: flex;
  align-items: center;
  gap: var(--ra-space-1);
  margin-left: auto;
}
.ra2-actions .ra-iconbtn {
  width: 36px;
  height: 36px;
  font-size: 17px;
  color: var(--ra-text-muted);
}
.ra2-actions .ra-iconbtn:hover { color: var(--ra-text); background: var(--ra2-fill-hover); }
.ra2-actions .ra-iconbtn__dot { top: 8px; right: 8px; border-radius: 50%; }
.ra2-actions .ra-btn--ghost { border-color: transparent; color: var(--ra-text-muted); }
.ra2-actions .ra-btn--ghost:hover { color: var(--ra-text); background: var(--ra2-fill-hover); border-color: transparent; }

.ra2-divider { width: 1px; height: 20px; margin: 0 var(--ra-space-2); background: var(--ra-border-strong); }

/* Account: avatar + name + role badge */
.ra2-account {
  display: inline-flex;
  align-items: center;
  gap: var(--ra-space-2);
  height: 44px;
  padding: 0 var(--ra-space-2) 0 var(--ra-space-1);
  background: transparent;
  border: 0;
  border-radius: var(--ra-radius);
  cursor: pointer;
  text-align: left;
}
.ra2-account:hover { background: var(--ra2-fill-hover); }
.ra2-account .ra-avatar { width: 32px; height: 32px; border-radius: 50%; }
.ra2-account__text { display: flex; flex-direction: column; line-height: 1.2; }
.ra2-account__name { font-size: var(--ra-fs-base); font-weight: var(--ra-fw-medium); color: var(--ra-text); }
.ra2-account__role {
  align-self: flex-start;
  margin-top: 2px;
  padding: 0 6px;
  font-size: 10px;
  line-height: 16px;
  color: var(--ra-primary-text);
  background: var(--ra-primary-surface);
  border-radius: 4px;
}
.ra2-account .ra-btn__caret { margin-left: var(--ra-space-2); color: var(--ra-text-soft); }

/* ---------- Sidebar (sits on the grey canvas) -------------------------- */
.ra2-sidebar {
  position: fixed;
  top: var(--ra2-header-h);
  bottom: 0;
  left: 0;
  z-index: var(--ra-z-sidebar);
  width: calc(var(--ra2-nav-w) + var(--ra2-gutter));
  display: flex;
  flex-direction: column;
  padding-left: var(--ra2-gutter);
  background: var(--ra2-canvas);
  transition: width var(--ra-dur) var(--ra-ease), transform var(--ra-dur) var(--ra-ease);
}
.ra2-nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: var(--ra-space-3) 0; }
.ra2-nav__list { list-style: none; margin: 0; padding: 0; }
.ra2-nav__list .ra2-nav__list { margin-bottom: var(--ra-space-1); }

.ra .ra2-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--ra-space-3);
  width: 100%;
  height: 40px;
  margin-bottom: 2px;
  padding: 0 var(--ra-space-3) 0 var(--ra-space-4);
  font-size: var(--ra-fs-base);
  color: var(--ra-text-muted);
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: var(--ra-radius);
  cursor: pointer;
}
.ra .ra2-nav__link:hover { color: var(--ra-text); background: var(--ra2-fill-hover); text-decoration: none; }
.ra .ra2-nav__link.is-active {
  color: var(--ra-text);
  font-weight: var(--ra-fw-medium);
  background: var(--ra-green-100);
}
.ra .ra2-nav__link.is-active .ra2-nav__icon { color: var(--ra-primary-text); }
.ra .ra2-nav__link--sub { padding-left: 48px; }   /* aligns with parent label */

.ra2-nav__icon { flex: none; width: 20px; font-size: 16px; text-align: center; color: var(--ra-text-muted); }
.ra2-nav__label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.ra2-nav__chev {
  flex: none;
  font-size: 11px;
  color: var(--ra-text-soft);
  transition: transform var(--ra-dur) var(--ra-ease);
}
.ra2-nav__link[aria-expanded="false"] .ra2-nav__chev { transform: rotate(-90deg); }
.ra2-nav__count {
  flex: none;
  min-width: 22px;
  padding: 0 6px;
  font-size: var(--ra-fs-xs);
  line-height: 18px;
  text-align: center;
  color: var(--ra-text-muted);
  background: var(--ra2-fill-press);
  border-radius: 9px;
}

.ra2-sidebar__foot {
  flex: none;
  margin-right: var(--ra-space-2);
  padding: var(--ra-space-2) 0;
  border-top: 1px solid var(--ra-border-strong);
}
.ra2-sidebar__foot .ra2-nav__link { margin: 0; }
.ra2-sidebar__foot .ra2-nav__icon { transition: transform var(--ra-dur) var(--ra-ease); }

/* Collapsed: icon rail */
.ra2.is-collapsed .ra2-sidebar { width: calc(var(--ra2-nav-w-mini) + var(--ra2-gutter)); }
.ra2.is-collapsed .ra2-nav__label,
.ra2.is-collapsed .ra2-nav__count,
.ra2.is-collapsed .ra2-nav__chev,
.ra2.is-collapsed .ra2-nav__list .ra2-nav__list { display: none; }
.ra .ra2.is-collapsed .ra2-nav__link { justify-content: center; padding: 0; }
.ra2.is-collapsed .ra2-sidebar__foot { margin-right: 0; }
.ra2.is-collapsed .ra2-sidebar__foot .ra2-nav__icon { transform: rotate(180deg); }

/* ---------- Main canvas ----------------------------------------------- */
.ra2-main {
  min-height: 100vh;
  padding: calc(var(--ra2-header-h) + var(--ra2-gutter)) var(--ra-space-4) var(--ra-space-5)
           calc(var(--ra2-nav-w) + var(--ra2-gutter) * 2);
  transition: padding-left var(--ra-dur) var(--ra-ease);
}
.ra2.is-collapsed .ra2-main { padding-left: calc(var(--ra2-nav-w-mini) + var(--ra2-gutter) * 2); }

/* Page head: breadcrumb + title, sits on the canvas */
.ra2-pagehead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ra-space-2) var(--ra-space-4);
  padding: var(--ra-space-2) var(--ra-space-1) var(--ra-space-3);
}
.ra2-pagehead .ra-breadcrumb { margin-bottom: 2px; }
.ra2-pagehead__title { font-size: var(--ra-fs-xl); font-weight: var(--ra-fw-semibold); }
.ra2-pagehead .ra-pagebar__meta .ra-chip { border-radius: 12px; }
.ra2-pagehead .ra-chip__dot { border-radius: 50%; }

/* Grid: main column + right rail */
.ra2-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: var(--ra2-gap);
  align-items: start;
}
.ra2-col { display: flex; flex-direction: column; gap: var(--ra2-gap); min-width: 0; }

.ra2-card {
  padding: 20px 20px 16px;
  background: var(--ra-bg-surface);
  border-radius: var(--ra2-radius-card);
}
.ra2-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ra-space-3);
  margin-bottom: var(--ra-space-4);
}
.ra2-card__title { font-size: var(--ra-fs-md); font-weight: var(--ra-fw-medium); color: var(--ra-text-heading); }
.ra2-card__title .fas { margin-left: 4px; font-size: 11px; color: var(--ra-text-soft); }

/* Layout skeleton — marks where content will go */
.ra2-skel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ra2-skel-h, 120px);
  font-size: var(--ra-fs-sm);
  color: var(--ra-text-soft);
  background: var(--ra-bg-subtle);
  border: 1px dashed var(--ra-border-strong);
  border-radius: 6px;
}
.ra2-skel--sm { --ra2-skel-h: 72px; }
.ra2-skel--lg { --ra2-skel-h: 220px; }

/* ---------- V2 responsive --------------------------------------------- */
@media (max-width: 1200px) {
  .ra2-grid { grid-template-columns: minmax(0, 1fr); }
  .ra2-hide-lg { display: none; }
}
@media (max-width: 1100px) {
  .ra2-account__text { display: none; }
}
@media (max-width: 860px) {
  .ra2-burger { display: inline-flex; }
  .ra2-tabs, .ra2-hide-md { display: none; }
  .ra2-header .ra-brand { margin-right: 0; }

  .ra2-sidebar,
  .ra2.is-collapsed .ra2-sidebar {
    width: calc(var(--ra2-nav-w) + var(--ra2-gutter));
    transform: translateX(-100%);
  }
  .ra2.is-open .ra2-sidebar { transform: none; box-shadow: var(--ra-shadow-pop); }
  .ra2.is-collapsed .ra2-nav__label,
  .ra2.is-collapsed .ra2-nav__count,
  .ra2.is-collapsed .ra2-nav__chev { display: initial; }
  .ra2.is-collapsed .ra2-nav__list .ra2-nav__list { display: block; }
  .ra .ra2.is-collapsed .ra2-nav__link { justify-content: flex-start; padding: 0 var(--ra-space-3) 0 var(--ra-space-4); }
  .ra .ra2.is-collapsed .ra2-nav__link--sub { padding-left: 48px; }
  .ra2-sidebar__foot { display: none; }

  .ra2-main,
  .ra2.is-collapsed .ra2-main { padding: calc(var(--ra2-header-h) + var(--ra2-gutter)) var(--ra-space-3) var(--ra-space-4); }
  .ra--v2 .ra-backdrop { inset: var(--ra2-header-h) 0 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ra2-sidebar, .ra2-main, .ra2-nav__chev, .ra2-sidebar__foot .ra2-nav__icon { transition: none; }
}


/* ==========================================================================
   V3 — V2 SKIN FOR THE ORIGINAL FTRACK TEMPLATE  (AdminLTE 3 DOM, unchanged)

   HOW DEVS APPLY IT TO THE LIVE APP
     1. common/header.tpl: load this file LAST (after custom.css / custom2.css)
          <link rel="stylesheet" href="…/aisle.css">
     2. Add one class to <body>:   class="… cpm-ui text-sm ra-v3"
     That's it. No .tpl markup changes. Remove the class to roll back.

   Everything is scoped under body.ra-v3 and targets stock AdminLTE /
   Bootstrap 4 classes (.main-header, .main-sidebar, .nav-sidebar,
   .content-wrapper, .card, .btn-primary …). !important is used ONLY
   where AdminLTE / custom.css already use !important (marked "vendor !imp").
   ========================================================================== */
body.ra-v3 {
  --ra3-sidebar-w:      calc(var(--ra2-nav-w) + var(--ra2-gutter));     /* 244px */
  --ra3-sidebar-w-mini: calc(var(--ra2-nav-w-mini) + var(--ra2-gutter)); /*  64px */
  font-family: var(--ra-font-sans);
  color: var(--ra-text);
  -webkit-font-smoothing: antialiased;
}
body.ra-v3 .wrapper,
body.ra-v3 .content-wrapper,
body.ra-v3 .main-footer { background-color: var(--ra2-canvas); }

/* ---------- Links & primary colour → FTrack green (AdminLTE ships blue) -- */
body.ra-v3 .content a:not(.btn):not(.dropdown-item):not(.nav-link) { color: var(--ra-link); }
body.ra-v3 .content a:not(.btn):not(.dropdown-item):not(.nav-link):hover { color: var(--ra-link-hover); }

body.ra-v3 .btn { border-radius: var(--ra-radius); font-weight: var(--ra-fw-medium); }
body.ra-v3 .btn-primary,
body.ra-v3 .btn-success {
  color: var(--ra-primary-on);
  background-color: var(--ra-primary);
  border-color: var(--ra-primary);
  box-shadow: none;
}
body.ra-v3 .btn-primary:hover,
body.ra-v3 .btn-success:hover,
body.ra-v3 .btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--ra-primary-hover);
  border-color: var(--ra-primary-hover);
}
body.ra-v3 .btn-primary:focus,
body.ra-v3 .btn-success:focus { box-shadow: 0 0 0 2px var(--ra-primary-border); }
body.ra-v3 .bg-primary { background-color: var(--ra-primary-text) !important; } /* vendor !imp */
body.ra-v3 .badge.bg-primary,
body.ra-v3 .badge-primary { background-color: var(--ra-primary-text) !important; } /* vendor !imp */
body.ra-v3 .badge { border-radius: 9px; font-weight: var(--ra-fw-medium); }

body.ra-v3 :focus-visible { outline: 2px solid var(--ra-focus); outline-offset: 1px; }

/* ---------- Header: white, 56px, no border (V2) ------------------------ */
body.ra-v3 .main-header.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--ra-z-header);
  height: var(--ra2-header-h);
  margin-left: 0 !important;            /* vendor !imp (custom.css) */
  padding: 0 var(--ra-space-4) 0 var(--ra-space-3);
  background-color: var(--ra-bg-surface) !important; /* vendor !imp (.navbar-black) */
  border-bottom: 0;
}
body.ra-v3 .main-header > .container-fluid { padding: 0; height: 100%; flex-wrap: nowrap; }

/* hamburger */
body.ra-v3 .main-header a.nav-bars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: var(--ra-space-2);
  padding: 0;
  color: var(--ra-text-muted);
  border-radius: var(--ra-radius);
}
body.ra-v3 .main-header a.nav-bars:hover { color: var(--ra-text); background: var(--ra2-fill-hover); }
body.ra-v3 .main-header a.nav-bars i { font-size: 16px !important; } /* vendor !imp (custom.css) */

/* brand */
body.ra-v3 .main-header .navbar-brand {
  margin: 0 var(--ra-space-6) 0 0;
  padding: 0;
  line-height: 1;
  color: var(--ra-text);
}
body.ra-v3 .main-header .brand-text {
  font-size: var(--ra-fs-lg);
  font-weight: var(--ra-fw-semibold) !important; /* vendor !imp (.font-weight-light) */
  letter-spacing: -0.01em;
}

/* top links → Lark pill tabs, left-aligned after the brand */
body.ra-v3 .main-header .navbar-collapse { position: relative; align-self: stretch; align-items: center; }
body.ra-v3 .main-header .navbar-collapse > .navbar-nav { margin: 0; gap: var(--ra-space-2); }
body.ra-v3 .main-header .navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 var(--ra-space-3);
  font-size: var(--ra-fs-base);
  font-weight: var(--ra-fw-medium);
  color: var(--ra-text-muted);
  border-radius: var(--ra-radius);
}
body.ra-v3 .main-header .navbar-nav .nav-link:hover,
body.ra-v3 .main-header .navbar-nav .show > .nav-link { color: var(--ra-text); background: var(--ra2-fill-hover); }
body.ra-v3 .main-header .navbar-nav .nav-link.active { color: var(--ra-text); background: var(--ra2-fill-press); }

/* search icon (custom.css pins it to the right of the collapse area) */
body.ra-v3 .main-header #btn-search {
  top: 50%;
  right: var(--ra-space-2);
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--ra-text-muted);
  border-radius: var(--ra-radius);
  transform: translateY(-50%);
}
body.ra-v3 .main-header #btn-search:hover { background: var(--ra2-fill-hover) !important; } /* vendor !imp */
body.ra-v3 .main-header #btn-search:hover i { color: var(--ra-text); }

/* right-hand actions */
body.ra-v3 .main-header .navbar-no-expand { align-items: center; gap: var(--ra-space-1); }
body.ra-v3 .main-header .navbar-no-expand > .nav-item > .nav-link {
  min-width: 36px;
  justify-content: center;
  padding: 0 var(--ra-space-2);
  font-size: var(--ra-fs-base);
}
body.ra-v3 .main-header .navbar-no-expand > .nav-item > .nav-link > .fas,
body.ra-v3 .main-header .navbar-no-expand > .nav-item > .nav-link > .far { font-size: 17px; }
body.ra-v3 .main-header .img-sm { width: 32px; height: 32px; }
body.ra-v3 .main-header .navbar-badge {
  top: 4px;
  right: 2px;
  font-size: 10px;
  font-weight: var(--ra-fw-semibold);
  color: var(--ra-danger-on);
  background-color: var(--ra-danger) !important; /* vendor !imp (.bg-warning) */
  border: 2px solid var(--ra-bg-surface);
  border-radius: 9px;
}

/* dropdowns */
body.ra-v3 .dropdown-menu {
  padding: var(--ra-space-1) 0;
  font-size: var(--ra-fs-base);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border-strong);
  border-radius: var(--ra-radius);
  box-shadow: var(--ra-shadow-pop);
}
body.ra-v3 .dropdown-item { padding: 7px var(--ra-space-3); color: var(--ra-text); }
body.ra-v3 .dropdown-item:hover { background: var(--ra-bg-subtle); }
body.ra-v3 .dropdown-item.active,
body.ra-v3 .dropdown-item:active {
  color: var(--ra-primary-text);
  font-weight: var(--ra-fw-medium);
  background: var(--ra-primary-surface);
}
body.ra-v3 .dropdown-header {
  text-align: left;
  font-size: var(--ra-fs-xs);
  font-weight: var(--ra-fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ra-text-soft);
}
/* user card inside the avatar dropdown */
body.ra-v3 .widget-user-2 { margin: 0; box-shadow: none; border-radius: var(--ra-radius); overflow: hidden; }
body.ra-v3 .widget-user-2 .widget-user-header { background-color: var(--ra-primary-surface) !important; color: var(--ra-text); } /* vendor !imp */
body.ra-v3 .widget-user-2 .widget-user-username { color: var(--ra-text); font-weight: var(--ra-fw-semibold); }
body.ra-v3 .widget-user-2 .widget-user-desc { color: var(--ra-text-muted); }

/* ---------- Sidebar: on the grey canvas, 40px rounded items (V2) -------- */
body.ra-v3 .main-sidebar,
body.ra-v3 .main-sidebar::before {
  width: var(--ra3-sidebar-w);
}
body.ra-v3 .main-sidebar {
  position: fixed;
  bottom: 0;
  height: auto;
  min-height: 0;
  padding-left: var(--ra2-gutter);
  background: var(--ra2-canvas) !important; /* vendor !imp (hover gradient) */
  box-shadow: none !important;               /* vendor !imp */
}
/* custom.css has `body:not(.layout-fixed.cpm-ui) .main-sidebar { top: 81px }` —
   specificity (0,3,2); match it and win on load order. */
html body.ra-v3.cpm-ui .main-sidebar { top: var(--ra2-header-h); }
body.ra-v3 .main-sidebar .sidebar {
  height: 100%;
  padding: var(--ra-space-2) 0 var(--ra-space-4);
  overflow-y: auto;
  background-color: transparent;
}
body.ra-v3 .main-sidebar .sidebar > nav { margin-top: 0 !important; } /* vendor !imp (.mt-2) */
/* AdminLTE .nav-legacy pulls the menu out by -.5rem on both sides; sub-links get a fixed width */
body.ra-v3 .main-sidebar .nav-sidebar.nav-legacy { width: auto; margin: 0; }
body.ra-v3 .main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link { width: 100%; }
body.ra-v3 .main-sidebar .nav-sidebar.nav-legacy .nav-link > .nav-icon,
body.ra-v3 .main-sidebar .nav-sidebar.nav-legacy > .nav-item > .nav-link.active > .nav-icon { margin-left: 0; }

body.ra-v3 .nav-sidebar .nav-item > .nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  margin-bottom: 2px;
  padding: 0 var(--ra-space-3) 0 var(--ra-space-4);
  color: var(--ra-text-muted);
  border: 0;
  border-radius: var(--ra-radius);
}
body.ra-v3 .main-sidebar .nav-sidebar .nav-link,
body.ra-v3 .main-sidebar .nav-sidebar .nav-link:hover { color: var(--ra-text-muted); }
body.ra-v3 .nav-sidebar .nav-link p {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--ra-fs-base);
  white-space: nowrap;
}
body.ra-v3 .nav-sidebar .nav-icon {
  flex: none;
  width: 20px;
  margin: 0 var(--ra-space-3) 0 0;
  font-size: 16px !important;      /* vendor !imp (.text-sm) */
  color: var(--ra-text-muted);
}
body.ra-v3 .nav-sidebar .nav-link p > .right {
  position: static;
  margin-left: auto;
}
body.ra-v3 .nav-sidebar .nav-link p > .right:not(.badge) {
  width: 12px;
  font-size: 11px;
  text-align: center;
  color: var(--ra-text-soft);
  transition: transform var(--ra-dur) var(--ra-ease);
}
/* arrow: ▸ closed, ▾ open (V2) — the icon is fa-angle-left */
body.ra-v3 .nav-sidebar .nav-link p > .fa-angle-left.right { transform: rotate(180deg); }
body.ra-v3 .nav-sidebar .menu-open > .nav-link p > .fa-angle-left.right,
body.ra-v3 .nav-sidebar .menu-is-opening > .nav-link p > .fa-angle-left.right { transform: rotate(-90deg); }
body.ra-v3 .nav-sidebar .nav-link p > .badge.right + .right:not(.badge),
body.ra-v3 .nav-sidebar .nav-link p > .right:not(.badge) + .badge.right { margin-left: var(--ra-space-2); }
body.ra-v3 .nav-sidebar .nav-link p > .badge.right {
  font-size: var(--ra-fs-xs);
  font-weight: var(--ra-fw-medium);
  line-height: 18px;
  padding: 0 6px;
}
body.ra-v3 .nav-sidebar .nav-link p > .badge-info.right,
body.ra-v3 .nav-sidebar .nav-link p > .badge.bg-info {
  color: var(--ra-text-muted) !important;          /* vendor !imp (.bg-info) */
  background: var(--ra2-fill-press) !important; /* vendor !imp (.bg-info) */
}

/* open group: plain parent, no block behind the children (overrides custom.css white + blue) */
body.ra-v3 [class*=sidebar-light-] .nav-sidebar > .nav-item.menu-open > .nav-link {
  color: var(--ra-text-muted);
  font-weight: var(--ra-fw-regular);
  background-color: transparent;
}
/* AdminLTE: [class*=sidebar-light] .nav-legacy.nav-sidebar > .nav-item > .nav-treeview { rgba(0,0,0,.05) } */
body.ra-v3 [class*=sidebar-light] .nav-legacy.nav-sidebar > .nav-item > .nav-treeview { background-color: transparent; }

/* hover */
body.ra-v3 [class*=sidebar-light-] .nav-sidebar > .nav-item > .nav-link:hover,
body.ra-v3 .nav-sidebar .nav-treeview > .nav-item > .nav-link:hover {
  color: var(--ra-text);
  font-weight: var(--ra-fw-regular);
  background-color: var(--ra2-fill-hover);
}
body.ra-v3 [class*=sidebar-light-] .nav-sidebar .nav-link.active,
body.ra-v3 [class*=sidebar-light-] .nav-sidebar > .nav-item > .nav-link.active,
body.ra-v3 [class*=sidebar-light-] .nav-treeview > .nav-item > .nav-link.active,
body.ra-v3 [class*=sidebar-light-] .nav-treeview > .nav-item > .nav-link.active:hover {
  color: var(--ra-text);
  font-weight: var(--ra-fw-medium);
  background-color: var(--ra-green-100);
  border: 0;
  box-shadow: none;
}
body.ra-v3 .nav-sidebar .nav-link.active .nav-icon { color: var(--ra-primary-text); }

/* tree children: no bullet icons, text aligned with the parent label (Lark) */
body.ra-v3 .nav-sidebar.nav-child-indent .nav-treeview,
body.ra-v3.text-sm .nav-sidebar.nav-child-indent .nav-treeview { padding: 0; margin-bottom: var(--ra-space-1); }
body.ra-v3 .nav-sidebar .nav-treeview > .nav-item > .nav-link { padding-left: 48px; }
body.ra-v3 .nav-sidebar .nav-treeview .nav-icon { display: none; }
body.ra-v3 .nav-child-indent .nav-treeview .nav-treeview { padding-left: var(--ra-space-3); }

/* section labels */
body.ra-v3 .nav-sidebar .nav-header {
  margin-top: var(--ra-space-3);
  padding: var(--ra-space-2) var(--ra-space-4) var(--ra-space-1);
  font-size: var(--ra-fs-xs);
  font-weight: var(--ra-fw-semibold);
  letter-spacing: 0.06em;
  color: var(--ra-text-soft);
}

/* ---------- Collapsed (AdminLTE pushmenu → body.sidebar-collapse) -------- */
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar,
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar::before { width: var(--ra3-sidebar-w-mini); }
body.ra-v3.sidebar-mini.sidebar-collapse .nav-sidebar .nav-link { justify-content: center; padding: 0; }
body.ra-v3.sidebar-mini.sidebar-collapse .nav-sidebar .nav-icon { margin: 0; }
body.ra-v3.sidebar-mini.sidebar-collapse .nav-sidebar .nav-link p,
body.ra-v3.sidebar-mini.sidebar-collapse .nav-sidebar .nav-header { display: none; }
/* hover-expand (AdminLTE default, kept): back to the full layout */
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover,
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover::before {
  width: var(--ra3-sidebar-w);
  box-shadow: var(--ra-shadow-pop) !important; /* vendor !imp */
}
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover .nav-link {
  width: 100%;
  justify-content: flex-start;
  padding: 0 var(--ra-space-3) 0 var(--ra-space-4);
}
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover .nav-treeview > .nav-item > .nav-link { padding-left: 48px; }
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover .nav-icon { margin-right: var(--ra-space-3); }
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover .nav-link p { display: flex; flex: 1 1 auto; width: auto; margin-left: 0; }
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover .nav-header { display: block; }

/* ---------- Content: grey canvas, transparent workspace, white cards ---- */
body.ra-v3 .content-wrapper {
  display: block;
  min-height: 100vh;
  padding: calc(var(--ra2-header-h) + var(--ra2-gutter)) var(--ra-space-4) 0 0;
  margin-left: calc(var(--ra3-sidebar-w) + var(--ra2-gutter)) !important; /* vendor !imp */
}
body.ra-v3.sidebar-collapse .content-wrapper,
body.ra-v3.sidebar-collapse .main-footer { margin-left: calc(var(--ra3-sidebar-w-mini) + var(--ra2-gutter)) !important; } /* vendor !imp */
body.ra-v3:not(.login-page) .content-wrapper > .workspace {
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
body.ra-v3 .content-wrapper .container-fluid { padding-left: 0; padding-right: 0; }
body.ra-v3 .content-header { padding: var(--ra-space-2) var(--ra-space-1) var(--ra-space-3); }
body.ra-v3 .content-header .row { align-items: flex-end; }
body.ra-v3 .content-header h1,
body.ra-v3.text-sm .content-header h1 {
  margin: 0;
  font-size: var(--ra-fs-xl);
  font-weight: var(--ra-fw-semibold);
  color: var(--ra-text-heading);
}
body.ra-v3 .content-header .breadcrumb {
  padding: 0;
  margin: 0;
  font-size: var(--ra-fs-sm);
  background: none;
}
body.ra-v3 .breadcrumb-item + .breadcrumb-item::before { content: "\203A"; color: var(--ra-text-soft); }
body.ra-v3 .content-header .breadcrumb a { color: var(--ra-text-muted); }
body.ra-v3 .content-header .breadcrumb a:hover { color: var(--ra-primary-text); }
body.ra-v3 .breadcrumb-item.active { color: var(--ra-text); }

body.ra-v3 .content { padding: 0; }
body.ra-v3 .content .row { margin-left: calc(var(--ra2-gap) / -2); margin-right: calc(var(--ra2-gap) / -2); }
body.ra-v3 .content .row > [class*="col-"] { padding-left: calc(var(--ra2-gap) / 2); padding-right: calc(var(--ra2-gap) / 2); }

body.ra-v3 .card {
  margin-bottom: var(--ra2-gap);
  background: var(--ra-bg-surface);
  border: 0;
  border-radius: var(--ra2-radius-card);
  box-shadow: none;
}
body.ra-v3 .card-header {
  padding: 20px 20px 0;
  background: transparent;
  border-bottom: 0;
}
body.ra-v3 .card-header h5,
body.ra-v3 .card-header .card-title {
  font-size: var(--ra-fs-md);
  font-weight: var(--ra-fw-medium);
  color: var(--ra-text-heading);
}
body.ra-v3 .card-body { padding: 16px 20px 20px; }
body.ra-v3 .card > .card-body:first-child { padding-top: 20px; }
body.ra-v3 .card-title { font-size: var(--ra-fs-md); font-weight: var(--ra-fw-medium); }
body.ra-v3 .card-text { color: var(--ra-text-muted); }
body.ra-v3 .card-primary.card-outline { border-top: 0; }  /* V2 has no coloured top bars */

/* ---------- Footer ----------------------------------------------------- */
body.ra-v3 .main-footer {
  margin-left: calc(var(--ra3-sidebar-w) + var(--ra2-gutter)) !important; /* vendor !imp */
  padding: var(--ra-space-3) var(--ra-space-4) var(--ra-space-4) var(--ra-space-1);
  font-size: var(--ra-fs-sm);
  color: var(--ra-text-soft);
  border-top: 0;
}
body.ra-v3 .main-footer a { color: var(--ra-text-muted); }

/* ---------- V2 parity: brand, header extras, account ------------------- */
body.ra-v3 .main-header .navbar-brand { display: inline-flex; align-items: center; gap: var(--ra-space-2); padding: 0 var(--ra-space-2); }
body.ra-v3 .main-header .navbar-brand .brand-pin { margin-right: 2px; font-size: 16px; color: var(--ra-danger); }
body.ra-v3 .main-header .brand-text b { font-weight: inherit; color: var(--ra-brand); }
body.ra-v3 .main-header .navbar-brand .brand-by { font-size: var(--ra-fs-xs); color: var(--ra-text-soft); }
body.ra-v3 .main-header .navbar-nav .nav-link > i { font-size: 15px; }
/* FTrack convention (custom.css): the caret sits on `.dropdown-toggle > span::after` */
body.ra-v3 .main-header .dropdown-toggle > span::after { margin-left: 6px; vertical-align: 2px; border-width: 4px 4px 0; color: var(--ra-text-soft); }

/* empty .navbar-badge = notification dot (V2) */
body.ra-v3 .main-header .navbar-badge:empty {   /* Bootstrap hides .badge:empty */
  display: block;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
}

body.ra-v3 .main-header .nav-divider { width: 1px; height: 20px; margin: 0 var(--ra-space-2); background: var(--ra-border-strong); }

/* AdminLTE .user-menu → avatar + name + role badge */
body.ra-v3 .main-header .user-menu > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--ra-space-2);
  height: 44px;
  padding: 0 var(--ra-space-2) 0 var(--ra-space-1);
}
body.ra-v3 .main-header .user-menu .user-image {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  font-size: var(--ra-fs-sm);
  font-weight: var(--ra-fw-semibold);
  color: var(--ra-primary-on);
  background: var(--ra-brand);
}
body.ra-v3 .main-header .user-menu .user-meta { flex-direction: column; line-height: 1.2; text-align: left; }
body.ra-v3 .main-header .user-menu .user-name { font-size: var(--ra-fs-base); font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra-v3 .main-header .user-menu .user-role {
  align-self: flex-start;
  margin-top: 2px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: var(--ra-fw-regular);
  line-height: 16px;
  color: var(--ra-primary-text);
  background: var(--ra-primary-surface);
  border-radius: 4px;
}
body.ra-v3 .main-header .user-menu > .dropdown-toggle { position: relative; padding-right: 26px; }
body.ra-v3 .main-header .user-menu > .dropdown-toggle > .user-image::after { display: none; }
body.ra-v3 .main-header .user-menu > .dropdown-toggle > .user-meta::after {
  position: absolute;
  top: 50%;
  right: var(--ra-space-2);
  margin: -2px 0 0;
}

/* ☰ only on small screens when the sidebar has its own "Hide navigation" (V2) */
@media (min-width: 992px) {
  body.ra-v3:has(.sidebar-custom [data-widget="pushmenu"]) .main-header a.nav-bars { display: none; }
}

/* ---------- V2 parity: sidebar footer (AdminLTE .sidebar-custom) -------- */
body.ra-v3 .main-sidebar-custom { display: flex; flex-direction: column; }
body.ra-v3 .main-sidebar-custom .sidebar { flex: 1 1 auto; min-height: 0; height: auto; }
body.ra-v3 .main-sidebar .sidebar { padding-top: var(--ra-space-3); }
body.ra-v3 .sidebar-custom {
  flex: none;
  height: auto;
  margin-right: var(--ra-space-2);
  padding: var(--ra-space-2) 0;
  border-top: 1px solid var(--ra-border-strong);
}
body.ra-v3 .sidebar-custom .nav-link {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--ra-space-3) 0 var(--ra-space-4);
  color: var(--ra-text-muted);
  border-radius: var(--ra-radius);
}
body.ra-v3 .sidebar-custom .nav-link:hover { color: var(--ra-text); background: var(--ra2-fill-hover); }
body.ra-v3 .sidebar-custom .nav-link p { margin: 0; font-size: var(--ra-fs-base); white-space: nowrap; }
body.ra-v3 .sidebar-custom .nav-icon {
  width: 20px;
  margin-right: var(--ra-space-3);
  font-size: 16px;
  text-align: center;
  transition: transform var(--ra-dur) var(--ra-ease);
}
body.ra-v3.sidebar-mini.sidebar-collapse .sidebar-custom { margin-right: 0; }
body.ra-v3.sidebar-mini.sidebar-collapse .sidebar-custom .nav-link { justify-content: center; padding: 0; }
body.ra-v3.sidebar-mini.sidebar-collapse .sidebar-custom .nav-link p { display: none; }
body.ra-v3.sidebar-mini.sidebar-collapse .sidebar-custom .nav-icon { margin: 0; transform: rotate(180deg); }
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover .sidebar-custom .nav-link { justify-content: flex-start; padding: 0 var(--ra-space-3) 0 var(--ra-space-4); }
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover .sidebar-custom .nav-link p { display: block; }
body.ra-v3.sidebar-mini.sidebar-collapse .main-sidebar:not(.sidebar-no-expand):hover .sidebar-custom .nav-icon { margin-right: var(--ra-space-3); }

/* count pills (V2 .ra2-nav__count) */
body.ra-v3 .nav-sidebar .nav-link p > .badge.right { min-width: 22px; text-align: center; }

/* ---------- V2 parity: page head = breadcrumb above title, tools right -- */
body.ra-v3 .content-header .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "crumb tools" "title tools";
  align-items: end;
  column-gap: var(--ra-space-4);
  margin: 0 !important;   /* vendor !imp (.mb-2) */
}
body.ra-v3 .content-header .row > [class*="col-"] { max-width: none; padding: 0; }
body.ra-v3 .content-header .row > :nth-child(1) { grid-area: title; }
body.ra-v3 .content-header .row > :nth-child(2) { grid-area: crumb; }
body.ra-v3 .content-header .row > :nth-child(n+3) { grid-area: tools; }
body.ra-v3 .content-header .breadcrumb { float: none !important; margin-bottom: 2px; } /* vendor !imp (.float-sm-right) */
body.ra-v3 .content-header .breadcrumb-item + .breadcrumb-item { padding-left: 6px; }
body.ra-v3 .content-header .breadcrumb-item + .breadcrumb-item::before { padding-right: 6px; }
body.ra-v3 .content-header h1,
body.ra-v3.text-sm .content-header h1 { font-weight: var(--ra-fw-medium); }

body.ra-v3 .content-header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ra-space-3);
  font-size: var(--ra-fs-sm);
}
body.ra-v3 .content-header-tools .text-muted { color: var(--ra-text-muted) !important; } /* vendor !imp */
body.ra-v3 .content-header .content-header-tools .btn { font-size: var(--ra-fs-sm) !important; } /* vendor !imp (.text-sm .btn) */
body.ra-v3 .content-header .content-header-tools .btn > .fas { color: var(--ra-text-muted); }
body.ra-v3 .badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px var(--ra-space-2);
  font-size: var(--ra-fs-sm);
  font-weight: var(--ra-fw-regular);
  color: var(--ra-text);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border-strong);
}
body.ra-v3 .badge-status > .fa-circle { font-size: 6px; color: var(--ra-primary); }
body.ra-v3 .btn-default {
  color: var(--ra-text);
  background: var(--ra-bg-surface);
  border-color: var(--ra-border-strong);
}
body.ra-v3 .btn-default:hover { background: var(--ra-bg-subtle); }
body.ra-v3 .btn-sm,
body.ra-v3.text-sm .btn-sm { height: 26px; padding: 0 var(--ra-space-2); font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-regular); line-height: 24px; }
body.ra-v3 .btn > .fas { margin-right: 4px; }

/* ---------- V2 parity: cards ------------------------------------------ */
body.ra-v3 .card { padding: 0; }
body.ra-v3 .card-header { padding: 20px 20px 0; }
body.ra-v3 .card-header::after { display: none; }
body.ra-v3 .card-header .card-title { float: none; margin: 0; }
body.ra-v3 .card-header .card-title > .fas { margin-left: 4px; font-size: 11px; color: var(--ra-text-soft); }
body.ra-v3 .card-body,
body.ra-v3 .card > .card-body:first-child { padding: 16px 20px 16px; }
body.ra-v3 .card > .card-body:first-child { padding-top: 20px; }

/* ---------- V3 responsive --------------------------------------------- */
@media (max-width: 991.98px) {
  /* AdminLTE: sidebar becomes off-canvas; body.sidebar-open shows it */
  body.ra-v3 .content-wrapper,
  body.ra-v3 .main-footer,
  body.ra-v3.sidebar-collapse .content-wrapper,
  body.ra-v3.sidebar-collapse .main-footer { margin-left: 0 !important; padding-left: var(--ra-space-3); } /* vendor !imp */
  body.ra-v3 .content-wrapper { padding-right: var(--ra-space-3); }
  body.ra-v3 .main-sidebar,
  body.ra-v3 .main-sidebar::before { margin-left: calc(var(--ra3-sidebar-w) * -1); }
  body.ra-v3.sidebar-open .main-sidebar,
  body.ra-v3.sidebar-open .main-sidebar::before { margin-left: 0; box-shadow: var(--ra-shadow-pop) !important; } /* vendor !imp */
  body.ra-v3.sidebar-collapse .main-sidebar { width: var(--ra3-sidebar-w); }
  body.ra-v3 .main-header .navbar-brand { margin-right: var(--ra-space-2); }
}
@media (prefers-reduced-motion: reduce) {
  body.ra-v3 .content-wrapper, body.ra-v3 .nav-sidebar .nav-link p > .right { transition: none; }
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .ra-brand__by { display: none; }
  .ra-hide-md { display: none; }
}

@media (max-width: 860px) {
  .ra-hide-sm { display: none; }
}

/* V1 below Bootstrap's lg: the sidebar is a Bootstrap offcanvas (.offcanvas-lg) */
@media (max-width: 991.98px) {
  body.ra--v1 .ra-sidebar,
  body.ra--v1 .ra-app.is-collapsed .ra-sidebar {
    --bs-offcanvas-width: 280px;
    z-index: 1045;                       /* above Bootstrap's backdrop (1040) */
    width: var(--bs-offcanvas-width);
  }
  body.ra--v1 .ra-sidebar .offcanvas-header {
    height: 56px;
    padding: 0 var(--ra-space-3) 0 var(--ra-space-4);
    border-bottom: 1px solid var(--ra-border);
  }

  /* the drawer always shows full labels, even if the desktop rail is collapsed */
  body.ra--v1 .ra-app.is-collapsed .ra-nav__label,
  body.ra--v1 .ra-app.is-collapsed .ra-nav__count { display: initial; }
  body.ra--v1 .ra-app.is-collapsed .ra-nav__section {
    height: auto; margin: var(--ra-space-5) 0 var(--ra-space-1);
    padding: 0 var(--ra-space-4); color: var(--ra-text-soft); background: none;
  }
  body.ra.ra--v1 .ra-app.is-collapsed .ra-nav__link { justify-content: flex-start; padding: 0 var(--ra-space-4) 0 5px; }

  body.ra--v1 .ra-topbar,
  body.ra--v1 .ra-app.is-collapsed .ra-topbar { left: 0; padding-left: var(--ra-space-2); }
  body.ra--v1 .ra-main,
  body.ra--v1 .ra-app.is-collapsed .ra-main { margin-left: 0; }
  body.ra--v1 .ra-pagehead { padding: var(--ra-space-4) var(--ra-space-4) var(--ra-space-3); }
  body.ra--v1 .ra-content { padding: 0 var(--ra-space-4) var(--ra-space-5); }
}

@media (prefers-reduced-motion: reduce) {
  .ra-sidebar, .ra-main, .ra-sidebar__collapse .ra-nav__icon { transition: none; }
}


/* ==========================================================================
   LAYER 5 — UTILITIES
   ========================================================================== */
.ra-text-muted { color: var(--ra-text-muted); }
.ra-ml-auto    { margin-left: auto; }

/* ---------- Media (Report → Media): photo grid, rows by visit, viewer ----------
   .ra-media         grid of photo tiles: 6 per row from 1200px, 4 / 3 / 2 below
   .ra-media--row    the photos of one visit (inside .ra-shotrow)
   .ra-media__photo  the picture — a button that opens the viewer; 4:3, cropped
   .ra-media__type   photo type on the picture (bottom-left) · .ra-media__ai  AI result (top-right)
   .ra-shotrows      "By visit": who / where / when once, then that visit's photos
   .ra-viewer        the photo viewer modal: stage (light / dark with the theme) + strip of the visit's photos, facts on the right */
body.ra--v1 .ra-media { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 0; padding: var(--ra-space-4); list-style: none; }
body.ra--v1 .ra-media__item { min-width: 0; }
body.ra--v1 .ra-media__photo { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; background: var(--ra-bg-subtle); border: 0; border-radius: var(--ra1-r-lg); box-shadow: 0 0 0 1px var(--ra1-card-border); cursor: zoom-in; }
html[data-ra-theme="dark"] body.ra--v1 .ra-media__photo { background: #1d211c; }
body.ra--v1 .ra-media__photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
body.ra--v1 .ra-media__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 45%); pointer-events: none; }
body.ra--v1 .ra-media__photo:hover img { transform: scale(1.04); }
body.ra--v1 .ra-media__photo:hover { box-shadow: 0 0 0 2px var(--ra-brand), 0 6px 16px rgba(0, 0, 0, .18); }
body.ra--v1 .ra-media__photo:focus-visible { outline: 2px solid var(--ra-brand); outline-offset: 2px; }
body.ra--v1 .ra-media__type { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 8px; overflow: hidden; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); text-align: left; text-overflow: ellipsis; white-space: nowrap; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
body.ra--v1 .ra-media__ai { position: absolute; z-index: 1; top: 8px; right: 8px; padding: 2px 7px; font-size: 11px; font-weight: var(--ra-fw-semibold); color: #fff; background: #2f8a1f; border-radius: 999px; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
body.ra--v1 .ra-media__ai--fail { background: #d92027; }
body.ra--v1 .ra-media__cap { display: flex; flex-direction: column; gap: 1px; padding: 8px 2px 0; min-width: 0; }
body.ra--v1 .ra-media__store { overflow: hidden; font-weight: var(--ra-fw-medium); text-overflow: ellipsis; white-space: nowrap; color: var(--ra-text); }
body.ra--v1 .ra-media__meta { overflow: hidden; font-size: var(--ra-fs-xs); text-overflow: ellipsis; white-space: nowrap; color: var(--ra-text-muted); }
/* By visit */
body.ra--v1 .ra-shotrows { margin: 0; padding: 0; list-style: none; }
body.ra--v1 .ra-shotrow { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--ra-space-4); padding: var(--ra-space-4); border-top: 1px solid var(--ra1-card-border); }
body.ra--v1 .ra-shotrow:first-child { border-top: 0; }
body.ra--v1 .ra-shotrow__who { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
body.ra--v1 .ra-shotrow__store { font-size: 15px; font-weight: var(--ra-fw-semibold); color: var(--ra-text); text-decoration: none; }
body.ra--v1 .ra-shotrow__store:hover { color: var(--ra-link); text-decoration: underline; }
body.ra--v1 .ra-shotrow__line { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-shotrow .ra-state { margin-top: 4px; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-shotrow__count { margin-top: auto; padding-top: 6px; font-size: var(--ra-fs-xs); color: var(--ra-text-soft); }
body.ra--v1 .ra-media--row { padding: 0; gap: 10px; }
@media (max-width: 1199.98px) {
  body.ra--v1 .ra-media { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.ra--v1 .ra-shotrow { grid-template-columns: minmax(0, 1fr); gap: var(--ra-space-3); }
  body.ra--v1 .ra-shotrow__count { display: none; }
}
@media (max-width: 767.98px) { body.ra--v1 .ra-media { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: var(--ra-space-3); } body.ra--v1 .ra-media--row { padding: 0; } }
@media (max-width: 575.98px) { body.ra--v1 .ra-media { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- .ra-hscroll — one row that scrolls sideways, ‹ › to page through ----------
   For a row that can be longer than its card (Media → By visit: a visit with MORE than 6 photos):
   <div class="ra-hscroll" data-ra-hscroll>
     <button class="ra-hscroll__btn ra-hscroll__btn--prev" data-ra-hscroll-btn="prev" aria-label="Previous …">
     <ul class="ra-media ra-media--row ra-hscroll__track"> … </ul>
     <button class="ra-hscroll__btn ra-hscroll__btn--next" data-ra-hscroll-btn="next" aria-label="Next …">
   </div>
   The track shows as many photos as the grid (6 · 4 · 3 by width, like a plain row) and scrolls by swipe, trackpad,
   shift + wheel, snapping to a photo; ‹ › scroll one screen and show only when there is more that way
   (can-left / can-right, RA.hscroll in aisle-main.js). A row of 6 or fewer stays a plain .ra-media--row. */
body.ra--v1 .ra-hscroll { --ra-hs-n: 6; --ra-hs-gap: 10px; position: relative; min-width: 0; }
/* .ra-hscroll in the selector: wins over the .ra-media--row column counts further down (mobile: 3 per row) */
body.ra--v1 .ra-hscroll .ra-hscroll__track {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--ra-hs-n) - 1) * var(--ra-hs-gap)) / var(--ra-hs-n));
  gap: var(--ra-hs-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* the side that has more fades out (can-left / can-right set --ra-hs-fl / --ra-hs-fr) */
  -webkit-mask-image: linear-gradient(to right, transparent 0, black var(--ra-hs-fl), black calc(100% - var(--ra-hs-fr)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black var(--ra-hs-fl), black calc(100% - var(--ra-hs-fr)), transparent 100%);
}
body.ra--v1 .ra-hscroll { --ra-hs-fl: 0px; --ra-hs-fr: 0px; }
body.ra--v1 .ra-hscroll.can-left  { --ra-hs-fl: 28px; }
body.ra--v1 .ra-hscroll.can-right { --ra-hs-fr: 28px; }
body.ra--v1 .ra-hscroll .ra-hscroll__track::-webkit-scrollbar { display: none; }
body.ra--v1 .ra-hscroll .ra-hscroll__track > * { scroll-snap-align: start; }
body.ra--v1 .ra-hscroll__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 12px;
  color: var(--ra-text);
  background: var(--ra-bg-surface);
  border: 1px solid var(--ra-border-strong);
  border-radius: 50%;
  box-shadow: var(--ra-shadow-pop);
  transform: translateY(-50%) scale(0.85);
  opacity: 0;
  visibility: hidden;   /* hidden = not focusable either */
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s, background-color .15s ease;
  cursor: pointer;
}
body.ra--v1 .ra-hscroll__btn:hover { background: var(--ra-green-050); border-color: var(--ra-primary-text); }
body.ra--v1 .ra-hscroll__btn:active { transform: translateY(-50%) scale(0.92); }
body.ra--v1 .ra-hscroll__btn:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: 2px; }
body.ra--v1 .ra-hscroll__btn--prev { left: 6px; }
body.ra--v1 .ra-hscroll__btn--next { right: 6px; }
body.ra--v1 .ra-hscroll.can-left  .ra-hscroll__btn--prev,
body.ra--v1 .ra-hscroll.can-right .ra-hscroll__btn--next {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
  transition: opacity .2s ease, transform .2s ease, visibility 0s, background-color .15s ease;
}
/* as many per screen as a plain row of the same width: 4 below xl, 3 below md (gap 6px on phones) */
@media (max-width: 1199.98px) { body.ra--v1 .ra-hscroll { --ra-hs-n: 4; } }
@media (max-width: 767.98px)  { body.ra--v1 .ra-hscroll { --ra-hs-n: 3; } }
@media (max-width: 575.98px)  { body.ra--v1 .ra-hscroll { --ra-hs-gap: 6px; } }
@media (prefers-reduced-motion: reduce) {
  body.ra--v1 .ra-hscroll .ra-hscroll__track { scroll-behavior: auto; }
  body.ra--v1 .ra-hscroll__btn { transition-duration: .1s; }   /* shorter, still not a hard cut */
}
/* Viewer */
body.ra--v1 .ra-viewer .modal-dialog { max-width: min(1240px, calc(100vw - 32px)); }
body.ra--v1 .ra-viewer .modal-content { display: grid; grid-template-columns: minmax(0, 1fr) 320px; overflow: hidden; border: 0; }
body.ra--v1 .ra-viewer__stage { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: min(72vh, 680px); background: var(--ra-bg-subtle); }
html[data-ra-theme="dark"] body.ra--v1 .ra-viewer__stage { background: #111410; }
body.ra--v1 .ra-viewer__img { display: block; width: 100%; height: auto; max-height: calc(min(72vh, 680px) - 84px); margin: auto; object-fit: contain; }
body.ra--v1 .ra-viewer__video { display: block; width: 100%; height: auto; max-height: calc(min(72vh, 680px) - 84px); margin: auto; background: #000; object-fit: contain; }
body.ra--v1 .ra-viewer__img[hidden],
body.ra--v1 .ra-viewer__video[hidden] { display: none; }
body.ra--v1 .ra-viewer__nav { position: absolute; top: calc(50% - 42px); display: grid; place-items: center; width: 44px; height: 44px; color: #fff; background: rgba(0, 0, 0, .45); border: 0; border-radius: 50%; transform: translateY(-50%); }
body.ra--v1 .ra-viewer__nav:hover { background: rgba(0, 0, 0, .7); }
body.ra--v1 .ra-viewer__nav:focus-visible { outline: 2px solid var(--ra-brand); outline-offset: 2px; }
body.ra--v1 .ra-viewer__nav:disabled { opacity: .25; }
/* one photo: both steps disabled → hide them instead of showing two dead buttons */
body.ra--v1 .ra-viewer__stage:has(.ra-viewer__nav--prev:disabled):has(.ra-viewer__nav--next:disabled) .ra-viewer__nav { display: none; }
body.ra--v1 .ra-viewer__nav--prev { left: 14px; }
body.ra--v1 .ra-viewer__nav--next { right: 14px; }
body.ra--v1 .ra-viewer__count { position: absolute; top: 12px; right: 14px; padding: 2px 10px; font-size: var(--ra-fs-xs); font-variant-numeric: tabular-nums; color: #fff; background: rgba(0, 0, 0, .5); border-radius: 999px; }
body.ra--v1 .ra-viewer__strip { display: flex; gap: 6px; justify-content: center; margin: 0; padding: 12px; overflow-x: auto; list-style: none; background: rgba(0, 0, 0, .04); }
html[data-ra-theme="dark"] body.ra--v1 .ra-viewer__strip { background: rgba(255, 255, 255, .04); }
body.ra--v1 .ra-viewer__thumb { flex: none; display: block; width: 72px; padding: 0; overflow: hidden; background: none; border: 2px solid transparent; border-radius: var(--ra1-r); opacity: .55; }
body.ra--v1 .ra-viewer__thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
body.ra--v1 .ra-viewer__thumb { position: relative; }
body.ra--v1 .ra-viewer__play,
body.ra--v1 .ra-media__play { position: absolute; z-index: 1; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 50%; pointer-events: none; }
body.ra--v1 .ra-viewer__play { top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 9px; }
body.ra--v1 .ra-media__play { top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; font-size: 14px; padding-left: 2px; }
body.ra--v1 .ra-visitphotos .ra-media__play { width: 28px; height: 28px; margin: -14px 0 0 -14px; font-size: 11px; }
body.ra--v1 .ra-media__photo:hover .ra-media__play { background: var(--ra-brand); }
body.ra--v1 .ra-viewer__thumb:hover { opacity: .9; }
body.ra--v1 .ra-viewer__thumb[aria-current="true"] { border-color: var(--ra-brand); opacity: 1; }
body.ra--v1 .ra-viewer__side { display: flex; flex-direction: column; gap: var(--ra-space-4); min-width: 0; padding: 18px 20px 20px; background: var(--ra-bg-surface); }
body.ra--v1 .ra-viewer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ra-space-3); }
body.ra--v1 .ra-viewer__kind { display: inline-block; margin-bottom: 4px; padding: 1px 8px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); border-radius: 999px; }
body.ra--v1 .ra-viewer__title { margin: 0; font-size: 18px; font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-viewer__sub { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-viewer__ai { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; font-size: var(--ra-fs-sm); color: var(--ra-text); background: var(--ra-bg-hover); border-radius: var(--ra1-r); }
body.ra--v1 .ra-viewer__ai[hidden] { display: none; }
body.ra--v1 .ra-viewer__aimark { flex: none; padding: 1px 7px; font-size: 11px; font-weight: var(--ra-fw-semibold); color: #fff; background: #2f8a1f; border-radius: 999px; }
body.ra--v1 .ra-viewer__aimark.is-fail { background: #d92027; }
body.ra--v1 .ra-viewer__facts { display: grid; grid-template-columns: 96px 1fr; gap: 8px var(--ra-space-3); margin: 0; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-viewer__facts dt { font-weight: var(--ra-fw-regular); color: var(--ra-text-muted); }
body.ra--v1 .ra-viewer__facts dd { margin: 0; font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .ra-viewer__actions { display: flex; flex-wrap: wrap; gap: var(--ra-space-2); margin-top: auto; padding-top: var(--ra-space-3); border-top: 1px solid var(--ra1-card-border); }
@media (max-width: 991.98px) {
  body.ra--v1 .ra-viewer .modal-content { grid-template-columns: minmax(0, 1fr); }
  body.ra--v1 .ra-viewer__stage { min-height: 0; }
}

/* ---------- Maps (project → Map): Leaflet map, pins, legend, route ----------
   .ra-map         the map (Leaflet fills it); inside a card under its header; lg+ it fills
                   the rest of the viewport (see "map page is a flex column" below)
   .ra-map--card   a small fixed-height map in a page card (e.g. the outlet's location)
   .ra-pin         a point: --ok done · --fail failed · --none not visited (hollow)
                   --n numbered stop of a route · --cluster several points grouped
   .ra-maplegend   what the pins mean + counts, on the right of the card header
   .ra-mapsplit    list on the left, map on the right (stacked below lg)
   .ra-route       stops of one day in time order; a stop shows itself on the map
   Pin colours are fixed (not themed) so they read on the light and the dark base map.   */
body.ra--v1 .ra-map { position: relative; z-index: 0; isolation: isolate; height: clamp(420px, calc(100vh - 330px), 900px); font-family: inherit; font-size: var(--ra-fs-sm); background: var(--ra-bg-hover); border-radius: 0 0 calc(var(--ra1-r-lg) - 1px) calc(var(--ra1-r-lg) - 1px); }
body.ra--v1 .ra-map--card { height: 320px; }
body.ra--v1 .card-body .ra-map--card { height: 260px; border-radius: var(--ra1-r); }
body.ra--v1 .ra-pinwrap { display: grid; place-items: center; }
/* one set of map colours for every map (stores, visits, route): */
body.ra--v1 { --ra-map-ok: #3d8f26; --ra-map-ok-ring: rgba(61, 143, 38, 0.32); --ra-map-fail: #d92027; }
body.ra--v1 .ra-pin { flex: none; display: inline-grid; place-items: center; box-sizing: border-box; width: 16px; height: 16px; font-size: 11px; font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; line-height: 1; color: #fff; background: #7d858c; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
body.ra--v1 .ra-pin--ok { background: var(--ra-map-ok); }
body.ra--v1 .ra-pin--fail { background: var(--ra-map-fail); }
body.ra--v1 .ra-pin--none { background: #fff; border-color: #4a5258; }
body.ra--v1 .ra-pin--n { width: 26px; height: 26px; font-size: 12px; }
body.ra--v1 .ra-pin--cluster { width: 36px; height: 36px; font-size: 13px; background: var(--ra-map-ok); border-width: 3px; box-shadow: 0 0 0 4px var(--ra-map-ok-ring), 0 1px 4px rgba(0, 0, 0, 0.4); }
body.ra--v1 .ra-maplegend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--ra-space-4); margin: 0; padding: 0; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); list-style: none; }
body.ra--v1 .ra-maplegend li { display: inline-flex; align-items: center; gap: 6px; }
body.ra--v1 .ra-maplegend b { font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-maplegend .ra-pin--cluster, body.ra--v1 .ra-maplegend .ra-pin--n { width: 20px; height: 20px; font-size: 10px; border-width: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
/* Vietnam's archipelagos (Hoàng Sa, Trường Sa): flag + permanent label on every map */
body.ra--v1 .ra-mapflag svg { display: block; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
body.ra--v1 .ra-map .ra-maplabel { padding: 1px 6px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-text); background: var(--ra-bg-surface); border: 1px solid var(--ra-border); border-radius: 4px; box-shadow: none; }
body.ra--v1 .ra-map .ra-maplabel::before { display: none; }
/* full screen button (under the zoom buttons) + the map in full screen */
body.ra--v1 .ra-mapfs a { display: grid; place-items: center; font-size: 13px; color: var(--ra-text); }
body.ra--v1 .ra-map:fullscreen { border-radius: 0; }
body.ra--v1 .ra-map.is-fullscreen { position: fixed; inset: 0; z-index: 1090; height: auto; min-height: 0; border-radius: 0; }
body.ra-mapfs-open { overflow: hidden; }
/* Leaflet popup + controls on the RetailActive surface */
body.ra--v1 .ra-map .leaflet-popup-content-wrapper { color: var(--ra-text); background: var(--ra-bg-surface); border-radius: var(--ra1-r-lg); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
body.ra--v1 .ra-map .leaflet-popup-tip { background: var(--ra-bg-surface); }
body.ra--v1 .ra-map .leaflet-popup-content { margin: 12px 14px; font-size: var(--ra-fs-sm); line-height: 1.45; }
body.ra--v1 .ra-map .leaflet-popup-content a { color: var(--ra-link); }
body.ra--v1 .ra-map a.leaflet-popup-close-button { color: var(--ra-text-muted); }
body.ra--v1 .ra-mappop__title { display: block; margin-bottom: 2px; font-size: var(--ra-fs-base, 14px); font-weight: var(--ra-fw-semibold); color: var(--ra-text); }
body.ra--v1 .ra-mappop__line { display: block; color: var(--ra-text-muted); }
body.ra--v1 .ra-mappop__link { display: inline-block; margin-top: 6px; font-weight: var(--ra-fw-medium); }
/* Route: list + map */
body.ra--v1 .ra-mapsplit { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--ra-space-3); align-items: start; }
body.ra--v1 .ra-mapsplit__side { max-height: calc(clamp(420px, calc(100vh - 330px), 900px) + 50px); overflow-y: auto; }
body.ra--v1 .ra-routefacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ra-space-3); margin: 0; padding: var(--ra-space-3) var(--ra-space-4); border-bottom: 1px solid var(--ra1-card-border); }
body.ra--v1 .ra-routefacts dt { font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-medium); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ra-text-soft); }
body.ra--v1 .ra-routefacts dd { margin: 0; font-size: 18px; font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-route .list-group-item { padding: 0; }
body.ra--v1 .ra-route__stop { display: flex; align-items: center; gap: var(--ra-space-3); width: 100%; padding: 10px var(--ra-space-4); text-align: left; color: inherit; background: none; border: 0; }
body.ra--v1 .ra-route__stop:hover, body.ra--v1 .ra-route__stop.is-active { background: var(--ra-bg-hover); }
body.ra--v1 .ra-route__stop:focus-visible { outline: 2px solid var(--ra-brand); outline-offset: -2px; }
body.ra--v1 .ra-route__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
body.ra--v1 .ra-route__store { overflow: hidden; font-weight: var(--ra-fw-medium); text-overflow: ellipsis; white-space: nowrap; color: var(--ra-text); }
body.ra--v1 .ra-route__meta { font-size: var(--ra-fs-xs); color: var(--ra-text-muted); }
body.ra--v1 .ra-route__gap { flex: none; font-size: var(--ra-fs-xs); font-variant-numeric: tabular-nums; color: var(--ra-text-soft); }
@media (max-width: 991.98px) {
  body.ra--v1 .ra-mapsplit { grid-template-columns: minmax(0, 1fr); }
  body.ra--v1 .ra-mapsplit__side { order: 2; max-height: none; }
  body.ra--v1 .ra-map { height: clamp(360px, 60vh, 640px); }
}
/* lg+: a map page is a flex column — page head, tabs and filters keep their own
   height, the map (or the list + map of a route) takes the rest of the viewport;
   too short a viewport → the map keeps 420px and the page scrolls.
   No :has() → the clamp() heights above. Leaflet re-measures itself (ResizeObserver). */
@supports selector(:has(*)) {
  @media (min-width: 992px) {
    body.ra--v1 .ra-main:has(.ra-map:not(.ra-map--card)) { display: flex; flex-direction: column; }
    body.ra--v1 .ra-main:has(.ra-map:not(.ra-map--card)) > *,
    body.ra--v1 .ra-main:has(.ra-map:not(.ra-map--card)) > .ra-content > * { flex-shrink: 0; }
    body.ra--v1 .ra-main:has(.ra-map:not(.ra-map--card)) > .ra-content { flex: 1 1 auto; display: flex; flex-direction: column; }
    body.ra--v1 .ra-main > .ra-content > :has(.ra-map:not(.ra-map--card)) { flex: 1 1 auto; min-height: 0; }
    body.ra--v1 .card:has(> .ra-map:not(.ra-map--card)) { display: flex; flex-direction: column; }
    body.ra--v1 .card > .ra-map:not(.ra-map--card) { flex: 1 1 auto; height: auto; min-height: 420px; }
    /* route: the list adds no height to the row — as tall as the map, scrolls inside */
    body.ra--v1 .ra-mapsplit:has(.ra-map:not(.ra-map--card)) { align-items: stretch; }
    body.ra--v1 .ra-mapsplit:has(.ra-map:not(.ra-map--card)) > .ra-mapsplit__side { max-height: none; contain: size; overflow-y: auto; }
  }
}

/* ---------- Export (project → Export): catalogue + filters + history ----------
   .ra-exportlayout   report list on the left, the chosen report on the right (stacked below lg)
   .ra-reportlist     reports grouped by area; each is a radio styled as a row (name + what is in it)
   .ra-exportpanel    one per report (data-ra-case): title, "one row = …", its own filters
   .ra-exportbar      card footer: rows that match · Reset · Export (the one primary action)  */
body.ra--v1 .ra-exportlayout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--ra-space-3); align-items: start; }
body.ra--v1 .ra-exportlayout__main { display: grid; gap: var(--ra-space-3); min-width: 0; }
body.ra--v1 .ra-reportlist { position: sticky; top: calc(var(--ra-topbar-h, 56px) + var(--ra-space-3)); }
body.ra--v1 .ra-reportlist__list { margin: 0; padding: 4px 8px 8px; list-style: none; }
body.ra--v1 .ra-reportlist__group { padding: 14px 10px 4px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-medium); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ra-text-soft); }
body.ra--v1 .ra-reportlist__item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: var(--ra1-r); cursor: pointer; }
body.ra--v1 .ra-reportlist__item:hover { background: var(--ra-bg-hover); }
body.ra--v1 .ra-reportlist__icon { flex: none; width: 16px; font-size: 13px; text-align: center; color: var(--ra-text-soft); }
body.ra--v1 .ra-reportlist__name { overflow: hidden; font-weight: var(--ra-fw-medium); text-overflow: ellipsis; white-space: nowrap; color: var(--ra-text); }
body.ra--v1 .ra-reportlist__radio:checked + .ra-reportlist__item .ra-reportlist__icon { color: var(--ra-active-text); }
body.ra--v1 .ra-reportlist__radio:checked + .ra-reportlist__item { background: var(--ra-green-100); }
body.ra--v1 .ra-reportlist__radio:checked + .ra-reportlist__item .ra-reportlist__name { color: var(--ra-active-text); font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-reportlist__radio:focus-visible + .ra-reportlist__item { outline: 2px solid var(--ra-brand); outline-offset: 1px; }
body.ra--v1 .ra-exportpanel .card-header { align-items: flex-start; gap: var(--ra-space-3); height: auto; min-height: 0; padding-top: 14px; padding-bottom: 14px; }
body.ra--v1 .ra-exportpanel__lead { margin: 2px 0 0; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-exportfilters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2); }
body.ra--v1 .ra-exportfilters--more { margin-top: var(--ra-space-2); padding-top: var(--ra-space-3); border-top: 1px dashed var(--ra1-card-border); }
body.ra--v1 .ra-exportbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2); }
body.ra--v1 .ra-exportbar__count { margin-right: auto; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-exportbar__count b { font-size: 16px; font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; color: var(--ra-text); }
@media (max-width: 991.98px) {
  body.ra--v1 .ra-exportlayout { grid-template-columns: minmax(0, 1fr); }
  body.ra--v1 .ra-reportlist { position: static; }
  body.ra--v1 .ra-reportlist__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px var(--ra-space-2); }
  body.ra--v1 .ra-reportlist__group { grid-column: 1 / -1; }
}
body.ra--v1 .ra-mediahead { flex-wrap: wrap; gap: var(--ra-space-2) var(--ra-space-3); height: auto; min-height: 0; padding-top: 12px; padding-bottom: 12px; }
body.ra--v1 .ra-mediahead .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  body.ra--v1 .ra-media--row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  body.ra--v1 .ra-media--row .ra-media__type { left: 6px; right: 6px; bottom: 4px; font-size: 11px; }
}

/* ---------- Filter params box (DESIGN VIEW ONLY — added by RA.showFilterParams) ----------
   Read-only line under a filter bar with the params the filters would send.
   Dashed like .ra-preview: it is a review aid, not part of the product.   */
body.ra--v1 .ra-params { display: flex; align-items: flex-start; gap: var(--ra-space-2); margin: calc(var(--ra-space-1, 4px) * -1) 0 var(--ra-space-3); padding: 6px 8px 6px 10px; border: 1px dashed var(--ra-border-strong); border-radius: var(--ra1-r); }
body.ra--v1 .ra-exportpanel .ra-params { margin: var(--ra-space-3) 0 0; }
body.ra--v1 .ra-params__label { flex: none; display: inline-flex; min-height: 28px; align-items: center; gap: 6px; margin: 0; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-params__tag { padding: 0 6px; font-size: 10px; letter-spacing: .03em; text-transform: uppercase; color: var(--ra-text-soft); border: 1px solid var(--ra-border); border-radius: 999px; }
body.ra--v1 .ra-params__input { flex: 1; min-width: 0; min-height: 28px; padding: 2px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--ra-text); line-height: 1.6; word-break: break-all; resize: none; overflow: hidden; background: var(--ra-bg-hover); border-color: transparent; }
body.ra--v1 .ra-params__input:focus { background: var(--ra-bg-surface); }
@media (max-width: 575.98px) {
  body.ra--v1 .ra-params { flex-wrap: wrap; }
  body.ra--v1 .ra-params__input { flex-basis: 100%; }
}

/* ---------- Account role (user menu) + filters locked by the role ----------
   .ra-usermenu__role   line under the user's name: role code · role name · data scope
   [data-ra-locked]     a filter fixed by the user's role (an RSM sees one region…):
                        the button cannot open, a lock replaces the caret, Reset leaves it */
body.ra--v1 .ra-usermenu__role { display: flex; align-items: center; gap: var(--ra-space-2); max-width: 260px; padding-top: 0; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); white-space: normal; }
body.ra--v1 .ra-usermenu__code { flex: none; padding: 1px 6px; font-size: 11px; font-weight: var(--ra-fw-semibold); letter-spacing: .03em; color: var(--ra-active-text); background: var(--ra-green-050); border: 1px solid var(--ra-green-300); border-radius: 999px; }
body.ra--v1 [data-ra-locked] > .btn { pointer-events: none; }
body.ra--v1 [data-ra-locked] > .btn.dropdown-toggle::after { display: none; }
body.ra--v1 [data-ra-locked] > .btn .ra-lock { margin-left: 2px; font-size: 11px; color: var(--ra-text-soft); }
body.ra--v1 .ra-filters [data-ra-locked] > .btn { background: var(--ra-bg-hover); }

/* ---------- Loading (RA.loading in aisle-main.js) ----------
   .ra-pageload           thin bar on top while the next page loads
   .ra-loading--cover     covers a busy card / table (.ra-loading-host) or, with
                          --page, the whole window: spinner + text in a box
   .ra-loading--block     spinner + text in an empty view (a page still loading)
   .btn.is-loading        a button whose task runs: spinner + "Exporting…", disabled */
.ra-pageload { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; height: 3px; overflow: hidden; background: var(--ra-green-100); pointer-events: none; }
.ra-pageload[hidden] { display: none; }
.ra-pageload::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: var(--ra-brand); animation: ra-pageload 1.1s ease-in-out infinite; }
@keyframes ra-pageload { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
html.ra-is-leaving .ra-main { opacity: .6; transition: opacity .2s ease .15s; }   /* only after a short wait: fast pages never dim */
/* New content of .ra-main fades in (0.25 s: seen, never waited for): a page load, a route fragment, an ajax view. An element plays its
   animation when it is INSERTED, so putting new content in .ra-main plays it again — nothing to call.
   "backwards": the animation holds opacity only while it runs (the dim rules below still apply afterwards);
   it ends on transform: none, so fixed / sticky children (modals, sticky headers) keep their place. */
.ra-main > * { animation: ra-fade-in .25s var(--ra-ease) backwards; }
@keyframes ra-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* an ajax view on its way (.ra-main[aria-busy="true"], set by the app): the old content dims after a short wait */
.ra-main[aria-busy="true"] > * { opacity: .55; transition: opacity .2s ease .15s; }
.ra-loading-host { position: relative; }
.ra-loading { display: flex; align-items: center; justify-content: center; gap: var(--ra-space-2); color: var(--ra-text-muted); font-size: var(--ra-fs-sm); }
.ra-loading__spin { flex: none; color: var(--ra-brand); }
.ra-loading--cover { position: absolute; inset: 0; z-index: 5; align-items: flex-start; padding-top: 48px; background: color-mix(in srgb, var(--ra-bg-surface) 70%, transparent); border-radius: inherit; }
.ra-loading--cover .ra-loading__box { position: sticky; top: 45vh; }   /* a tall host: the box stays in view */
.ra-loading--page { position: fixed; z-index: 1900; align-items: center; padding-top: 0; }
.ra-loading__box { display: inline-flex; align-items: center; gap: var(--ra-space-2); padding: 10px 16px; background: var(--ra-bg-surface); border: 1px solid var(--ra-border); border-radius: var(--ra1-r, 6px); box-shadow: var(--ra-shadow-pop); }
.ra-loading--block { min-height: 50vh; }
.btn.is-loading { gap: 6px; }
.btn.is-loading .ra-loading__spin { color: inherit; }
@media (prefers-reduced-motion: reduce) {
  .ra-pageload::before { left: 0; width: 100%; animation: none; opacity: .6; }
  .ra-loading__spin { animation-duration: 1.6s; }
  .ra-main > * { animation: none; }
}

/* ---------- Admin → Users ----------
   .ra-req          the * after a required field's label
   .ra-userverify   "verified" mark (email / phone, a yes in a table)
   .ra-userfacts    label / value rows (the user's Activity card)
   .ra-docslot      one onboarding photo (portrait, ID, signature): icon, name, state, upload */
body.ra--v1 .ra-req { color: var(--ra-danger-text); }
body.ra--v1 .ra-userverify { color: var(--ra-primary-text); white-space: nowrap; }
body.ra--v1 .ra-userverify .fas + .fas { margin-left: var(--ra-space-2); }
body.ra--v1 .ra-userfacts .list-group-item { display: flex; justify-content: space-between; gap: var(--ra-space-3); font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-userfacts .list-group-item > span:first-child { color: var(--ra-text-muted); }
body.ra--v1 .ra-userfacts .list-group-item > span:last-child { text-align: right; }
body.ra--v1 .ra-userproj { min-width: 0; }
body.ra--v1 .ra-cardhead--sub { padding-top: 12px; padding-bottom: 12px; }   /* a card title with a sub line under it */
body.ra--v1 .ra-cardhead--sub .ra-card__sub { display: block; }
body.ra--v1 .ra-cardhead--sub > .ra-state { flex: none; white-space: nowrap; }
/* .ra-comments — a thread of dated comments (Profile check of a user): newest first,
   each with who · role · when, the result they set, and the text; .ra-comments__new
   (card footer) writes the next one */
body.ra--v1 .ra-comments { margin: 0; padding: 0; list-style: none; }
body.ra--v1 .ra-comment { display: flex; gap: var(--ra-space-3); padding: 12px var(--ra-space-4); border-bottom: 1px solid var(--ra-border); }
body.ra--v1 .ra-comment:last-child { border-bottom: 0; }
body.ra--v1 .ra-comment .ra-avatar { flex: none; width: 32px; height: 32px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
body.ra--v1 .ra-comment__main { flex: 1; min-width: 0; }
body.ra--v1 .ra-comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--ra-space-2); font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-comment__role { color: var(--ra-text-muted); }
body.ra--v1 .ra-comment__head time { margin-left: auto; font-size: var(--ra-fs-xs); color: var(--ra-text-soft); white-space: nowrap; }
body.ra--v1 .ra-comment__result { margin-top: 2px; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-comment__text { margin: 4px 0 0; font-size: var(--ra-fs-sm); color: var(--ra-text); }
/* ---------- Agent terminal (project → FAgent; shared with FAgents) ----------
   The side menu lists the agents (as Settings): .ra-nav__avatar = initials as the icon,
   .ra-nav__run = Claude is running for that agent.
   .ra-term          one dark card that fills the rest of the viewport (as KKit Connect):
     __tabs          the agent's sessions (tab: dot · name · ×; .is-active) + __add "+ AI" (dropdown)
     __screen        one per session; xterm.js mounts here (vendor/xterm); its colours come from the
                     --ra-term-* tokens (the page's JS reads them into the xterm theme)
     __input         the prompt line under the terminal: ❯ · textarea · Send; __hint under it
     __status        bottom bar: folder · branch · model (dot) · state · Stop
   The terminal stays dark on purpose: it is a terminal, not a page surface. */
body.ra--v1 { --ra-term-bg: #121815; --ra-term-bar: #0c110e; --ra-term-line: #26302a; --ra-term-text: #e3e8e4;
  --ra-term-muted: #8f9a93; --ra-term-accent: #8fd16a; --ra-term-cursor: #e8f3e2; --ra-term-select: #2f4a2a;
  --ra-term-red: #e59a8a; --ra-term-yellow: #f0c36a; --ra-term-cyan: #86cfc7; --ra-term-magenta: #c5b3f0; }
body.ra--v1 .ra-nav__avatar { display: inline-grid; place-items: center; height: 22px; font-size: 10px; font-weight: var(--ra-fw-semibold); letter-spacing: 0; color: var(--ra-active-text); background: var(--ra-green-100); border-radius: 50%; }
body.ra--v1 .ra-nav__link.is-active .ra-nav__avatar { color: var(--ra-primary-on); background: var(--ra-brand); }
body.ra--v1 .ra-nav__run { flex: none; font-size: 11px; color: var(--ra-primary-text); }
body.ra--v1 .ra-app.is-collapsed .ra-nav__run { display: none; }
body.ra--v1 .ra-term { display: flex; flex-direction: column; height: clamp(480px, calc(100vh - 200px), 1100px); overflow: hidden; background: var(--ra-term-bg); border: 1px solid var(--ra-term-line); border-radius: var(--ra1-r-lg); }
body.ra--v1 .ra-term__tabs { display: flex; align-items: center; gap: var(--ra-space-2); padding: 0 var(--ra-space-2); background: var(--ra-term-bar); border-bottom: 1px solid var(--ra-term-line); }
body.ra--v1 .ra-term__tablist { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
body.ra--v1 .ra-term__tab { position: relative; display: flex; align-items: center; flex: none; border-right: 1px solid var(--ra-term-line); }
body.ra--v1 .ra-term__tab.is-active { background: var(--ra-term-bg); }
body.ra--v1 .ra-term__tab.is-active::after { content: ""; position: absolute; inset: auto 0 -1px; height: 1px; background: var(--ra-term-bg); }
body.ra--v1 .ra-term__tabbtn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 4px 0 14px; font-size: var(--ra-fs-sm); color: var(--ra-term-muted); background: none; border: 0; }
body.ra--v1 .ra-term__tab.is-active .ra-term__tabbtn { color: var(--ra-term-text); }
body.ra--v1 .ra-term__tabbtn:hover { color: var(--ra-term-text); }
body.ra--v1 .ra-term__close { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 6px; font-size: 11px; color: var(--ra-term-muted); background: none; border: 0; border-radius: 4px; }
body.ra--v1 .ra-term__close:hover { color: var(--ra-term-text); background: var(--ra-term-line); }
body.ra--v1 .ra-term__tabbtn:focus-visible,
body.ra--v1 .ra-term__close:focus-visible,
body.ra--v1 .ra-term__add:focus-visible { outline: 2px solid var(--ra-term-accent); outline-offset: -2px; }
body.ra--v1 .ra-term__dot.is-running { box-shadow: 0 0 0 3px rgba(143, 209, 106, 0.25); }
body.ra--v1 .ra-term__tab .ra-term__dot:not(.is-running) { background: var(--ra-term-muted); }
body.ra--v1 .ra-term__add { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; font-size: var(--ra-fs-sm); color: var(--ra-term-muted); background: transparent; border: 1px solid var(--ra-term-line); border-radius: var(--ra-radius); }
body.ra--v1 .ra-term__add:hover { color: var(--ra-term-text); border-color: var(--ra-term-muted); }
body.ra--v1 .ra-term__screens { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.ra--v1 .ra-term__screen { flex: 1 1 auto; min-height: 0; padding: 10px 4px 4px 12px; }
body.ra--v1 .ra-term__screen[hidden] { display: none; }
body.ra--v1 .ra-term__input { display: flex; align-items: flex-end; gap: var(--ra-space-2); margin: 0 var(--ra-space-3); padding: 8px 0; border-top: 1px solid var(--ra-term-line); border-bottom: 1px solid var(--ra-term-line); }
body.ra--v1 .ra-term__prompt { flex: none; padding-bottom: 5px; font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 14px; color: var(--ra-term-accent); }
body.ra--v1 .ra-term__field { flex: 1 1 auto; min-height: 30px; max-height: 160px; padding: 5px 0; font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; color: var(--ra-term-text); background: transparent; border: 0; outline: 0; resize: none; caret-color: var(--ra-term-cursor); }
body.ra--v1 .ra-term__field::placeholder { color: var(--ra-term-muted); }
body.ra--v1 .ra-term__input:focus-within { border-top-color: var(--ra-term-muted); border-bottom-color: var(--ra-term-muted); }
body.ra--v1 .ra-term__hint { padding: 4px var(--ra-space-3) 6px; font-family: "SF Mono", Menlo, Consolas, monospace; font-size: var(--ra-fs-xs); color: var(--ra-term-muted); }
body.ra--v1 .ra-term__screen .xterm { height: 100%; }
body.ra--v1 .ra-term__screen .xterm-viewport { background-color: var(--ra-term-bg) !important; }   /* xterm sets it inline */
body.ra--v1 .ra-term__status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--ra-space-4); padding: 6px var(--ra-space-3); font-family: "SF Mono", Menlo, Consolas, monospace; font-size: var(--ra-fs-xs); color: var(--ra-term-muted); background: var(--ra-term-bar); border-top: 1px solid var(--ra-term-line); }
body.ra--v1 .ra-term__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
body.ra--v1 .ra-term__model { padding: 2px 10px; color: var(--ra-term-text); border: 1px solid var(--ra-term-line); border-radius: 999px; }
body.ra--v1 .ra-term__dot { width: 8px; height: 8px; background: var(--ra-term-accent); border-radius: 50%; }
body.ra--v1 .ra-term__state { white-space: nowrap; }
body.ra--v1 .ra-term__btn { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; font-size: var(--ra-fs-xs); color: var(--ra-term-text); background: transparent; border: 1px solid var(--ra-term-line); }
body.ra--v1 .ra-term__btn:hover,
body.ra--v1 .ra-term__btn:focus-visible { color: #fff; background: var(--ra-term-line); border-color: var(--ra-term-muted); }
@media (max-width: 991.98px) {
  body.ra--v1 .ra-term { height: calc(100vh - 170px); min-height: 420px; }
}
/* ---------- Agent chat — the simple view of FAgent (shared with FAgents) ----------
   For people who just want to message the agent: the conversation and one input, nothing else.
   .ra-chat          one card that fills the viewport (page colours, light / dark)
     __tabs          the agent's chats: tab (name · ×; .is-active = green underline) + __new "New chat"
     __log           one per chat (tabpanel), scrolls; __inner keeps lines readable (max 760px, centred)
     __msg--user     right, light green bubble · __msg--bot left, initials avatar, no bubble fill
     __typing        three dots while the agent answers
     __composer      one rounded box: __files (chips of the files to send, × each) · __note (a file
                     refused) · __row: __attach 📎 · textarea · round Send (the page's primary button)
     __drop          overlay while files are dragged over the chat
     __msgfiles      the files sent with a message (__file chips; a picture → __thumb) */
body.ra--v1 .ra-chat { position: relative; display: flex; flex-direction: column; height: clamp(480px, calc(100vh - 200px), 1100px); overflow: hidden; background: var(--ra-bg-surface); border: 1px solid var(--ra1-card-border); border-radius: var(--ra1-r-lg); }
body.ra--v1 .ra-chat__tabs { display: flex; align-items: center; gap: var(--ra-space-2); padding: 0 var(--ra-space-3); border-bottom: 1px solid var(--ra-border); }
body.ra--v1 .ra-chat__tablist { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
body.ra--v1 .ra-chat__tab { position: relative; display: flex; align-items: center; flex: none; max-width: 220px; }
body.ra--v1 .ra-chat__tabbtn { min-width: 0; height: 42px; padding: 0 4px 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); background: none; border: 0; }
body.ra--v1 .ra-chat__tabbtn:hover { color: var(--ra-text); }
body.ra--v1 .ra-chat__tab.is-active .ra-chat__tabbtn { color: var(--ra-text-heading); font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-chat__tab.is-active::after { content: ""; position: absolute; inset: auto 8px -1px; height: 2px; background: var(--ra-primary); border-radius: 2px; }
body.ra--v1 .ra-chat__close { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 4px; font-size: 11px; color: var(--ra-text-soft); background: none; border: 0; border-radius: 4px; }
body.ra--v1 .ra-chat__close:hover { color: var(--ra-text); background: var(--ra-bg-hover); }
body.ra--v1 .ra-chat__new { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); background: none; border: 0; border-radius: var(--ra-radius); }
body.ra--v1 .ra-chat__new:hover { color: var(--ra-text); background: var(--ra-bg-hover); }
body.ra--v1 .ra-chat__tabbtn:focus-visible,
body.ra--v1 .ra-chat__close:focus-visible,
body.ra--v1 .ra-chat__new:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: -2px; }
body.ra--v1 .ra-chat__logs { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.ra--v1 .ra-chat__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
body.ra--v1 .ra-chat__log[hidden] { display: none; }
body.ra--v1 .ra-chat__log:focus-visible { outline: 2px solid var(--ra-focus); outline-offset: -2px; }
body.ra--v1 .ra-chat__inner { display: flex; flex-direction: column; gap: var(--ra-space-4); max-width: 760px; margin: 0 auto; padding: var(--ra-space-5) var(--ra-space-4); }
body.ra--v1 .ra-chat__msg { display: flex; gap: var(--ra-space-3); align-items: flex-start; }
body.ra--v1 .ra-chat__msg--user { flex-direction: column; align-items: flex-end; gap: 6px; }
body.ra--v1 .ra-chat__avatar { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; font-size: 11px; font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); background: var(--ra-green-100); border-radius: 50%; }
body.ra--v1 .ra-chat__bubble { min-width: 0; font-size: var(--ra-fs-base); line-height: 1.55; color: var(--ra-text); overflow-wrap: anywhere; }
body.ra--v1 .ra-chat__msg--bot .ra-chat__bubble { padding-top: 4px; }
body.ra--v1 .ra-chat__msg--user .ra-chat__bubble { max-width: min(560px, 85%); padding: 9px 14px; background: var(--ra-primary-surface); border-radius: 18px 18px 4px 18px; }
body.ra--v1 .ra-chat__bubble p { margin: 0 0 var(--ra-space-2); }
body.ra--v1 .ra-chat__bubble > :last-child { margin-bottom: 0; }
body.ra--v1 .ra-chat__typing { display: inline-flex; gap: 4px; padding: 10px 0; }
body.ra--v1 .ra-chat__typing span { width: 7px; height: 7px; background: var(--ra-text-soft); border-radius: 50%; animation: ra-chat-typing 1s infinite ease-in-out; }
body.ra--v1 .ra-chat__typing span:nth-child(2) { animation-delay: .15s; }
body.ra--v1 .ra-chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ra-chat-typing { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.ra--v1 .ra-chat__typing span { animation: none; } }
body.ra--v1 .ra-chat__composer { display: flex; flex-direction: column; gap: 6px; width: calc(100% - 2 * var(--ra-space-4)); max-width: 760px; margin: 0 auto var(--ra-space-4); padding: 6px; background: var(--ra-bg-surface); border: 1px solid var(--ra-border-strong); border-radius: 24px; transition: border-color var(--ra-dur) var(--ra-ease), box-shadow var(--ra-dur) var(--ra-ease); }
body.ra--v1 .ra-chat__composer:focus-within { border-color: var(--ra-primary-border); box-shadow: 0 0 0 3px var(--ra-focus); }
body.ra--v1 .ra-chat__row { display: flex; align-items: flex-end; gap: var(--ra-space-1); }
body.ra--v1 .ra-chat__attach { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; margin: 0; font-size: 15px; color: var(--ra-text-muted); border-radius: 50%; cursor: pointer; }
body.ra--v1 .ra-chat__attach:hover { color: var(--ra-text); background: var(--ra-bg-hover); }
body.ra--v1 input:focus-visible + .ra-chat__attach { outline: 2px solid var(--ra-focus); outline-offset: 0; }
body.ra--v1 .ra-chat__files { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 4px 6px 0; list-style: none; }
body.ra--v1 .ra-chat__files[hidden] { display: none; }
body.ra--v1 .ra-chat__file { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 4px 6px 4px 10px; font-size: var(--ra-fs-sm); color: var(--ra-text); background: var(--ra-bg-subtle); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); }
body.ra--v1 .ra-chat__file > i { color: var(--ra-primary-text); }
body.ra--v1 .ra-chat__filename { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ra--v1 .ra-chat__filesize { flex: none; font-size: var(--ra-fs-xs); color: var(--ra-text-soft); }
body.ra--v1 .ra-chat__thumb { flex: none; width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
body.ra--v1 .ra-chat__unfile { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; font-size: 10px; color: var(--ra-text-soft); background: none; border: 0; border-radius: 4px; }
body.ra--v1 .ra-chat__unfile:hover { color: var(--ra-text); background: var(--ra-bg-hover); }
body.ra--v1 .ra-chat__unfile:focus-visible { outline: 2px solid var(--ra-focus); }
body.ra--v1 .ra-chat__note { margin: 0; padding: 0 10px; font-size: var(--ra-fs-xs); color: var(--ra-danger-text); }
body.ra--v1 .ra-chat__msgfiles { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: min(560px, 85%); }
body.ra--v1 .ra-chat__drop { position: absolute; inset: 8px; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: var(--ra-fs-sm); color: var(--ra-text-muted); background: color-mix(in srgb, var(--ra-bg-surface) 92%, transparent); border: 2px dashed var(--ra-primary); border-radius: var(--ra1-r-lg); pointer-events: none; }
body.ra--v1 .ra-chat__drop[hidden] { display: none; }
body.ra--v1 .ra-chat__drop i { font-size: 28px; color: var(--ra-primary-text); }
body.ra--v1 .ra-chat__drop b { font-size: var(--ra-fs-md); color: var(--ra-text-heading); }
body.ra--v1 .ra-chat__field { flex: 1 1 auto; min-height: 36px; max-height: 180px; padding: 7px 0; font-size: var(--ra-fs-base); line-height: 1.45; color: var(--ra-text); background: transparent; border: 0; outline: 0; resize: none; }
body.ra--v1 .ra-chat__field::placeholder { color: var(--ra-text-soft); }
body.ra--v1 .ra-chat__send { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; }
@media (max-width: 991.98px) {
  body.ra--v1 .ra-chat { height: calc(100vh - 170px); min-height: 420px; }
}
/* .ra-feedback — feedback button of a chart card (card header, before the card menu): a bigger
   comment bubble with the number of comments in its middle; no number = no comment yet */
body.ra--v1 .ra-feedback { position: relative; display: inline-block; line-height: 1; }
body.ra--v1 .ra-feedback > .fa-comment { font-size: 1.25rem; }
body.ra--v1 .ra-feedback__count { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%); font-size: 0.625rem; font-weight: 700; color: var(--ra-bg-surface); white-space: nowrap; }
body.ra--v1 .ra-comments__new { padding: 12px var(--ra-space-4); background: var(--ra-bg-subtle); }   /* a project row in the user's Projects card: text wraps, the role badge stays */
body.ra--v1 .ra-docslot { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: var(--ra-space-3) var(--ra-space-2); text-align: center; border: 1px solid var(--ra-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-docslot.is-empty { border-style: dashed; }
body.ra--v1 .ra-docslot__icon { font-size: 20px; color: var(--ra-text-soft); }
body.ra--v1 .ra-docslot__name { font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-docslot__state { font-size: var(--ra-fs-xs); color: var(--ra-text-muted); }
/* ---------- Admin → Users → Single sign-on (users-sso.html) ----------
   .ra-ssoendpoints  endpoints read from the issuer (read-only rows under the Issuer URL)
   .ra-ssogroups     group mapping under the claims table
   .ra-ssosteps      setup steps in the Status card: done = check, to do = circle
   .ra-ssotest       result of the last test sign-in */
body.ra--v1 .ra-ssoendpoints .list-group-item { padding: 6px 12px; background: var(--ra-bg-subtle); }
body.ra--v1 .ra-ssoendpoints .ra-code { font-size: var(--ra-fs-xs); overflow-wrap: anywhere; }
body.ra--v1 .ra-ssogroups { border-top: 1px solid var(--ra-border); }
body.ra--v1 .ra-ssogroups__title { margin: 0 0 2px; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-ssosteps { margin: 0 0 var(--ra-space-4); padding: 0; list-style: none; }
body.ra--v1 .ra-ssostep { display: flex; gap: 10px; padding: 6px 0; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-ssostep > i { flex: none; margin-top: 3px; color: var(--ra-text-soft); }
body.ra--v1 .ra-ssostep.is-done > i { color: var(--ra-primary-text); }
body.ra--v1 .ra-ssostep__name { display: block; font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-ssostep__sub { display: block; font-size: var(--ra-fs-xs); color: var(--ra-text-soft); }
body.ra--v1 .ra-ssotest { display: flex; flex-direction: column; gap: 4px; margin-top: var(--ra-space-3); padding: 10px 12px; font-size: var(--ra-fs-sm); background: var(--ra-bg-subtle); border-radius: var(--ra1-r); }
body.ra--v1 .ra-ssotest__head { display: flex; justify-content: space-between; gap: var(--ra-space-2); }

/* ---------- Project → Visit detail (visit-detail.html, every project type) ----------
   .ra-visitsum     the summary card: Visit · Store · Result side by side (stack on small screens)
   .ra-visitkpis    the Result column: label · big value · one line why (2 × 2)
   .ra-visitphotos  the visit's photos: one row of small tiles (the .ra-media grid, tighter)
   .ra-formnav      "Forms" jump list above the form cards (links to #vf-<form>)
   .ra-form         one form = one card; .ra-formchip its count / result in the header
   .ra-formphotos   a form's own photos (.ra-visitphotos row) between its header and its table / answers
   .ra-answers      a form's questions and answers · .ra-formnote one line above a form's table
   .ra-sku          a product cell: pack picture + name (+ size / note under it)
   .ra-staffnote    the staff's own note, above the comment thread of Notes & QC
   .ra-visitside    the Notes & QC card — sticks under the top bar while the forms scroll (lg+) */
body.ra--v1 .ra-visitsum__col { padding: 14px var(--ra-space-4) 6px; }
body.ra--v1 .ra-visitsum__col + .ra-visitsum__col { border-top: 1px solid var(--ra-border); }
@media (min-width: 768px) {
  body.ra--v1 .ra-visitsum__col:nth-child(2) { border-top: 0; border-left: 1px solid var(--ra-border); }
}
@media (min-width: 1200px) {
  body.ra--v1 .ra-visitsum__col + .ra-visitsum__col { border-top: 0; border-left: 1px solid var(--ra-border); }
}
body.ra--v1 .ra-visitsum__title { margin: 0 0 4px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--ra-text-soft); }
body.ra--v1 .ra-visitsum .ra-userfacts .list-group-item { padding: 7px 0; background: transparent; }
body.ra--v1 .ra-visitsum .ra-userfacts .list-group-item:last-child { border-bottom: 0; }
body.ra--v1 .ra-visitkpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ra-space-2); margin: 6px 0 10px; padding: 0; list-style: none; }
@media (min-width: 768px) and (max-width: 1199.98px) { body.ra--v1 .ra-visitkpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
body.ra--v1 .ra-visitkpi { display: flex; flex-direction: column; min-width: 0; padding: 10px 12px; background: var(--ra-bg-subtle); border-radius: var(--ra1-r); }
body.ra--v1 .ra-visitkpi__label { font-size: var(--ra-fs-xs); color: var(--ra-text-muted); }
body.ra--v1 .ra-visitkpi__value { margin-top: 2px; font-size: var(--ra-fs-lg); font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; line-height: 1.3; }
body.ra--v1 .ra-visitkpi__value .ra-state { font-size: var(--ra-fs-base); }
body.ra--v1 .ra-visitkpi__note { font-size: var(--ra-fs-xs); color: var(--ra-text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ra--v1 .ra-media.ra-visitphotos { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 991.98px) { body.ra--v1 .ra-media.ra-visitphotos { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { body.ra--v1 .ra-media.ra-visitphotos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.ra--v1 .ra-visitphotos .ra-media__type { font-size: 11px; }
/* More than 6 photos: the row slides sideways (.ra-hscroll, like Media → By visit). The wrapper carries the card padding, the track none. */
body.ra--v1 .ra-visitphotos-scroll { padding: var(--ra-space-4); }
body.ra--v1 .ra-hscroll > .ra-media.ra-visitphotos { grid-template-columns: none; padding: 0; }
@media (max-width: 767.98px) { body.ra--v1 .ra-visitphotos-scroll { padding: var(--ra-space-3); } }
body.ra--v1 .ra-formnav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2); margin-bottom: var(--ra-space-3); }
body.ra--v1 .ra-formnav__label { font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-text-soft); }
body.ra--v1 .ra-formnav__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
body.ra--v1 .ra-formnav__link { display: inline-block; padding: 3px 10px; font-size: var(--ra-fs-sm); color: var(--ra-text); text-decoration: none; background: var(--ra-bg-surface); border: 1px solid var(--ra-border); border-radius: 999px; }
body.ra--v1 .ra-formnav__link:hover { background: var(--ra-primary-surface); border-color: var(--ra-primary-border); }
body.ra--v1 .ra-form { scroll-margin-top: calc(var(--ra-header-h) + var(--ra-space-4)); }
body.ra--v1 .ra-form > .ra-formphotos { border-bottom: 1px solid var(--ra-border); }
body.ra--v1 .ra-formchip { flex: none; padding: 2px 10px; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ra-active-text); background: var(--ra-green-100); border-radius: 999px; }
body.ra--v1 .ra-answers { margin: 0; padding: 12px var(--ra-space-4) 14px; }
body.ra--v1 .ra-answers dt { font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-answers dd { margin: 2px 0 var(--ra-space-3); }
body.ra--v1 .ra-answers dd:last-child { margin-bottom: 0; }
body.ra--v1 .ra-formnote { margin: 0; padding: 10px var(--ra-space-4); font-size: var(--ra-fs-sm); color: var(--ra-text-muted); border-bottom: 1px solid var(--ra-border); }
body.ra--v1 .ra-sku { display: flex; align-items: center; gap: 10px; min-width: 200px; }
body.ra--v1 .ra-sku__img { flex: none; width: 40px; height: 40px; object-fit: contain; background: #fff; border: 1px solid var(--ra-border); border-radius: var(--ra1-r); }
body.ra--v1 .ra-sku__text { min-width: 0; }
body.ra--v1 .ra-sku__name { display: block; font-weight: var(--ra-fw-medium); }
body.ra--v1 .ra-staffnote { padding: 12px var(--ra-space-4); font-size: var(--ra-fs-sm); border-bottom: 1px solid var(--ra-border); }
body.ra--v1 .ra-staffnote__label { display: block; margin-bottom: 2px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-semibold); color: var(--ra-text-soft); }
@media (min-width: 992px) { body.ra--v1 .ra-visitside { position: sticky; top: calc(var(--ra-header-h) + var(--ra-space-4)); } }
body.ra--v1 .ra-docslot.is-empty .ra-docslot__state { color: var(--ra-danger-text); }
body.ra--v1 .ra-docslot label:has(+ input:focus-visible) { outline: 2px solid var(--ra-focus); }

/* ---------- View as a role (DESIGN VIEW ONLY — added by demo.js) ----------
   .ra-rolepick  chips in the user menu to preview the pages as another role
   .ra-rolebar   line on top of the page: which role the page is shown for     */
body.ra--v1 .ra-rolepick { width: 272px; padding: var(--ra-space-1) var(--ra-space-3) var(--ra-space-2); }
body.ra--v1 .ra-rolepick__head { display: flex; align-items: center; gap: 6px; margin: var(--ra-space-1) 0; font-size: 11px; font-weight: var(--ra-fw-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--ra-text-soft); }
body.ra--v1 .ra-rolepick__list { display: flex; flex-wrap: wrap; gap: 4px; }
body.ra--v1 .ra-rolepick__list .btn { --bs-btn-padding-x: 8px; --bs-btn-padding-y: 2px; --bs-btn-font-size: var(--ra-fs-xs); }
body.ra--v1 .ra-rolepick__list .btn.active { --bs-btn-active-bg: var(--ra-green-100); --bs-btn-active-color: var(--ra-active-text); --bs-btn-active-border-color: var(--ra-green-300); font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-rolebar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--ra-space-2); margin-bottom: var(--ra-space-3); padding: 8px 12px; font-size: var(--ra-fs-sm); color: var(--ra-text); background: var(--ra-bg-subtle); border: 1px dashed var(--ra-border-strong); border-radius: var(--ra1-r); }
body.ra--v1 .ra-rolebar .ra-params__tag { margin-left: auto; }
body.ra--v1 .ra-rolebar .btn { --bs-btn-padding-y: 0; --bs-btn-font-size: var(--ra-fs-xs); }

/* ---------- Visit list (project → Data Visit) ----------
   .ra-visithead  status chips (quick filter, with counts) + bulk actions in the card header
   .ra-bulk       shown while rows are selected: "3 selected" + actions (data-ra-bulk)
   .ra-code       a store / item code inside text (monospace-ish, muted)
   .ra-flag       a small warning inside a cell (e.g. check-in far from the store, late)
   .ra-flag--bad  a missing record (no check-in, no check-out)
   .ra-rowmenu    row "…" menu: the record's facts on top, then actions, delete last */
body.ra--v1 .ra-visithead { flex-wrap: wrap; gap: var(--ra-space-2) var(--ra-space-3); height: auto; min-height: 0; padding-top: 12px; padding-bottom: 12px; }
body.ra--v1 .ra-visithead .ra-typetabs { flex-wrap: wrap; }
body.ra--v1 .ra-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-2); margin-left: auto; }
body.ra--v1 .ra-bulk[hidden] { display: none; }
body.ra--v1 .ra-bulk__count { font-size: var(--ra-fs-sm); color: var(--ra-text-muted); }
body.ra--v1 .ra-bulk__count b { color: var(--ra-text); font-variant-numeric: tabular-nums; }
body.ra--v1 .ra-bulk__danger.btn { --bs-btn-color: var(--ra-danger-text, #b02a37); --bs-btn-hover-color: var(--ra-danger-text, #b02a37); }
body.ra--v1 .ra-table__check { width: 44px; min-width: 44px; max-width: 44px; }
body.ra--v1 .ra-table__check .form-check-input { margin: 0; }
body.ra--v1 .ra-visits tbody tr:has([data-ra-check]:checked) { --bs-table-bg: var(--ra-green-050); }
body.ra--v1 .ra-code { font-variant-numeric: tabular-nums; letter-spacing: .01em; color: var(--ra-text-muted); }
body.ra--v1 .ra-flag { display: inline-flex; align-items: center; gap: 4px; font-weight: var(--ra-fw-medium); color: var(--ra-warning-text, #8a5a00); }
body.ra--v1 .ra-flag--bad { color: var(--ra-danger-text, #b02a37); }
body.ra--v1 .ra-rowmenu { min-width: 240px; }
body.ra--v1 .ra-rowmenu__facts { display: grid; grid-template-columns: minmax(80px, max-content) 1fr; gap: 4px var(--ra-space-3); margin: 0; padding: 6px 16px 8px; font-size: var(--ra-fs-sm); }
body.ra--v1 .ra-rowmenu__facts dt { font-weight: var(--ra-fw-regular); color: var(--ra-text-muted); }
body.ra--v1 .ra-rowmenu__facts dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-rowmenu .dropdown-item { display: flex; align-items: center; gap: 10px; }
body.ra--v1 .ra-rowmenu .dropdown-item .fas { width: 14px; color: var(--ra-text-soft); }
body.ra--v1 .ra-rowmenu__danger.dropdown-item, body.ra--v1 .ra-rowmenu__danger.dropdown-item .fas { color: var(--ra-danger-text, #b02a37); }

/* ---------- Posts: news cards & the community feed (F Office) ----------
   .ra-post            a card per post (News: cover on top · Community: author on top)
   .ra-post__cover     cover picture, 16:10, cropped · .ra-post__photos  1–2 photos, the
                       last one may say "+N" (.ra-post__more)
   .ra-post__meta      category chip · age · "…" menu   .ra-post__author  avatar · name · age
   .ra-post__title     2 lines max · .ra-post__text  3 lines max (--full: the whole text)
   .ra-post__foot      like / comment buttons (.ra-post__react, .is-on = liked)
   .ra-composer        "write a post" box above the feed
   .ra-rating          a score with 5 stars (vendors) · .ra-pagerbar  "Showing …" + paging */
body.ra--v1 .ra-post { overflow: hidden; }
body.ra--v1 .ra-post__cover { display: block; overflow: hidden; background: var(--ra-bg-subtle); }
body.ra--v1 .ra-post__cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .25s ease; }
body.ra--v1 .ra-post__cover:hover img { transform: scale(1.03); }
body.ra--v1 .ra-post__body { display: flex; flex-direction: column; gap: var(--ra-space-2); }
body.ra--v1 .ra-post__meta, body.ra--v1 .ra-post__author { display: flex; align-items: center; gap: var(--ra-space-2); min-width: 0; }
body.ra--v1 .ra-post__meta .dropdown, body.ra--v1 .ra-post__author .dropdown { margin-left: auto; }
body.ra--v1 .ra-post__time { display: inline-flex; align-items: center; gap: 4px; font-size: var(--ra-fs-sm); color: var(--ra-text-soft); white-space: nowrap; }
body.ra--v1 .ra-post__who { display: flex; flex-direction: column; min-width: 0; }
body.ra--v1 .ra-post__name { overflow: hidden; font-weight: var(--ra-fw-semibold); text-overflow: ellipsis; white-space: nowrap; color: var(--ra-text-heading); text-decoration: none; }
body.ra--v1 .ra-post__title { display: -webkit-box; margin: 0; overflow: hidden; font-size: var(--ra-fs-md); font-weight: var(--ra-fw-semibold); line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
body.ra--v1 .ra-post__title a { color: var(--ra-text-heading); text-decoration: none; }
body.ra--v1 .ra-post__title a:hover { color: var(--ra-link-hover); }
body.ra--v1 .ra-post__text { display: -webkit-box; margin: 0; overflow: hidden; color: var(--ra-text-muted); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
body.ra--v1 .ra-post__text--full { display: block; color: var(--ra-text); }
body.ra--v1 .ra-post__photos { display: grid; gap: 4px; margin-top: auto; overflow: hidden; border-radius: var(--ra1-r-lg); }
body.ra--v1 .ra-post__photos--2 { grid-template-columns: 1fr 1fr; }
body.ra--v1 .ra-post__photo { position: relative; display: block; overflow: hidden; background: var(--ra-bg-subtle); }
body.ra--v1 .ra-post__photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
body.ra--v1 .ra-post__photos--2 .ra-post__photo img { aspect-ratio: 3 / 4; }
body.ra--v1 .ra-post__more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: var(--ra-fw-semibold); color: #fff; background: rgba(0, 0, 0, .45); }
body.ra--v1 .ra-post__foot { display: flex; gap: var(--ra-space-1); padding: 6px var(--ra-space-3); border-top: 1px solid var(--ra-border); }
body.ra--v1 .ra-post__react.btn { display: inline-flex; align-items: center; gap: 6px; color: var(--ra-text-muted); }
body.ra--v1 .ra-post__react.is-on { color: var(--ra-danger-text, #b02a37); }
body.ra--v1 .ra-avatar--md { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: var(--ra-fs-sm); border-radius: 50%; }
body.ra--v1 .ra-composer .card-body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-space-3); }
body.ra--v1 .ra-composer .form-control { flex: 1 1 260px; resize: vertical; }
body.ra--v1 .ra-composer__tools { display: flex; align-items: center; gap: var(--ra-space-1); }
body.ra--v1 .ra-rating { display: inline-flex; align-items: center; gap: 6px; }
body.ra--v1 .ra-rating b { font-variant-numeric: tabular-nums; }
body.ra--v1 .ra-rating__stars { display: inline-flex; gap: 1px; font-size: 12px; color: var(--ra-warning); }
/* .ra-stepper — a workflow in steps, left to right: done (green ✓, who · when) ›
   current (green ring, bold, who it waits for) › to do (grey). Scrolls sideways when narrow.
   .ra-items — the line items of a purchase request (inputs in cells, totals in tfoot) */
body.ra--v1 .ra-stepper { display: flex; gap: var(--ra-space-2); margin: 0; padding: 0 0 4px; overflow-x: auto; list-style: none; }
body.ra--v1 .ra-stepper__item { position: relative; display: flex; flex: 1 0 150px; flex-direction: column; gap: var(--ra-space-2); }
body.ra--v1 .ra-stepper__item:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: 36px; right: 4px; height: 2px; background: var(--ra-border); }
body.ra--v1 .ra-stepper__item.is-done:not(:last-child)::after { background: var(--ra-brand); }
body.ra--v1 .ra-stepper__mark { display: inline-grid; place-items: center; width: 28px; height: 28px; font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-semibold); color: var(--ra-text-muted); background: var(--ra-bg-surface); border: 2px solid var(--ra-border-strong); border-radius: 50%; }
body.ra--v1 .ra-stepper__item.is-done .ra-stepper__mark { color: #fff; background: var(--ra-brand); border-color: var(--ra-brand); }
body.ra--v1 .ra-stepper__item.is-current .ra-stepper__mark { color: var(--ra-active-text); background: var(--ra-green-100); border-color: var(--ra-brand); }
body.ra--v1 .ra-stepper__text { display: flex; flex-direction: column; min-width: 0; padding-right: var(--ra-space-2); }
body.ra--v1 .ra-stepper__name { font-size: var(--ra-fs-sm); font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .ra-stepper__item.is-current .ra-stepper__name { font-weight: var(--ra-fw-semibold); color: var(--ra-active-text); }
body.ra--v1 .ra-stepper__item:not(.is-done):not(.is-current) .ra-stepper__name { color: var(--ra-text-soft); }
body.ra--v1 .ra-stepper__who, body.ra--v1 .ra-stepper__when { font-size: var(--ra-fs-xs); color: var(--ra-text-muted); }
body.ra--v1 .ra-items .ra-item__name { min-width: 220px; }
body.ra--v1 .ra-items .ra-qty, body.ra--v1 .ra-items .ra-price { width: 110px; text-align: right; }
body.ra--v1 .ra-items .form-select { min-width: 92px; }
body.ra--v1 .ra-items tfoot td { font-weight: var(--ra-fw-semibold); border-bottom: 0; }
body.ra--v1 .ra-items__words { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ra-space-2); font-style: italic; }
body.ra--v1 .ra-pagerbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ra-space-2); }

/* ---------- Project features (sales, survey …) ----------
   <main class="ra-main" data-ra-features="sales survey"> lists what THIS project has on
   (Settings → General → Features). Anything with data-ra-feature="sales" is shown only
   when "sales" is in the list — columns, filters, reports, tiles. The server may also
   simply not render them; this keeps one template for every project.            */
body.ra--v1 .ra-main:not([data-ra-features~="sales"]) [data-ra-feature~="sales"],
body.ra--v1 .ra-main:not([data-ra-features~="planogram"]) [data-ra-feature~="planogram"],
body.ra--v1 .ra-main:not([data-ra-features~="survey"]) [data-ra-feature~="survey"],
body.ra--v1 .ra-main:not([data-ra-features~="shift"]) [data-ra-feature~="shift"] { display: none; }
body.ra--v1 .ra-pog { display: inline-flex; align-items: center; gap: 6px; }
body.ra--v1 .ra-pog .fas { font-size: 11px; color: var(--ra-text-soft); }
body.ra--v1 .ra-answered { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; color: var(--ra-text); }
body.ra--v1 .ra-answered .fas { font-size: 12px; }
body.ra--v1 .ra-answered--ok .fas { color: var(--ra-primary-text); }
body.ra--v1 .ra-answered--part .fas { color: var(--ra-warning-text); }
body.ra--v1 .ra-visits td:nth-child(2) .ra-table__sub { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
body.ra--v1 .ra-visits th:last-child, body.ra--v1 .ra-visits td:last-child { width: 44px; padding-left: 0; padding-right: 12px; }
body.ra--v1 .ra-visits .ra-pog { max-width: 160px; }
body.ra--v1 .ra-visits .ra-pog span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ra--v1 .ra-visits td:nth-child(2) .ra-table__sub { max-width: 220px; }
/* several values in one cell: the first + a "+N" button that lists them all (.ra-more, .ra-poglist) */
body.ra--v1 .ra-pogcell { display: flex; align-items: center; gap: 6px; }
body.ra--v1 .ra-more.btn { --bs-btn-padding-x: 6px; --bs-btn-font-size: var(--ra-fs-xs); --bs-btn-font-weight: var(--ra-fw-semibold); --bs-btn-color: var(--ra-active-text); --bs-btn-bg: var(--ra-green-100); --bs-btn-border-color: transparent; --bs-btn-hover-color: var(--ra-active-text); --bs-btn-hover-bg: var(--ra-green-300); --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: var(--ra-green-300); --bs-btn-active-color: var(--ra-active-text); height: 22px; border-radius: 999px; font-variant-numeric: tabular-nums; }
body.ra--v1 .ra-poglist { min-width: 220px; }
body.ra--v1 .ra-poglist__items { margin: 0; padding: 0 0 4px; list-style: none; }
body.ra--v1 .ra-poglist__item { display: flex; align-items: center; gap: 8px; padding: 5px 16px; font-size: var(--ra-fs-sm); color: var(--ra-text); }
body.ra--v1 .ra-poglist__item .fas { font-size: 11px; color: var(--ra-text-soft); }
body.ra--v1 .ra-visits .ra-pogcell .ra-pog { max-width: 124px; }

/* Picker labels: width reserved for the longest option by aisle-main.js (no jumping),
   never wider than 200px — longer values end in "…" (full text in the title). */
body.ra--v1 :not(.ra-topbar) [data-ra-select] [data-ra-value] { display: inline-block; max-width: 200px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Picker labels: width reserved for the longest option by aisle-main.js (no jumping),
   never wider than 200px — longer values end in "…" (full text in the title). */
body.ra--v1 :not(.ra-topbar) [data-ra-select] [data-ra-value] { display: inline-block; max-width: 200px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Small fields line up with small buttons (filter rows): both 32px high.
   (.form-control's 36px min-height used to win over .form-control-sm.) */
body.ra--v1 .form-control-sm, body.ra--v1 .form-select-sm { height: 32px; min-height: 32px; padding-top: 0; padding-bottom: 0; }
body.ra--v1 textarea.form-control-sm { height: auto; }

/* ---------- Date range in a filter (added by aisle-main.js) ----------
   An option "Custom range…" (or data-ra-range) opens From / To fields inside the
   dropdown; "Pick a date…" (or data-ra-range="single") opens one field. Apply writes
   the range on the button ("12 – 18 Oct 2026").                                  */
body.ra--v1 .ra-range { padding: 8px 16px 12px; border-top: 1px solid var(--ra-border); }
body.ra--v1 .ra-range[hidden] { display: none; }
body.ra--v1 .ra-range__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.ra--v1 .ra-range__fields--single { grid-template-columns: 1fr; }
body.ra--v1 .ra-range__fields label { display: flex; flex-direction: column; gap: 4px; font-size: var(--ra-fs-xs); font-weight: var(--ra-fw-medium); color: var(--ra-text-muted); }
body.ra--v1 .ra-range__fields .form-control { min-width: 140px; }
body.ra--v1 .ra-range__error { margin: 6px 0 0; font-size: var(--ra-fs-xs); color: var(--ra-danger-text); }
body.ra--v1 .ra-range__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* Always keep room for the vertical scrollbar, so a short page (no scrollbar) and a
   long one (scrollbar) are the same width — the topbar and the content never shift
   when moving between them. */
html { scrollbar-gutter: stable; }
/* The gutter already holds the scrollbar's place, so Bootstrap's modal must not add its
   own padding-right on top (inline style) — that pushed the page left on open. */
body.modal-open { padding-right: 0 !important; }


/* ---------- V1 · deep-green left menu (team choice, 2026-10-09) ----------
   #152911 behind the menu; text white, icons / section labels / counts /
   small text #999. The active item keeps the brand-green fill with dark text. */
body.ra--v1 .ra-sidebar { color: var(--ra1-side-text); scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
body.ra.ra--v1 .ra-nav__link,
body.ra.ra--v1 .ra-nav__link:hover { color: var(--ra1-side-text); }
body.ra--v1 .ra-sidebar .ra-nav__icon,
body.ra--v1 .ra-sidebar .ra-nav__count,
body.ra--v1 .ra-sidebar .ra-nav__section,
body.ra--v1 .ra-sidebar .ra-poweredby__label,
body.ra--v1 .ra-sidebar .ra-sidebar__collapse { color: var(--ra1-side-muted); }
body.ra--v1 .ra-sidebar .ra-nav__link:hover .ra-nav__icon,
body.ra--v1 .ra-sidebar .ra-sidebar__collapse:hover { color: var(--ra1-side-text); background: var(--ra1-side-hover); }
body.ra.ra--v1 .ra-nav__link.is-active,
body.ra.ra--v1 .ra-nav__link.is-active:hover { color: #0f1f0a; }
body.ra--v1 .ra-sidebar .ra-nav__link.is-active .ra-nav__icon,
body.ra--v1 .ra-sidebar .ra-nav__link.is-active .ra-nav__count { color: #0f1f0a; }
body.ra--v1 .ra-sidebar .ra-sidebar__foot { border-top-color: var(--ra1-side-line); }
body.ra--v1 .ra-sidebar .offcanvas-header { color: var(--ra1-side-text); }
body.ra--v1 .ra-sidebar .offcanvas-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }
body.ra--v1 .ra-sidebar :focus-visible { outline-color: var(--ra-brand); }
/* the FTrack logo is drawn for light backgrounds: give it a light plate on the dark menu */
body.ra--v1 .ra-sidebar .ra-poweredby__logo { padding: 3px 6px; background: #f3f5f0; border-radius: var(--ra1-r-sm); }


/* ---------- No accent stripes (team decision, 2026-10-09) ----------
   A selected / hovered item is shown by its FILL only — no coloured bar on the
   left of menu items, dropdown items, list items or alerts. */
body.ra.ra--v1 .ra-nav__link { border-left: 0; padding-left: 8px; }          /* 8 margin + 8 = 16, icons on the same line */
body.ra.ra--v1 .ra-nav__sub .ra-nav__link { padding-left: calc(8px + 18px + var(--ra-space-3)); }   /* sub-item text under its parent's label */
body.ra.ra--v1 .ra-app.is-collapsed .ra-nav__link { padding: 0; }
@media (max-width: 991.98px) {
  body.ra.ra--v1 .ra-app.is-collapsed .ra-nav__link { padding: 0 var(--ra-space-4) 0 8px; }
}
body.ra--v1 .dropdown-item,
body.ra--v1 .dropdown-item.active { border-left: 0; }
body.ra--v1 .alert { border-left-width: var(--bs-border-width, 1px); }

/* ---------- Charts: tokens (source of truth for every chart, web or not) ----------
   Categorical order is FIXED — slot 1 is always the first series, never cycled,
   never re-ordered by rank. Validated for colour-blind readers (adjacent CVD ΔE ≥ 12,
   normal-vision ΔE ≥ 19, all ≥ 3:1 on the card) in light AND dark.
   Max 6 series in a bar / line / stack; max 3 in a scatter or map — fold the rest
   into "Other" or split into small charts. No blue (brand rule).
   js/aisle-charts.js reads these; ai/retailactive-charts/ has them as JSON. */
body.ra--v1 {
  --ra-chart-1: #3d8f26;   /* green   */
  --ra-chart-2: #7a4fd0;   /* violet  */
  --ra-chart-3: #d6457f;   /* magenta */
  --ra-chart-4: #c98500;   /* amber   */
  --ra-chart-5: #00a39a;   /* teal    */
  --ra-chart-6: #e8692a;   /* orange  */
  --ra-chart-other: #8a9184;            /* "Other" / not in focus */
  /* one hue, light → dark: magnitude (heatmaps, ordered steps) */
  --ra-chart-seq-1: #7fc260; --ra-chart-seq-2: #5fab3e; --ra-chart-seq-3: #46902a; --ra-chart-seq-4: #30751b; --ra-chart-seq-5: #1f5410;
  /* two hues + grey middle: above / below a target */
  --ra-chart-div-neg-2: #c2531c; --ra-chart-div-neg-1: #f0a07a; --ra-chart-div-mid: #e6e5e0; --ra-chart-div-pos-1: #7cc9c1; --ra-chart-div-pos-2: #00837a;
  /* chrome */
  --ra-chart-surface: var(--ra-bg-surface);
  --ra-chart-text: var(--ra-text);
  --ra-chart-text-2: var(--ra-text-muted);
  --ra-chart-axis: var(--ra-text-soft);
  --ra-chart-grid: #e6e9e3;
  --ra-chart-baseline: #b9bfb4;
}
html[data-ra-theme="dark"] body.ra--v1 {
  --ra-chart-2: #8b62e0;   /* violet, stepped for the dark card — the rest are the same */
  --ra-chart-other: #7d8577;
  --ra-chart-seq-1: #2a6b17; --ra-chart-seq-2: #3d8a24; --ra-chart-seq-3: #56a838; --ra-chart-seq-4: #7cc25d; --ra-chart-seq-5: #a3d78a;
  --ra-chart-div-neg-2: #e8692a; --ra-chart-div-neg-1: #9a4a22; --ra-chart-div-mid: #3a4135; --ra-chart-div-pos-1: #1d6f69; --ra-chart-div-pos-2: #2fc2b6;
  --ra-chart-grid: #2a3226;
  --ra-chart-baseline: #4a5444;
}
/* chart box + swatches (guideline) */
body.ra--v1 .ra-chart { position: relative; height: 280px; }
body.ra--v1 .ra-chart--short { height: 220px; }
/* ---------- Dashboards (report tabs built from a KPI model) ---------------
   .ra-chart--h160 … --h460   chart heights from the model (card body only)
   .ra-kpi__delta.is-good / .is-bad / .is-warn   change vs last period; the
                              text always carries ▲ / ▼, never colour alone
   .ra-card__sub              the "(how it is counted)" part of a long title
   .ra-heat--good/-warn/-bad  matrix cells against target; the number stays
   .ra-heat--off              not listed / no data (grey) */
/* dashboard palette (.ra-dash): one green-led family for every report, as in
   the Merchandising KPI model — references (target, plan, expected) in grey
   (--ra-chart-ref), the "before / on arrival" bar in a light green
   (--ra-chart-base) next to the "after" bar. Square bars (radius 0). */
body.ra--v1 .ra-dash {
  --ra-chart-1: #1b6b3a; --ra-chart-2: #2a8c82; --ra-chart-3: #c49a2c;
  --ra-chart-4: #8c4a6e; --ra-chart-5: #b4622a; --ra-chart-6: #5f6f66;
  --ra-chart-ref: #b9c1bc; --ra-chart-base: #9cc7a8; --ra-chart-grid: #edefec;
}
/* plain bar lists on a dashboard are charts too: data colour, not the UI green (status bars of
   .ra-barlist--target keep their own colours) */
body.ra--v1 .ra-dash .ra-barlist:not(.ra-barlist--target) .ra-barlist__bar { background: var(--ra-chart-1); }
/* .ra-barlist--share: each bar is a part of a whole — the grey track is the whole (reference grey) */
body.ra--v1 .ra-barlist--share .ra-barlist__track { background: var(--ra-chart-ref, var(--ra-chart-other)); }
html[data-ra-theme="dark"] body.ra--v1 .ra-dash {
  --ra-chart-1: #5cb97a; --ra-chart-2: #3db3a7; --ra-chart-3: #d8b04a;
  --ra-chart-4: #c07aa0; --ra-chart-5: #db8752; --ra-chart-6: #9aaaa0;
  --ra-chart-ref: #56635b; --ra-chart-base: #3e6b4c; --ra-chart-grid: #2a3226;
}
/* HTML legend above a chart ("legend": "html") */
body.ra--v1 .ra-chartlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0 0 8px; list-style: none; font-size: 12px; color: var(--ra-text-muted); }
body.ra--v1 .ra-chartlegend > li { display: inline-flex; align-items: center; gap: 6px; }
body.ra--v1 .ra-chartlegend__swatch { display: inline-block; width: 9px; height: 9px; }
body.ra--v1 .ra-chartlegend__swatch--line { width: 14px; height: 2px; }
/* donut ("type": "donut"): ring + legend table (name · value · share) */
body.ra--v1 .ra-chart--donut { height: 200px; }
body.ra--v1 .ra-donutlegend .ra-chartswatch--sm { width: 10px; height: 10px; margin-right: var(--ra-space-2); border-radius: 0; vertical-align: baseline; }
body.ra--v1 .ra-donutlegend { width: 100%; margin-top: var(--ra-space-4); border-collapse: collapse; }
body.ra--v1 .ra-donutlegend th,
body.ra--v1 .ra-donutlegend td { padding: 7px 4px; border-bottom: 1px solid var(--ra1-card-border); }
body.ra--v1 .ra-donutlegend th { font-weight: var(--ra-fw-medium); color: var(--ra-text); }
body.ra--v1 .ra-donutlegend td { color: var(--ra-text-muted); }
body.ra--v1 .ra-donutlegend td:last-child { width: 1%; padding-left: var(--ra-space-4); font-weight: var(--ra-fw-bold, 700); color: var(--ra-text); white-space: nowrap; }
body.ra--v1 .ra-chart--h160 { height: 160px; }
body.ra--v1 .ra-chart--h340 { height: 340px; }
body.ra--v1 .ra-chart--h400 { height: 400px; }
body.ra--v1 .ra-chart--h460 { height: 460px; }
/* dashboard KPI card: bolder label and value, a trend line under a divider */
body.ra--v1 .ra-dash .ra-kpi__label { overflow: hidden; font-weight: var(--ra-fw-semibold); text-overflow: ellipsis; white-space: nowrap; }   /* one line: the values of a row stay level; full name in the title */
body.ra--v1 .ra-dash .ra-kpi__value { font-weight: var(--ra-fw-bold, 700); }
body.ra--v1 .ra-dash .ra-kpi__delta { font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-spark { display: block; width: 100%; height: 40px; margin-top: 14px; padding-top: 0; border-top: 1px solid var(--ra1-card-border); overflow: visible; }
body.ra--v1 .ra-spark__area { fill: var(--ra-primary-surface); stroke: none; }
body.ra--v1 .ra-spark__line { fill: none; stroke: var(--ra-chart-1); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
body.ra--v1 .ra-kpi__delta.is-good { color: var(--ra-primary-text); }
body.ra--v1 .ra-kpi__delta.is-bad  { color: var(--ra-danger-text); }
body.ra--v1 .ra-kpi__delta.is-warn { color: var(--ra-warning-text); }
body.ra--v1 .ra-kpi__delta.is-flat { color: var(--ra-text-muted); }
body.ra--v1 .card-header .ra-card__sub { margin: 2px 0 0; font-size: var(--ra-fs-xs); color: var(--ra-text-muted); }
body.ra--v1 .ra-dash .card-header { padding-top: 12px; padding-bottom: 12px; align-items: center; }
body.ra--v1 .ra-heat--good { background: var(--ra-green-100); }
body.ra--v1 .ra-heat--warn { background: #fff4cf; }
body.ra--v1 .ra-heat--bad  { background: #fbe0de; }
body.ra--v1 .ra-heat--off  { background: var(--ra-bg-subtle); color: var(--ra-text-muted); }
html[data-ra-theme="dark"] body.ra--v1 .ra-heat--warn { background: #3a3315; }
html[data-ra-theme="dark"] body.ra--v1 .ra-heat--bad  { background: #3d1f1e; }
/* a child row sits under its parent (beats the .ra-table--dense first-cell padding) */
body.ra--v1 .table > tbody > tr.ra-matrix__lvl1 > th:first-child { padding-left: 36px; font-weight: var(--ra-fw-regular); }
body.ra--v1 .table > tbody > tr.ra-matrix__lvl2 > th:first-child { padding-left: 52px; font-weight: var(--ra-fw-regular); color: var(--ra-text-muted); }
body.ra--v1 .ra-matrix__parent > * { font-weight: var(--ra-fw-semibold); }
body.ra--v1 .ra-dash .table th[scope="row"] { font-weight: var(--ra-fw-medium); white-space: nowrap; }
body.ra--v1 .ra-dash .ra-table__wrap-text { min-width: 280px; white-space: normal; }
body.ra--v1 .ra-chartswatch { display: inline-block; width: 28px; height: 28px; border-radius: var(--ra1-r-sm); vertical-align: middle; }
body.ra--v1 .ra-chartswatch--1 { background: var(--ra-chart-1); } body.ra--v1 .ra-chartswatch--2 { background: var(--ra-chart-2); }
body.ra--v1 .ra-chartswatch--3 { background: var(--ra-chart-3); } body.ra--v1 .ra-chartswatch--4 { background: var(--ra-chart-4); }
body.ra--v1 .ra-chartswatch--5 { background: var(--ra-chart-5); } body.ra--v1 .ra-chartswatch--6 { background: var(--ra-chart-6); }
body.ra--v1 .ra-chartswatch--other { background: var(--ra-chart-other); }
body.ra--v1 .ra-chartramp { display: flex; gap: 2px; }
body.ra--v1 .ra-chartramp span { flex: 1; height: 24px; }
body.ra--v1 .ra-chartramp span:first-child { border-radius: var(--ra1-r-sm) 0 0 var(--ra1-r-sm); }
body.ra--v1 .ra-chartramp span:last-child { border-radius: 0 var(--ra1-r-sm) var(--ra1-r-sm) 0; }
body.ra--v1 .ra-chartramp .s1 { background: var(--ra-chart-seq-1); } body.ra--v1 .ra-chartramp .s2 { background: var(--ra-chart-seq-2); }
body.ra--v1 .ra-chartramp .s3 { background: var(--ra-chart-seq-3); } body.ra--v1 .ra-chartramp .s4 { background: var(--ra-chart-seq-4); }
body.ra--v1 .ra-chartramp .s5 { background: var(--ra-chart-seq-5); }
body.ra--v1 .ra-chartramp .d1 { background: var(--ra-chart-div-neg-2); } body.ra--v1 .ra-chartramp .d2 { background: var(--ra-chart-div-neg-1); }
body.ra--v1 .ra-chartramp .d3 { background: var(--ra-chart-div-mid); } body.ra--v1 .ra-chartramp .d4 { background: var(--ra-chart-div-pos-1); }
body.ra--v1 .ra-chartramp .d5 { background: var(--ra-chart-div-pos-2); }

/* design-view params panel: at the end of the page, away from the real content */
body.ra--v1 .ra-paramspanel { display: grid; gap: var(--ra-space-2); margin-top: var(--ra-space-6, 32px); padding-top: var(--ra-space-4); border-top: 1px dashed var(--ra-border-strong); }
body.ra--v1 .ra-paramspanel .ra-params,
body.ra--v1 .ra-exportpanel .ra-paramspanel .ra-params { margin: 0; }
body.ra--v1 .ra-params[hidden] { display: none; }
body.ra--v1 .ra-params__for { font-weight: var(--ra-fw-semibold); color: var(--ra-text); }

.leaflet-control-attribution a svg{display:none !important;}

/* ---------- Processing overlay: .ra-processing (html/processing.html) -----------
   Full screen over everything while a long job runs (export, import …): a data assembly line —
   rows come in on a belt, 01 a scanner reads them, 02 a linker joins the related tables, 03 a press builds
   them, 04 they drop into the crate —
   then the job name, one status line and the progress bar. Light / dark through the --ra-* tokens.
   The line is drawn on a 1200 × 340 grid: --u = 1/1200 of its width (container units), so it scales
   without JavaScript. Progress: --ra-proc-pct (0–100) drives the bar, the % and the crate gauge;
   the page alone animates it, a script sets it and adds .is-live. States: .is-done, .is-error. */
@property --ra-proc-pct { syntax: "<integer>"; inherits: true; initial-value: 0; }
body.ra--v1 .ra-processing {
  --proc-ink: var(--ra-text-heading);
  --proc-muted: var(--ra-text-soft);
  --proc-accent: var(--ra-primary-text);
  --proc-grid: var(--ra-bg-subtle);
  --proc-metal: var(--ra-bg-subtle);
  --proc-steel: var(--ra-border);
  --proc-edge: var(--ra-green-300);
  --proc-belt-a: var(--ra-bg-hover);
  --proc-belt-b: var(--ra-bg-subtle);
  --proc-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
  position: fixed; inset: 0; z-index: 1090;
  display: flex; flex-direction: column; overflow: auto;
  padding: var(--ra-space-5) var(--ra-space-6);
  font-family: var(--ra-font-sans); color: var(--proc-ink);
  background-color: var(--ra-bg-app);
  background-image: linear-gradient(var(--proc-grid) 1px, transparent 1px), linear-gradient(90deg, var(--proc-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: ra-proc-run 14s cubic-bezier(.2, .6, .3, 1) forwards;
}
body.ra--v1 .ra-processing.is-live { animation: none; }
body.ra--v1 .ra-processing.is-done { --ra-proc-pct: 100; }
@keyframes ra-proc-run { from { --ra-proc-pct: 0; } to { --ra-proc-pct: 96; } }

/* top bar: kind badge · brand */
body.ra--v1 .ra-processing__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ra-space-4); flex-wrap: wrap; }
body.ra--v1 .ra-processing__badge {
  display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px;
  border: 1px solid var(--proc-steel); border-radius: 16px; background: var(--ra-bg-surface);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--proc-accent);
}
body.ra--v1 .ra-processing__live { width: 8px; height: 8px; border-radius: 50%; background: var(--ra-brand); animation: ra-proc-live 1.4s ease-out infinite; }
body.ra--v1 .ra-processing.is-done .ra-processing__live,
body.ra--v1 .ra-processing.is-error .ra-processing__live { animation: none; }
body.ra--v1 .ra-processing.is-error .ra-processing__live { background: var(--ra-danger); }
body.ra--v1 .ra-processing__brand { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--proc-muted); }
body.ra--v1 .ra-processing__brand b { color: var(--proc-ink); }
@keyframes ra-proc-live { from { box-shadow: 0 0 0 0 rgba(106, 183, 69, .55); } to { box-shadow: 0 0 0 10px rgba(106, 183, 69, 0); } }

body.ra--v1 .ra-processing__body { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--ra-space-6); padding: var(--ra-space-5) 0; }

/* ---- the line (1200 × 340 grid) ---- */
body.ra--v1 .ra-processing__line {
  --u: calc(100cqw / 1200);
  position: relative; container-type: inline-size; aspect-ratio: 1200 / 340;
  width: max(min(100%, 320px), min(1200px, 100%, calc((100vh - 360px) * 3.53)));
}
body.ra--v1 .ra-processing__line > *,
body.ra--v1 .ra-processing__packets > * { position: absolute; box-sizing: border-box; }
body.ra--v1 .ra-processing.is-done .ra-processing__line *,
body.ra--v1 .ra-processing.is-error .ra-processing__line * { animation-play-state: paused; }
body.ra--v1 .ra-processing.is-done .ra-processing__packets { display: none; }

/* station plates: 01 · 02 · 03 · 04 */
body.ra--v1 .ra-processing__plate {
  min-width: calc(var(--u) * 156); height: calc(var(--u) * 32); padding: 0 calc(var(--u) * 12); z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 8);
  border: 1px solid var(--proc-steel); border-radius: calc(var(--u) * 6); background: var(--ra-bg-surface);
  font-size: calc(var(--u) * 12); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  color: var(--proc-muted);
}
body.ra--v1 .ra-processing__plate b { font-family: var(--proc-mono); font-weight: 600; color: var(--proc-muted); }
body.ra--v1 .ra-processing__plate--1 { left: calc(var(--u) * 209); top: calc(var(--u) * 64); transform: translateX(-50%); }
body.ra--v1 .ra-processing__plate--2 { left: calc(var(--u) * 471); top: calc(var(--u) * 52); transform: translateX(-50%); }
body.ra--v1 .ra-processing__plate--3 { left: calc(var(--u) * 771); top: calc(var(--u) * 40); transform: translateX(-50%); }
body.ra--v1 .ra-processing__plate--4 { right: calc(var(--u) * 80); top: calc(var(--u) * 150); }
body.ra--v1 .ra-processing__plate.is-active { color: var(--proc-ink); background: var(--ra-primary-surface); border-color: var(--proc-edge); }
body.ra--v1 .ra-processing__plate.is-active b,
body.ra--v1 .ra-processing__plate.is-done,
body.ra--v1 .ra-processing__plate.is-done b { color: var(--proc-accent); }

/* worker bots (behind the belt) */
body.ra--v1 .ra-processing__bot { top: calc(var(--u) * 162); width: calc(var(--u) * 70); height: calc(var(--u) * 96); z-index: 1; overflow: visible; }
body.ra--v1 .ra-processing__bot--a { left: calc(var(--u) * 290); }
body.ra--v1 .ra-processing__bot--b { left: calc(var(--u) * 846); }
body.ra--v1 .ra-processing__bot-shell { fill: var(--proc-metal); stroke: var(--proc-edge); stroke-width: 2; }
body.ra--v1 .ra-processing__bot-visor { fill: var(--ra-bg-app); }
body.ra--v1 .ra-processing__bot-eye { fill: var(--proc-accent); animation: ra-proc-eye 2.4s ease-in-out infinite; }
body.ra--v1 .ra-processing__bot-neck { fill: var(--proc-steel); }
body.ra--v1 .ra-processing__bot-antenna { stroke: var(--proc-edge); stroke-width: 2; }
body.ra--v1 .ra-processing__bot-badge { fill: var(--ra-brand); }
body.ra--v1 .ra-processing__bot-arm { fill: var(--proc-edge); transform-box: fill-box; transform-origin: 0 50%; animation: ra-proc-arm .75s ease-in-out infinite; }
body.ra--v1 .ra-processing__bot-arm--l { transform-origin: 100% 50%; animation: ra-proc-arm-l 1.5s ease-in-out infinite; }
body.ra--v1 .ra-processing__bot--b .ra-processing__bot-eye { animation-delay: -1.2s; }
body.ra--v1 .ra-processing__bot--b .ra-processing__bot-arm { animation-delay: -.3s; }
@keyframes ra-proc-eye { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(9px); } 60% { transform: translateX(-9px); } }
@keyframes ra-proc-arm { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(18deg); } }
@keyframes ra-proc-arm-l { 0%, 100% { transform: rotate(12deg); } 50% { transform: rotate(-22deg); } }

/* gantries (posts + top bar) */
body.ra--v1 .ra-processing__post { width: calc(var(--u) * 6); border-radius: calc(var(--u) * 3); background: var(--proc-steel); z-index: 2; }
body.ra--v1 .ra-processing__post--s1 { left: calc(var(--u) * 165); top: calc(var(--u) * 108); height: calc(var(--u) * 166); }
body.ra--v1 .ra-processing__post--s2 { left: calc(var(--u) * 247); top: calc(var(--u) * 108); height: calc(var(--u) * 166); }
body.ra--v1 .ra-processing__post--p1 { left: calc(var(--u) * 727); top: calc(var(--u) * 88); height: calc(var(--u) * 186); }
body.ra--v1 .ra-processing__post--p2 { left: calc(var(--u) * 809); top: calc(var(--u) * 88); height: calc(var(--u) * 186); }
body.ra--v1 .ra-processing__post--l1 { left: calc(var(--u) * 431); top: calc(var(--u) * 100); height: calc(var(--u) * 174); }
body.ra--v1 .ra-processing__post--l2 { left: calc(var(--u) * 513); top: calc(var(--u) * 100); height: calc(var(--u) * 174); }
body.ra--v1 .ra-processing__rail { width: calc(var(--u) * 100); height: calc(var(--u) * 10); border-radius: calc(var(--u) * 4); background: var(--ra-border-strong); z-index: 2; }
body.ra--v1 .ra-processing__rail--s { left: calc(var(--u) * 159); top: calc(var(--u) * 104); }
body.ra--v1 .ra-processing__rail--p { left: calc(var(--u) * 721); top: calc(var(--u) * 84); }
body.ra--v1 .ra-processing__rail--l { left: calc(var(--u) * 421); top: calc(var(--u) * 96); }

/* 01 scanner */
body.ra--v1 .ra-processing__scanner {
  left: calc(var(--u) * 187); top: calc(var(--u) * 114); width: calc(var(--u) * 44); height: calc(var(--u) * 22); z-index: 2;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--proc-edge); border-top: 0; border-radius: 0 0 calc(var(--u) * 8) calc(var(--u) * 8); background: var(--proc-metal);
}
body.ra--v1 .ra-processing__scanner::after { content: ""; width: calc(var(--u) * 18); height: calc(var(--u) * 4); border-radius: 2px; background: var(--ra-brand); }
body.ra--v1 .ra-processing__beam {
  left: calc(var(--u) * 171); top: calc(var(--u) * 136); width: calc(var(--u) * 76); height: calc(var(--u) * 112); z-index: 2;
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  background: linear-gradient(rgba(106, 183, 69, .38), rgba(106, 183, 69, .04));
  animation: ra-proc-beam .75s ease-in-out infinite;
}
body.ra--v1 .ra-processing__laser {
  left: calc(var(--u) * 173); top: calc(var(--u) * 246); width: calc(var(--u) * 72); height: 2px; z-index: 4;
  border-radius: 1px; background: var(--ra-brand); box-shadow: 0 0 12px 2px rgba(106, 183, 69, .7);
  animation: ra-proc-laser .75s ease-in-out infinite;
}
@keyframes ra-proc-beam { 0%, 100% { opacity: .45; } 10% { opacity: 1; } 40% { opacity: .55; } }
@keyframes ra-proc-laser { 0%, 100% { opacity: .4; transform: scaleX(.7); } 10% { opacity: 1; transform: scaleX(1); } }

/* 02 linker: lookups across the related tables (3 chips) → cables → the probe tags the row with a link */
body.ra--v1 .ra-processing__hub {
  left: calc(var(--u) * 439); top: calc(var(--u) * 106); width: calc(var(--u) * 64); height: calc(var(--u) * 30); z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 5);
  border: 1px solid var(--proc-edge); border-radius: 0 0 calc(var(--u) * 8) calc(var(--u) * 8); background: var(--proc-metal);
}
body.ra--v1 .ra-processing__hub i { width: calc(var(--u) * 12); height: calc(var(--u) * 9); border-radius: 2px; background: var(--proc-steel); animation: ra-proc-lookup .75s steps(1) infinite; }
body.ra--v1 .ra-processing__hub i:nth-child(2) { animation-delay: .25s; }
body.ra--v1 .ra-processing__hub i:nth-child(3) { animation-delay: .5s; }
body.ra--v1 .ra-processing__cables { left: calc(var(--u) * 455); top: calc(var(--u) * 136); width: calc(var(--u) * 32); height: calc(var(--u) * 62); z-index: 2; overflow: visible; }
body.ra--v1 .ra-processing__cables path { fill: none; stroke: var(--ra-brand); stroke-width: 1.5; stroke-dasharray: 3 4; animation: ra-proc-flow .6s linear infinite; }
body.ra--v1 .ra-processing__probe {
  left: calc(var(--u) * 461); top: calc(var(--u) * 196); width: calc(var(--u) * 20); height: calc(var(--u) * 12); z-index: 3;
  border-radius: calc(var(--u) * 3); background: var(--ra-brand); box-shadow: 0 0 10px rgba(106, 183, 69, .55);
  animation: ra-proc-probe .75s ease-in-out infinite;
}
@keyframes ra-proc-lookup { 0% { background: var(--ra-brand); } 33% { background: var(--proc-steel); } }
@keyframes ra-proc-flow { to { stroke-dashoffset: -14; } }
@keyframes ra-proc-probe { 0%, 22%, 100% { transform: translateY(0); } 8% { transform: translateY(calc(var(--u) * 8)); } }

/* 03 press */
body.ra--v1 .ra-processing__housing {
  left: calc(var(--u) * 751); top: calc(var(--u) * 94); width: calc(var(--u) * 40); height: calc(var(--u) * 36); z-index: 3;
  border: 1px solid var(--proc-edge); border-radius: 0 0 calc(var(--u) * 6) calc(var(--u) * 6); background: var(--proc-metal);
}
body.ra--v1 .ra-processing__ram {
  left: calc(var(--u) * 747); top: calc(var(--u) * 130); width: calc(var(--u) * 48); height: calc(var(--u) * 54); z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  animation: ra-proc-ram .75s cubic-bezier(.5, 0, .3, 1) infinite;
}
body.ra--v1 .ra-processing__ram::before { content: ""; width: calc(var(--u) * 10); height: calc(var(--u) * 40); background: var(--proc-edge); }
body.ra--v1 .ra-processing__ram::after { content: ""; width: 100%; height: calc(var(--u) * 14); border-radius: calc(var(--u) * 4); background: var(--ra-brand); box-shadow: 0 2px 0 var(--ra-green-800); }
body.ra--v1 .ra-processing__flash {
  left: calc(var(--u) * 741); top: calc(var(--u) * 202); width: calc(var(--u) * 60); height: calc(var(--u) * 26); z-index: 4;
  border: 2px solid var(--ra-brand); border-radius: 50%;
  animation: ra-proc-flash .75s linear infinite;
}
@keyframes ra-proc-ram { 0%, 20% { transform: translateY(0); } 37% { transform: translateY(calc(var(--u) * 30)); } 50%, 100% { transform: translateY(0); } }
@keyframes ra-proc-flash { 0%, 35% { opacity: 0; transform: scale(.4); } 38% { opacity: 1; transform: scale(1); } 55%, 100% { opacity: 0; transform: scale(1.6); } }

/* belt, rollers, legs, floor */
body.ra--v1 .ra-processing__belt {
  left: calc(var(--u) * 30); top: calc(var(--u) * 250); width: calc(var(--u) * 960); height: calc(var(--u) * 22); z-index: 2;
  border: 1px solid var(--proc-steel); border-radius: calc(var(--u) * 11);
  background-image: repeating-linear-gradient(90deg, var(--proc-belt-a) 0 calc(var(--u) * 12), var(--proc-belt-b) calc(var(--u) * 12) calc(var(--u) * 24));
  animation: ra-proc-belt .138s linear infinite;
}
body.ra--v1 .ra-processing__roller {
  top: calc(var(--u) * 250); width: calc(var(--u) * 22); height: calc(var(--u) * 22); z-index: 3;
  border: 2px solid var(--proc-edge); border-radius: 50%; background: var(--proc-metal);
  animation: ra-proc-spin .55s linear infinite;
}
body.ra--v1 .ra-processing__roller::after { content: ""; position: absolute; left: calc(50% - 1px); top: 15%; width: 2px; height: 70%; background: var(--ra-brand); }
body.ra--v1 .ra-processing__roller--in { left: calc(var(--u) * 30); }
body.ra--v1 .ra-processing__roller--out { left: calc(var(--u) * 968); }
body.ra--v1 .ra-processing__leg { top: calc(var(--u) * 272); width: calc(var(--u) * 6); height: calc(var(--u) * 60); background: var(--proc-belt-a); }
body.ra--v1 .ra-processing__leg--1 { left: calc(var(--u) * 120); }
body.ra--v1 .ra-processing__leg--2 { left: calc(var(--u) * 480); }
body.ra--v1 .ra-processing__leg--3 { left: calc(var(--u) * 860); }
body.ra--v1 .ra-processing__floor { left: 0; top: calc(var(--u) * 332); width: 100%; height: 1px; background: var(--proc-steel); }
@keyframes ra-proc-belt { to { background-position: calc(var(--u) * 24) 0; } }
@keyframes ra-proc-spin { to { transform: rotate(360deg); } }

/* data packets: 8 on a 6 s loop, one every .75 s — in sync with the scanner, the linker, the press and the crate
   (a station sits where a packet passes at the same phase: every 130.8 units) */
body.ra--v1 .ra-processing__packets { inset: 0; z-index: 3; }
body.ra--v1 .ra-processing__packet {
  left: calc(var(--u) * 40); top: calc(var(--u) * 216); width: calc(var(--u) * 56); height: calc(var(--u) * 34);
  display: flex; flex-direction: column; gap: calc(var(--u) * 4); padding: calc(var(--u) * 7) calc(var(--u) * 8);
  border: 1px solid var(--proc-steel); border-radius: calc(var(--u) * 6);
  background: var(--ra-bg-surface); color: var(--proc-steel); opacity: 0;
  animation: ra-proc-packet 6s linear infinite;
}
body.ra--v1 .ra-processing__packet::before,
body.ra--v1 .ra-processing__packet::after { content: ""; height: calc(var(--u) * 3); border-radius: 2px; background: currentColor; }
body.ra--v1 .ra-processing__packet::after { width: 58%; }
body.ra--v1 .ra-processing__packet b {
  position: absolute; top: calc(var(--u) * -7); left: calc(var(--u) * -7); width: calc(var(--u) * 16); height: calc(var(--u) * 16);
  border: 2px solid var(--ra-bg-app); border-radius: 50%; background: var(--proc-accent); opacity: 0;
  animation: ra-proc-link 6s linear infinite;
}
body.ra--v1 .ra-processing__packet i {
  position: absolute; top: calc(var(--u) * -7); right: calc(var(--u) * -7); width: calc(var(--u) * 16); height: calc(var(--u) * 16);
  border: 2px solid var(--ra-bg-app); border-radius: 50%; background: var(--proc-ink); opacity: 0;
  animation: ra-proc-tag 6s linear infinite;
}
body.ra--v1 .ra-processing__packet:nth-child(2) { animation-delay: -.75s; }
body.ra--v1 .ra-processing__packet:nth-child(3) { animation-delay: -1.5s; }
body.ra--v1 .ra-processing__packet:nth-child(4) { animation-delay: -2.25s; }
body.ra--v1 .ra-processing__packet:nth-child(5) { animation-delay: -3s; }
body.ra--v1 .ra-processing__packet:nth-child(6) { animation-delay: -3.75s; }
body.ra--v1 .ra-processing__packet:nth-child(7) { animation-delay: -4.5s; }
body.ra--v1 .ra-processing__packet:nth-child(8) { animation-delay: -5.25s; }
body.ra--v1 .ra-processing__packet > b,
body.ra--v1 .ra-processing__packet > i { animation-delay: inherit; }
@keyframes ra-proc-packet {
  0% { transform: translate(0, 0); opacity: 0; background: var(--ra-bg-surface); border-color: var(--proc-steel); color: var(--proc-steel); }
  4% { opacity: 1; }
  12% { background: var(--ra-bg-surface); border-color: var(--proc-steel); color: var(--proc-steel); }
  14.5% { background: var(--ra-brand); border-color: var(--ra-brand); color: var(--ra-primary-on); }
  86% { transform: translate(calc(var(--u) * 900), 0); }
  93% { transform: translate(calc(var(--u) * 972), calc(var(--u) * 24)) scale(.8); opacity: 1; }
  100% { transform: translate(calc(var(--u) * 972), calc(var(--u) * 70)) scale(.6); opacity: 0; background: var(--ra-brand); border-color: var(--ra-brand); color: var(--ra-primary-on); }
}
@keyframes ra-proc-tag { 0%, 66% { opacity: 0; transform: scale(.3); } 69% { opacity: 1; transform: scale(1.25); } 72%, 100% { opacity: 1; transform: scale(1); } }
@keyframes ra-proc-link { 0%, 38% { opacity: 0; transform: scale(.3); } 41% { opacity: 1; transform: scale(1.25); } 44%, 100% { opacity: 1; transform: scale(1); } }

/* 04 crate: back edge under the packets, front over them */
body.ra--v1 .ra-processing__crate-back {
  left: calc(var(--u) * 962); top: calc(var(--u) * 262); width: calc(var(--u) * 156); height: calc(var(--u) * 10); z-index: 1;
  border: 1px solid var(--proc-steel); border-bottom: 0; border-radius: calc(var(--u) * 4) calc(var(--u) * 4) 0 0; background: var(--proc-metal);
}
body.ra--v1 .ra-processing__crate {
  left: calc(var(--u) * 960); top: calc(var(--u) * 268); width: calc(var(--u) * 160); height: calc(var(--u) * 64); z-index: 5;
  display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--u) * 12) calc(var(--u) * 14);
  border: 1px solid var(--proc-edge); border-radius: calc(var(--u) * 4) calc(var(--u) * 4) calc(var(--u) * 8) calc(var(--u) * 8);
  background: var(--ra-bg-surface);
  font-family: var(--proc-mono); font-size: calc(var(--u) * 12); color: var(--proc-ink);
  animation: ra-proc-crate .75s ease-out infinite;
}
body.ra--v1 .ra-processing__crate span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ra--v1 .ra-processing__crate::after {
  content: ""; height: calc(var(--u) * 4); border-radius: 2px;
  background: linear-gradient(90deg, var(--ra-brand) calc(var(--ra-proc-pct) * 1%), var(--proc-belt-a) 0);
}
@keyframes ra-proc-crate { 0%, 40%, 80%, 100% { box-shadow: inset 0 2px 0 var(--proc-edge); } 46% { box-shadow: inset 0 2px 0 var(--ra-brand), 0 -6px 18px -6px rgba(106, 183, 69, .6); } }

/* ---- job: name, status line, bar + % ---- */
body.ra--v1 .ra-processing__panel { width: min(640px, 100%); display: flex; flex-direction: column; align-items: center; gap: var(--ra-space-5); text-align: center; }
body.ra--v1 .ra-processing__title { margin: 0 0 6px; font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; color: var(--proc-ink); }
body.ra--v1 .ra-processing__status { margin: 0; font-family: var(--proc-mono); font-size: .875rem; color: var(--proc-accent); }
body.ra--v1 .ra-processing__status::after {
  content: ""; display: inline-block; width: 8px; height: 15px; margin-left: 3px; vertical-align: -2px;
  background: currentColor; animation: ra-proc-blink 1s steps(1) infinite;
}
body.ra--v1 .ra-processing.is-done .ra-processing__status::after,
body.ra--v1 .ra-processing.is-error .ra-processing__status::after { display: none; }
body.ra--v1 .ra-processing.is-error .ra-processing__status { color: var(--ra-danger-text); }
@keyframes ra-proc-blink { 50% { opacity: 0; } }
body.ra--v1 .ra-processing__meter { width: 100%; display: flex; align-items: center; gap: var(--ra-space-4); counter-reset: ra-proc-pct var(--ra-proc-pct); }
body.ra--v1 .ra-processing__bar { flex: 1; height: 8px; overflow: hidden; border-radius: 4px; background: var(--proc-belt-a); }
body.ra--v1 .ra-processing__fill {
  height: 100%; width: calc(var(--ra-proc-pct) * 1%); border-radius: 4px;
  background-color: var(--ra-brand);
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .18) 0 10px, transparent 10px 20px);
  background-size: 28px 28px; animation: ra-proc-sheen .9s linear infinite;
}
body.ra--v1 .ra-processing.is-done .ra-processing__fill { animation: none; background-image: none; }
body.ra--v1 .ra-processing.is-error .ra-processing__fill { animation: none; background-image: none; background-color: var(--ra-danger); }
body.ra--v1 .ra-processing__pct { width: 56px; text-align: right; font-family: var(--proc-mono); font-size: 1.25rem; font-weight: 600; color: var(--proc-ink); }
body.ra--v1 .ra-processing__pct::before { content: counter(ra-proc-pct) "%"; }
@keyframes ra-proc-sheen { to { background-position: 28px 0; } }
body.ra--v1 .ra-processing__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ra-space-3); }
body.ra--v1 .ra-processing__actions[hidden] { display: none; }

@media (max-width: 575.98px) {
  body.ra--v1 .ra-processing { padding: var(--ra-space-4); }
  body.ra--v1 .ra-processing__plate { display: none; }
  body.ra--v1 .ra-processing__title { font-size: 1.375rem; }
}
/* No prefers-reduced-motion block on purpose: this is a progress indicator, the motion tells the user the job is running. */
/* photo link and initials tile keep the same 60px box, so the text after them lines up */
body.ra--v1 .cover-thumbnail :is(a, button):has(> .img-thumbnail) { flex: none; display: block; }
body.ra--v1 .cover-thumbnail .img-thumbnail {
	flex: none;
	max-width: none;
	padding: .125rem;
	width: 60px;
	height: 60px;
	object-fit: cover;
}
body.ra--v1 .cover-thumbnail > .d-flex > div:last-child { min-width: 0; }
body.ra--v1 .cover-thumbnail > .d-flex > div:last-child > * { display: block; overflow: hidden; text-overflow: ellipsis; }
/* phone: the sticky first column is 150px — a smaller tile leaves room for the name */
@media (max-width: 575.98px) {
  body.ra--v1 .cover-thumbnail > .d-flex { gap: 8px !important; }   /* beats Bootstrap's .gap-4 utility */
  body.ra--v1 .cover-thumbnail .img-thumbnail { width: 40px; height: 40px; font-size: var(--ra-fs-sm) !important; }   /* beats .fs-5 */
}