:root {
  --rl-hub-navy: #082b53;
  --rl-hub-navy-deep: #061f3d;
  --rl-hub-gold: #d9a928;
  --rl-hub-ink: #17243a;
  --rl-hub-muted: #64748b;
  --rl-hub-line: #dce4ee;
  --rl-hub-surface: #ffffff;
  --rl-hub-bar-height: 58px;
  --rl-hub-shell-height: calc(var(--rl-hub-bar-height) + env(safe-area-inset-top, 0px));
}

body.rl-hub-shell-mounted { box-sizing: border-box; min-height: 100dvh !important; padding-top: var(--rl-hub-shell-height) !important; }
body.rl-hub-shell-mounted > #root {
  min-height: calc(100dvh - var(--rl-hub-shell-height));
  height: calc(100dvh - var(--rl-hub-shell-height));
}

.rl-hub-shell {
  box-sizing: border-box;
  display: block;
  margin: 0;
  padding: env(safe-area-inset-top, 0px) 0 0;
  text-align: left;
  line-height: normal;
  isolation: isolate;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2147483000;
  height: var(--rl-hub-shell-height);
  color: #fff;
  background: linear-gradient(90deg, var(--rl-hub-navy-deep), var(--rl-hub-navy));
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-family: Outfit, Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 6px 24px rgba(6,31,61,.16);
}

