/* v11.839.0 — the app shell: the collapsible LEFT NAVIGATION (the rail). It is built in the browser from the menus the server already rendered for the person (static/js/app_shell.js), so
   rights, module switches and new menu entries show here with no second list to maintain. Dark navy in both themes, like the top bar. Dark mode needs nothing more: the rail is already dark. */
:root { --rail-w: 252px; --rail-bg: #0b1220; --rail-fg: #cbd5e1; --rail-dim: #64748b; --rail-acc: #6366f1; }
html.rail-collapsed { --rail-w: 72px; }
@media (max-width: 1199.98px) { :root, html.rail-collapsed { --rail-w: 0px; } }
body[data-nav="rail"] { padding-left: var(--rail-w); transition: padding-left .2s ease; }
body[data-nav="rail"] .rail-hidden { display: none !important; }
@media (min-width: 1200px) { body[data-nav="rail"] .navbar-collapse { flex-basis: auto; } }

.rail { position: fixed; z-index: 1031; top: 0; left: 0; bottom: 0; width: 252px; display: flex; flex-direction: column; color: var(--rail-fg); background: linear-gradient(180deg, #0b1220 0%, #0f172a 60%, #111827 100%); border-right: 1px solid rgba(148,163,184,.12); transition: width .2s ease, transform .22s ease; font-size: .86rem; }
@media (min-width: 1200px) { html.rail-collapsed .rail { width: 72px; } }
@media (max-width: 1199.98px) { .rail { width: 286px; transform: translateX(-102%); box-shadow: 0 0 40px rgba(0,0,0,.5); } body.rail-open .rail { transform: none; z-index: 1062; } body.rail-open::after { content: ""; position: fixed; inset: 0; z-index: 1061; background: rgba(2,6,23,.55); } }
.rail a { text-decoration: none; }
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; min-height: 62px; }
.rail-logo { width: 34px; height: 34px; flex: none; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .95rem; letter-spacing: -.02em; color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6); box-shadow: 0 6px 18px rgba(99,102,241,.45); }
.rail-title { min-width: 0; line-height: 1.1; } .rail-title b { display: block; color: #f8fafc; font-size: 1.02rem; letter-spacing: -.01em; } .rail-title small { display: block; color: var(--rail-dim); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.rail-collapse { margin-left: auto; border: 0; background: rgba(148,163,184,.1); color: var(--rail-fg); width: 28px; height: 28px; border-radius: 9px; cursor: pointer; flex: none; } .rail-collapse:hover { background: rgba(148,163,184,.22); color: #fff; }
.rail-collapse i { display: inline-block; }
.rail-search { position: relative; margin: 4px 12px 8px; } .rail-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--rail-dim); font-size: .85rem; pointer-events: none; }
.rail-search input { width: 100%; background: rgba(148,163,184,.1); border: 1px solid transparent; color: #f1f5f9; border-radius: 11px; padding: 7px 34px 7px 31px; font-size: .84rem; } .rail-search input::placeholder { color: var(--rail-dim); } .rail-search input:focus { outline: 0; border-color: var(--rail-acc); background: rgba(99,102,241,.12); }
.rail-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: rgba(148,163,184,.16); color: var(--rail-dim); border-radius: 6px; font-size: .66rem; padding: 0 6px; pointer-events: none; }
.rail-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 2px 8px 10px; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.25) transparent; }
.rail-item { position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 10px; color: var(--rail-fg); white-space: nowrap; line-height: 1.25; transition: background .12s, color .12s; }
.rail-item > i, .rail-item .ri { flex: none; width: 20px; text-align: center; font-size: 1.02rem; } .rail-item .rt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail-item:hover { background: rgba(148,163,184,.12); color: #fff; } .rail-item.on { background: linear-gradient(90deg, rgba(99,102,241,.28), rgba(99,102,241,.08)); color: #fff; font-weight: 600; } .rail-item.on::before { content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 4px 4px 0; background: var(--rail-acc); }
.rail-item .rpin { margin-left: auto; opacity: 0; border: 0; background: none; color: var(--rail-dim); width: 22px; height: 22px; border-radius: 7px; cursor: pointer; flex: none; font-size: .8rem; } .rail-item:hover .rpin, .rail-item .rpin.on { opacity: 1; } .rail-item .rpin.on { color: #fbbf24; } .rail-item .rpin:hover { background: rgba(148,163,184,.2); color: #fff; }
.rail-item .badge { margin-left: auto; }
.rail-sec { display: flex; align-items: center; gap: 8px; width: 100%; margin: 12px 0 2px; padding: 4px 10px; border: 0; background: none; color: var(--rail-dim); font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; cursor: default; text-align: left; }
.rail-grp { margin: 6px 0 2px; } .rail-grp > .rail-gh { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; background: none; color: #e2e8f0; font-weight: 700; border-radius: 10px; cursor: pointer; text-align: left; } .rail-gh:hover { background: rgba(148,163,184,.1); } .rail-gh > i:first-child { width: 20px; text-align: center; font-size: 1.05rem; color: #a5b4fc; } .rail-gh .chev { margin-left: auto; font-size: .7rem; color: var(--rail-dim); transition: transform .15s; } .rail-grp.open > .rail-gh .chev { transform: rotate(90deg); }
.rail-gb { display: none; padding: 0 0 4px 6px; margin-left: 18px; border-left: 1px solid rgba(148,163,184,.14); } .rail-grp.open > .rail-gb { display: block; }
.rail-gb .rail-sec { margin-top: 8px; }
.rail-pin-sec .rail-item i { color: #fbbf24; }
.rail-none { display: none; padding: 14px 12px; color: var(--rail-dim); font-size: .82rem; } .rail.searching.nomatch .rail-none { display: block; }
.rail-foot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid rgba(148,163,184,.12); }
.rail-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; color: #fff; background: linear-gradient(135deg, #0891b2, #6366f1); } .rail-who { min-width: 0; line-height: 1.15; } .rail-who b { display: block; color: #f1f5f9; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; } .rail-who a { color: var(--rail-dim); font-size: .7rem; } .rail-who a:hover { color: #fff; }
.rail-foot .rail-tools { margin-left: auto; display: flex; gap: 4px; } .rail-tools button, .rail-tools a { border: 0; background: rgba(148,163,184,.1); color: var(--rail-fg); width: 28px; height: 28px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; } .rail-tools button:hover, .rail-tools a:hover { background: rgba(148,163,184,.24); color: #fff; }
/* collapsed: icons only (wide screens only; the flyout keeps its labels) */
@media (min-width: 1200px) {
  html.rail-collapsed .rail .rail-title, html.rail-collapsed .rail .rail-search, html.rail-collapsed .rail .rail-item .rt, html.rail-collapsed .rail .rail-item .rpin, html.rail-collapsed .rail .rail-item .badge, html.rail-collapsed .rail .rail-who, html.rail-collapsed .rail .rail-tools, html.rail-collapsed .rail .rail-gh .gt, html.rail-collapsed .rail .rail-gh .chev, html.rail-collapsed .rail .rail-sec span { display: none; }
  html.rail-collapsed .rail .rail-brand { flex-direction: column; padding: 12px 0 6px; gap: 8px; } html.rail-collapsed .rail .rail-collapse { margin: 0; }
  html.rail-collapsed .rail .rail-item, html.rail-collapsed .rail .rail-gh { justify-content: center; padding: 9px 0; } html.rail-collapsed .rail .rail-gb { display: none !important; } html.rail-collapsed .rail .rail-grp { margin: 2px 0; }
  html.rail-collapsed .rail .rail-sec { margin: 6px 0; padding: 0; border-top: 1px solid rgba(148,163,184,.14); } html.rail-collapsed .rail .rail-foot { justify-content: center; padding: 10px 0; }
}
/* flyout of a group when the rail is collapsed */
.rail-fly { position: fixed; z-index: 1032; left: 76px; top: 70px; bottom: 16px; width: 300px; background: #0f172a; border: 1px solid rgba(148,163,184,.2); border-radius: 16px; box-shadow: 0 24px 60px rgba(2,6,23,.6); display: none; flex-direction: column; overflow: hidden; color: var(--rail-fg); } .rail-fly.on { display: flex; }
.rail-fly header { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; font-weight: 800; color: #f8fafc; } .rail-fly header i { color: #a5b4fc; } .rail-fly .rail-scroll { padding: 0 8px 10px; }
.rail-fly a, .rail-fly .rail-item { text-decoration: none; }
/* the burger of the small screens, in the top bar */
.rail-burger { display: none; border: 0; background: rgba(255,255,255,.1); color: #fff; border-radius: 10px; width: 36px; height: 34px; margin-right: 6px; flex: none; }
@media (max-width: 1199.98px) { body[data-nav="rail"] .rail-burger { display: inline-flex; align-items: center; justify-content: center; } }
@media print { .rail, .rail-fly, .rail-burger { display: none !important; } body[data-nav="rail"] { padding-left: 0; } }
/* the user's choice of menu: a discreet switch in the top-menu mode too */
.rail-back { display: none; }
body[data-nav="top"] .rail-back { display: inline-flex; }
@media (min-width: 1200px) { body[data-nav="rail"] .navbar > .container-fluid > .navbar-brand, body[data-nav="rail"] .navbar > .container-fluid > a.btn.btn-link { display: none !important; } }

/* ── the command palette ──────────────────────────────────────────────────────────────────────────────────────────────── */
.pal-wrap { position: fixed; inset: 0; z-index: 2000; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; background: rgba(2,6,23,.5); backdrop-filter: blur(6px); opacity: 0; transition: opacity .16s; } .pal-wrap.on { opacity: 1; } .pal-wrap[hidden] { display: none; }
.pal { width: min(640px, calc(100vw - 24px)); background: rgba(15,23,42,.94); color: #e2e8f0; border: 1px solid rgba(148,163,184,.25); border-radius: 20px; box-shadow: 0 40px 100px rgba(2,6,23,.65), 0 0 0 1px rgba(99,102,241,.25), 0 0 80px rgba(99,102,241,.18); overflow: hidden; transform: translateY(-8px) scale(.98); transition: transform .2s cubic-bezier(.34,1.4,.64,1); } .pal-wrap.on .pal { transform: none; }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid rgba(148,163,184,.18); } .pal-in > i { font-size: 1.15rem; color: #818cf8; } .pal-in input { flex: 1; background: none; border: 0; color: #f8fafc; font-size: 1.1rem; outline: 0; } .pal-in input::placeholder { color: #64748b; }
.pal kbd { background: rgba(148,163,184,.16); color: #94a3b8; border-radius: 6px; padding: 1px 7px; font-size: .7rem; font-family: inherit; margin: 0 2px; }
.pal-list { max-height: 52vh; overflow: auto; padding: 8px; } .pal-r { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: #cbd5e1; text-align: left; padding: 9px 12px; border-radius: 12px; cursor: pointer; font-size: .95rem; } .pal-r i { width: 22px; text-align: center; font-size: 1.05rem; } .pal-r .pt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pal-r em { font-style: normal; font-size: .72rem; color: #64748b; }
.pal-r.on { background: linear-gradient(90deg, rgba(99,102,241,.35), rgba(99,102,241,.12)); color: #fff; } .pal-r mark { background: none; color: #a5b4fc; font-weight: 800; } .pal-r.on mark { color: #fff; text-decoration: underline; text-decoration-color: #a5b4fc; text-underline-offset: 3px; }
.pal-none { padding: 26px; text-align: center; color: #64748b; } .pal-ft { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid rgba(148,163,184,.18); color: #64748b; font-size: .74rem; }
.pal-keys { padding: 20px 24px; } .pal-keys h3 { font-size: 1.05rem; margin: 0 0 12px; color: #f8fafc; } .pal-keys h3 i { color: #818cf8; } .pal-keys div { display: flex; gap: 16px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(148,163,184,.12); } .pal-keys div kbd { min-width: 110px; text-align: center; } .pal-keys span { color: #cbd5e1; font-size: .9rem; }

/* v11.853.0 — the account menu of the rail footer + an always-visible Sign out */
.rail-foot { position: relative; }
.rail-me { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: inherit; text-align: left; padding: 4px 6px; margin: -4px -6px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.rail-me:hover, .rail-me[aria-expanded="true"] { background: rgba(148,163,184,.14); }
.rail-me .rail-who small { display: block; font-size: .68rem; color: var(--rail-fg); opacity: .75; } .rail-chev { margin-left: auto; font-size: .7rem; opacity: .6; transition: transform .2s; } .rail-me[aria-expanded="true"] .rail-chev { transform: rotate(180deg); }
.rail-out { flex: none; width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fca5a5; background: rgba(248,113,113,.1); text-decoration: none; transition: background .15s, color .15s; } .rail-out:hover { background: #ef4444; color: #fff; }
.rail-menu { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); z-index: 60; padding: 6px; border-radius: 14px; background: #0f172a; border: 1px solid rgba(148,163,184,.25); box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); animation: railMenuIn .14s ease-out; }
.rail-menu[hidden] { display: none; } .rail-menu a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; color: #e2e8f0; text-decoration: none; font-size: .84rem; font-weight: 600; } .rail-menu a:hover, .rail-menu a:focus { background: rgba(99,102,241,.25); outline: none; }
.rail-menu hr { margin: 5px 4px; border: 0; border-top: 1px solid rgba(148,163,184,.2); } .rail-menu a.out { color: #fca5a5; } .rail-menu a.out:hover, .rail-menu a.out:focus { background: #ef4444; color: #fff; }
@keyframes railMenuIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width: 1200px) { html.rail-collapsed .rail .rail-foot { flex-direction: column; gap: 8px; } html.rail-collapsed .rail .rail-me { flex: none; padding: 0; margin: 0; background: transparent; } html.rail-collapsed .rail .rail-me .rail-who, html.rail-collapsed .rail .rail-me .rail-chev { display: none; }
  html.rail-collapsed .rail .rail-menu { left: calc(100% + 8px); right: auto; bottom: 8px; min-width: 210px; } }
@media (prefers-reduced-motion: reduce) { .rail-menu { animation: none; } }
body[data-nav-apponly] #organizationDropdown { display: none; }

/* v11.854.0 — a person who only has standalone apps (CISKido…) sees no workspace filters: no global search, no tree scope, no My work, no notifications */
body[data-nav-apponly] div:has(> #searchForm), body[data-nav-apponly] #treeScopeNav, body[data-nav-apponly] li:has(> #myWorkPill), body[data-nav-apponly] li:has(> #notifBell), body[data-nav-apponly] #treeScopeRibbon { display: none !important; }

/* v11.862.0 — the brand mark is the way HOME (Digital Workplace): it turns into a house on hover, a ring says « you are home »; the name next to it still opens the CISK tree */
.rail-logo { position: relative; text-decoration: none; transition: transform .18s, box-shadow .18s; } .rail-logo .rl-c, .rail-logo .rl-h { position: absolute; transition: opacity .18s, transform .22s; } .rail-logo .rl-h { opacity: 0; transform: scale(.4) rotate(-20deg); font-size: 1rem; }
.rail-logo:hover { transform: translateY(-1px) scale(1.06); box-shadow: 0 10px 24px rgba(99,102,241,.6); } 
.rail-logo.here { outline: 2px solid rgba(255,255,255,.55); outline-offset: 2px; }
a.rail-title { text-decoration: none; border-radius: 9px; padding: 2px 6px; margin-left: -2px; transition: background .15s; } a.rail-title:hover { background: rgba(148,163,184,.14); }
/* v11.868.3 — the home button is simply a house: no letter, no morph on hover, no badge. */
.rail-logo .rl-home { font-size: 1.05rem; color: #fff; }
.rail-logo:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(99,102,241,.6); }

/* v11.869.3 — a person who ONLY has standalone apps (CISKido…) gets the simplest possible shell: the app's pages and nothing else — no search (top bar or menu), no home, no pins / recents, no group header, no workspace name, no assistant, no level pill. */
body[data-nav-apponly] .rail-search, body[data-nav-apponly] .rail-pin-sec, body[data-nav-apponly] .rail-gh, body[data-nav-apponly] .rail-title small, body[data-nav-apponly] #xmasSlot, body[data-nav-apponly] .ast-pill, body[data-nav-apponly] .ast-panel, body[data-nav-apponly] [id^="ast"], body[data-nav-apponly] [class^="ast-"], body[data-nav-apponly] [class*=" ast-"], body[data-nav-apponly] [class*="copilot-fab"] { display: none !important; }
body[data-nav-apponly] .rail-grp > .rail-gb { display: block !important; margin-left: 0; padding-left: 0; border-left: 0; }
body[data-nav-apponly] .rail-title b { font-size: 1.1rem; }
