/* This stylesheet is loaded in the document head before the deferred module.
   Hide legacy chrome and reserve the shared toolbar's space on the first paint,
   so navigation never flashes or shifts the page logo. */
.navbar,
.app-toolbar {
  display: none !important;
}

body {
  padding-top: 56px;
}

html, body {
  scrollbar-width: none;
  overflow-x: hidden;
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* Shared second-level workspace navigation used by mirror tools. */
.vector-app-nav {
  position: sticky;
  /* body reserves 56px for the fixed shell toolbar.  A sticky offset here
     would be added on top of that padding and create a visible blank band. */
  top: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  width: 100%;
  padding: 0 30px;
  color: #242b39;
  border-bottom: 1px solid #edf0f4;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 10px rgba(42, 59, 86, .04);
  visibility: visible !important;
  opacity: 1 !important;
  flex-shrink: 0;
}
.vector-app-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  color: #202734;
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.vector-app-brand img { display: block; width: 28px; height: 28px; border-radius: 5px; object-fit: cover; }
.vector-app-links { display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: 5px; }
.vector-app-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 11px;
  color: #596170;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease;
}
.vector-app-link:hover { color: #29344a; background: #f2f4f8; }
.vector-app-link.is-active { color: #25304a; background: #ecebfa; font-weight: 750; }
.vector-account-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  margin-left: 8px;
  padding: 0 14px;
  color: #414754;
  border-radius: 18px;
  background: #f4f4f5;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}
.vector-account-link:hover { background: #ececf0; }
.vector-account-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

/* Shared account menu. It is portaled to body by account-popover.js so it is
   never clipped by the horizontally scrollable workspace navigation. */
.shared-account-popover {
  position: fixed;
  display: none;
  min-width: 240px;
  max-width: calc(100vw - 24px);
  padding: 14px;
  color: #273348;
  background: #fff;
  border: 1px solid rgba(38, 54, 82, .08);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(43, 55, 82, .16), 0 2px 8px rgba(43, 55, 82, .06);
  z-index: 20000;
  box-sizing: border-box;
}
.shared-account-popover.is-open { display: block; }
.shared-account-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid #edf0f4;
}
.shared-account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  border-radius: 50%;
  background: linear-gradient(135deg, #7557f4, #8b5cf6);
}
.shared-account-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.shared-account-identity strong {
  overflow: hidden;
  color: #263248;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shared-account-identity span {
  overflow: hidden;
  color: #7c899e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shared-account-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin: 12px 0 8px;
  padding: 0 12px;
  color: #8290a4;
  font-size: 12px;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  background: #fbfcfe;
}
.shared-account-balance strong {
  color: #10a878;
  font-size: 15px;
  font-weight: 750;
}
.shared-account-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shared-account-actions button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: #56647a;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.shared-account-actions button:hover { color: #31405a; background: #f4f6fa; }
.shared-account-actions button.is-danger { margin-top: 5px; color: #ef4b4b; border-top: 1px solid #f0f2f5; border-radius: 0 0 8px 8px; }
.shared-account-actions button.is-danger:hover { color: #d73535; background: #fff4f4; }
.shared-account-actions svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@media (max-width: 1160px) {
  .vector-app-nav { padding: 0 16px; }
  .vector-app-links { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .vector-app-links::-webkit-scrollbar { display: none; }
}
@media (max-width: 760px) {
  .vector-app-nav { align-items: flex-start; flex-direction: column; gap: 8px; padding: 10px 11px; }
  .vector-app-links { width: 100%; }
  .vector-app-link { padding: 0 9px; font-size: 12px; }
  .vector-account-link { margin-left: 0; }
}

/* Keep the shared chrome outside page-specific flex/grid layouts. Some
   mirrored pages center their body contents, which would otherwise move a
   sticky toolbar away from the top of the window. */
html.has-shared-toolbar {
  scroll-padding-top: 56px;
}
html.has-shared-toolbar > body {
  padding-top: 56px;
}

/* The home workspace owns the only settings action. Hide legacy floating
   assistant/help/support controls that may still be present in mirrored pages. */
#assistantFab,
#supportFab,
#assistantPopover,
#supportPopover,
.assistant-fab,
.support-fab,
.reverse-prompt-btn,
.mobile-view-floating-btn,
.floating-notice {
  display: none !important;
}

.shared-app-toolbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 56px;
  min-height: 56px;
  margin: 0;
  flex: 0 0 56px;
  padding: 0 12px;
  color: #1c2a43;
  background: #f8fbff;
  border-bottom: 1px solid rgba(128, 145, 174, .16);
  box-shadow: 0 1px 8px rgba(81, 101, 139, .08);
  /* Keep the shell on a stable compositing layer. Backdrop blur can trigger a
     one-frame GPU repaint when a mirror page finishes loading underneath it. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
  contain: layout paint;
  overflow: hidden;
}
.shared-toolbar-left,
.shared-toolbar-window-controls {
  display: flex;
  align-items: center;
}
.shared-toolbar-left {
  /* Keep shell controls packed at the left edge even when a mirrored page
     contributes broad global flex rules. */
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  gap: 5px !important;
  justify-content: flex-start !important;
  /* The tab strip owns horizontal scrolling. Keeping this wrapper visible
     prevents WebView focus handling from scrolling the brand and controls out
     of view together with the active welcome tab. */
  overflow: visible;
}
.shared-toolbar-tab-area {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  gap: 5px !important;
  justify-content: flex-start !important;
  overflow: hidden;
}
.shared-toolbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 128px;
  width: 128px;
  min-width: 128px;
  margin-right: 5px;
  padding: 7px 11px 7px 7px;
  color: #1e2a3e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid rgba(120, 139, 173, .18);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(86, 105, 146, .06);
}
.shared-toolbar-brand img {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}
.shared-toolbar-brand b {
  color: #71809a;
  font-weight: 600;
}
.shared-toolbar-icon,
.shared-toolbar-window-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #24324a;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
  text-decoration: none;
}
.shared-toolbar-icon:hover,
.shared-toolbar-window-icon:hover {
  color: #2463df;
  background: rgba(66, 120, 233, .10);
}
.shared-toolbar-icon:active,
.shared-toolbar-window-icon:active {
  transform: none;
}
.shared-toolbar-icon svg,
.shared-toolbar-window-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shared-toolbar-add {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  align-self: center;
  color: #1f68e4;
  background: transparent;
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
  transform: none !important;
}
.shared-toolbar-add:active { transform: none !important; }
.shared-toolbar-add svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shared-toolbar-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  margin-left: 12px;
  padding: 0 14px;
  color: #29354b;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 3px 10px rgba(94, 114, 153, .05);
}
.shared-tab-number {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: #fff;
  font-size: 10px;
  border-radius: 50%;
  background: #2468df;
}
.shared-toolbar-window-controls {
  gap: 2px;
}
.shared-toolbar-tabs {
  flex: 1 1 0;
  width: 0;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: none;
  gap: 5px !important;
  justify-content: flex-start !important;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  scrollbar-width: none;
}
.shared-toolbar-tabs::-webkit-scrollbar { display: none; }
.shared-toolbar-home-tab {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}
.toolbar-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  flex: 0 0 auto;
  max-width: 180px;
  padding: 0 10px;
  color: #29354b;
  font: 700 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border: 0;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(94, 114, 153, .05);
  cursor: pointer;
}
.toolbar-tab-item:hover,
.toolbar-tab-item[aria-current="page"] {
  color: #1e3d78;
  background: rgba(232, 241, 255, .96);
}
.toolbar-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toolbar-tab-number {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: #fff;
  font-size: 10px;
  border-radius: 50%;
  background: #2468df;
}
.toolbar-tab-close {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 1px;
  color: #8b98ab;
  font-size: 14px;
  line-height: 1;
  border-radius: 50%;
}
.toolbar-tab-close:hover {
  color: #d9465f;
  background: rgba(239, 102, 123, .14);
}
.shared-toolbar-window-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.shared-toolbar-window-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}
.shared-toolbar-window-icon.close:hover {
  color: #d9465f;
  background: rgba(239, 102, 123, .12);
}

@media (max-width: 680px) {
  .shared-app-toolbar { padding: 0 7px; }
  .shared-toolbar-brand {
    min-width: 0;
    max-width: 160px;
    margin-right: 1px;
    padding-right: 7px;
  }
  .shared-toolbar-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .shared-toolbar-window-icon:nth-child(1),
  .shared-toolbar-window-icon:nth-child(3) { display: none; }
  .shared-toolbar-tab {
    margin-left: 5px;
    padding: 0 9px;
  }
  .shared-toolbar-tabs { max-width: 42vw; }
  .shared-toolbar-tab-area { max-width: 56vw; }
  .shared-toolbar-home-tab { max-width: 126px; }
  .shared-toolbar-home-tab .toolbar-tab-label { max-width: 66px; }
  .toolbar-tab-item { padding: 0 9px; }
}
@media (max-width: 390px) {
  .shared-toolbar-icon { width: 27px; }
  .shared-toolbar-brand { max-width: 125px; }
  .shared-toolbar-tabs { max-width: 34vw; }
  .shared-toolbar-tab-area { max-width: 48vw; }
  .shared-toolbar-home-tab { max-width: 96px; }
  .shared-toolbar-home-tab .toolbar-tab-label { max-width: 38px; }
}