.rl-hub-shell * { box-sizing: border-box; }
.rl-hub-shell [hidden] { display: none !important; }
.rl-hub-shell__inner {
  height: var(--rl-hub-bar-height);
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.rl-hub-shell__brand {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.rl-hub-shell__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--rl-hub-gold);
  color: var(--rl-hub-navy-deep);
  font-weight: 800;
  line-height: 1;
}
.rl-hub-shell__brand-copy { display: grid; line-height: 1.05; }
.rl-hub-shell__brand-copy strong { font-size: 13px; letter-spacing: .01em; }
.rl-hub-shell__brand-copy small { margin-top: 3px; color: #b9c8db; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.rl-hub-shell__divider { width: 1px; height: 28px; background: rgba(255,255,255,.18); }
.rl-hub-shell__current { min-width: 0; margin-right: auto; display: flex; align-items: center; gap: 8px; }
.rl-hub-shell__current strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rl-hub-shell__lock { border: 1px solid rgba(217,169,40,.5); color: #f4d987; border-radius: 999px; padding: 3px 7px; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.rl-hub-shell__actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.rl-hub-shell__hub-control { position: relative; display: flex; }
.rl-hub-shell__button,
.rl-hub-shell__hub-button,
.rl-hub-shell__account-button {
  height: 36px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #e7eef7;
  background: rgba(255,255,255,.06);
  text-decoration: none;
  font: 700 12px/1 inherit;
  cursor: pointer;
}
.rl-hub-shell__button:hover,
.rl-hub-shell__hub-button:hover,
.rl-hub-shell__hub-button[aria-expanded="true"],
.rl-hub-shell__button[aria-expanded="true"] { color: #fff; background: rgba(255,255,255,.13); }
.rl-hub-shell__button:focus-visible,
.rl-hub-shell__hub-button:focus-visible,
.rl-hub-shell__hub-option:focus-visible,
.rl-hub-shell__tool:focus-visible { outline: 3px solid #f4d987; outline-offset: 2px; }
.rl-hub-shell__account-button:focus-visible,
.rl-hub-shell__signout:focus-visible { outline: 3px solid #f4d987; outline-offset: 2px; }
.rl-hub-shell__chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.rl-hub-shell__hub-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(310px, calc(100vw - 36px));
  max-height: calc(100dvh - var(--rl-hub-shell-height) - 20px);
  overflow: auto;
  padding: 10px;
  color: var(--rl-hub-ink);
  background: #fff;
  border: 1px solid var(--rl-hub-line);
  border-radius: 12px;
  box-shadow: 0 18px 54px rgba(6,31,61,.22);
}
.rl-hub-shell__hub-menu-head { padding: 3px 4px 10px; border-bottom: 1px solid var(--rl-hub-line); }
.rl-hub-shell__hub-menu-head strong { display: block; font-size: 14px; }
.rl-hub-shell__hub-menu-head span { display: block; margin-top: 3px; color: var(--rl-hub-muted); font-size: 11px; line-height: 1.35; }
.rl-hub-shell__hub-menu-label { display: block; padding: 10px 5px 5px; color: var(--rl-hub-muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.rl-hub-shell__hub-options { display: grid; gap: 3px; }
.rl-hub-shell__hub-option { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px; border-radius: 9px; color: var(--rl-hub-ink); text-decoration: none; }
.rl-hub-shell__hub-option:hover { background: #f2f6fa; }
.rl-hub-shell__hub-option--home { margin-top: 6px; background: #edf3f8; }
.rl-hub-shell__hub-option-mark { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: var(--rl-hub-navy); background: #e4ecf4; font-size: 10px; font-weight: 800; }
.rl-hub-shell__hub-option > span:last-child { min-width: 0; display: grid; }
.rl-hub-shell__hub-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.rl-hub-shell__hub-option small { margin-top: 2px; color: var(--rl-hub-muted); font-size: 10px; }
.rl-hub-shell__hub-empty { margin: 0; padding: 10px 6px; color: var(--rl-hub-muted); font-size: 11px; line-height: 1.4; }
.rl-hub-shell__panel {
  position: fixed;
  right: 18px;
  top: calc(var(--rl-hub-shell-height) + 8px);
  width: min(720px, calc(100vw - 36px));
  max-height: calc(100dvh - var(--rl-hub-shell-height) - 24px);
  overflow: auto;
  display: none;
  padding: 14px;
  color: var(--rl-hub-ink);
  background: var(--rl-hub-surface);
  border: 1px solid var(--rl-hub-line);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(6,31,61,.24);
}
.rl-hub-shell__panel.is-open { display: block; }
.rl-hub-shell__panel-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 2px 2px 12px; border-bottom: 1px solid var(--rl-hub-line); }
.rl-hub-shell__panel-head strong { display: block; font-size: 15px; }
.rl-hub-shell__panel-head span { display: block; margin-top: 3px; color: var(--rl-hub-muted); font-size: 11px; }
.rl-hub-shell__panel-head a { color: var(--rl-hub-navy); font-size: 12px; font-weight: 800; text-decoration: none; }
.rl-hub-shell__groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; padding-top: 14px; }
.rl-hub-shell__group h2 { margin: 0 0 6px; color: var(--rl-hub-muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.rl-hub-shell__tools { display: grid; gap: 4px; }
.rl-hub-shell__tool { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px; color: var(--rl-hub-ink); border-radius: 10px; text-decoration: none; }
.rl-hub-shell__tool:hover { background: #f2f6fa; }
.rl-hub-shell__tool.is-current { background: #edf3f8; box-shadow: inset 3px 0 var(--rl-hub-gold); }
.rl-hub-shell__tool-mark { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: var(--rl-hub-navy); background: #e4ecf4; font-size: 11px; font-weight: 800; }
.rl-hub-shell__tool-copy { min-width: 0; display: grid; }
.rl-hub-shell__tool-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.rl-hub-shell__tool-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; color: var(--rl-hub-muted); font-size: 10px; }
.rl-hub-shell__empty { padding: 24px 10px; color: var(--rl-hub-muted); text-align: center; font-size: 13px; }
.rl-hub-shell__account {
  position: fixed; right: 18px; top: calc(var(--rl-hub-shell-height) + 8px);
  width: min(280px, calc(100vw - 36px)); padding: 12px;
  color: var(--rl-hub-ink); background: #fff; border: 1px solid var(--rl-hub-line);
  border-radius: 12px; box-shadow: 0 20px 60px rgba(6,31,61,.22);
}
.rl-hub-shell__account-button { padding-right: 7px; }
.rl-hub-shell__account-initial,
.rl-hub-shell__account-avatar { display: grid; place-items: center; border-radius: 8px; background: var(--rl-hub-gold); color: var(--rl-hub-navy-deep); font-weight: 800; }
.rl-hub-shell__account-initial { width: 24px; height: 24px; font-size: 9px; }
.rl-hub-shell__account-identity { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 2px 3px 12px; margin-bottom: 10px; border-bottom: 1px solid var(--rl-hub-line); }
.rl-hub-shell__account-avatar { width: 38px; height: 38px; flex: 0 0 auto; font-size: 11px; }
.rl-hub-shell__account-copy { min-width: 0; display: grid; }
.rl-hub-shell__account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.rl-hub-shell__account-email { margin-top: 3px; color: var(--rl-hub-muted); font-size: 11px; overflow-wrap: anywhere; }
.rl-hub-shell__signout { width: 100%; min-height: 40px; border: 1px solid var(--rl-hub-line); border-radius: 8px; color: #8f1d28; background: #fff; font-weight: 800; cursor: pointer; }
.rl-hub-shell__signout:hover { background: #fff4f4; }

body.rl-hub-shell-mounted[data-hub-app="workday-map"] #map { top: var(--rl-hub-shell-height) !important; }
body.rl-hub-shell-mounted[data-hub-app="workday-map"] > .topbar { top: var(--rl-hub-shell-height) !important; }
body.rl-hub-shell-mounted[data-hub-app="workday-map"] > .panel { top: calc(var(--rl-hub-shell-height) + 58px) !important; }
body[data-hub-app="brigid"] #root > div > header { display: none !important; }
body[data-hub-app="work-map"] .app-root { height: 100% !important; }
body[data-hub-app="work-map"] #root .site-header .logo-link,
body[data-hub-app="work-map"] #root .site-header .site-nav,
body[data-hub-app="work-map"] #root .site-header .nav-toggle { display: none !important; }
body.rl-hub-shell-mounted > .rl-shell-header,
body.rl-hub-shell-mounted > .ms-topbar,
body.rl-hub-shell-mounted > .ms-drawer,
body.rl-hub-shell-mounted > .ms-drawer-backdrop { display: none !important; }

@media (max-width: 720px) {
  :root { --rl-hub-bar-height: 56px; }
  .rl-hub-shell__inner { padding: 0 10px; gap: 9px; }
  .rl-hub-shell__brand-copy, .rl-hub-shell__divider, .rl-hub-shell__lock, .rl-hub-shell__account-button-label { display: none; }
  .rl-hub-shell__current strong { max-width: 24vw; }
  .rl-hub-shell__button, .rl-hub-shell__hub-button { width: auto; min-width: 54px; height: 44px; padding: 0 9px; justify-content: center; }
  .rl-hub-shell__account-button { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; }
  .rl-hub-shell__hub-menu { position: fixed; inset: calc(var(--rl-hub-shell-height) + 6px) 6px auto 6px; width: auto; max-height: calc(100dvh - var(--rl-hub-shell-height) - 12px); }
  .rl-hub-shell__panel { inset: calc(var(--rl-hub-shell-height) + 6px) 6px auto 6px; width: auto; max-height: calc(100dvh - var(--rl-hub-shell-height) - 12px); border-radius: 12px; }
  .rl-hub-shell__groups { grid-template-columns: 1fr; }
  .rl-hub-shell__account { inset: calc(var(--rl-hub-shell-height) + 6px) 6px auto auto; }
  body.rl-hub-shell-mounted[data-hub-app="work-map"] .mm-app-root { inset: var(--rl-hub-shell-height) 0 0 !important; }
  body[data-hub-app="work-map"] .mm-topbar > .mm-icon-btn:first-child,
  body[data-hub-app="work-map"] .mm-drawer,
  body[data-hub-app="work-map"] .mm-drawer-backdrop { display: none !important; }
  body[data-hub-app="workday-map"] > .topbar { flex-wrap: wrap; max-height: 112px; overflow: auto; }
  body[data-hub-app="workday-map"] > .topbar .nav,
  body[data-hub-app="workday-map"] > .topbar .stats { max-width: 100%; overflow-x: auto; }
  body.rl-hub-shell-mounted[data-hub-app="workday-map"] > .panel { left: 8px; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: 42dvh; }
  body[data-hub-app="performance"] .tabs { overflow-x: auto; flex-wrap: nowrap; }
  body[data-hub-app="performance"] .bar { flex-wrap: wrap; }
  body[data-hub-app="performance"] .stamp { width: 100%; }
}

@media (max-width: 420px) {
  .rl-hub-shell__current { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rl-hub-shell *, .rl-hub-shell *::before, .rl-hub-shell *::after { scroll-behavior: auto !important; transition: none !important; }
}
