/* Ninja Vault branding for vault.workninjas.com. Injected by OpenResty (wn-brand.conf).
 * Rollback: sudo bash wn-brand.sh --rollback */

@font-face { font-family: "WN Poppins"; src: url(/wn-brand/Poppins-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "WN Poppins"; src: url(/wn-brand/Poppins-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }

/* ---- Brand colour scale (whole web vault) -------------------------------
 * The web vault derives buttons, links, focus rings and checkboxes from
 * --color-brand-*. Light theme uses 700/800 for primary; dark uses 400/200. */
html:root, html .theme_light, html .theme_dark {
  --color-brand-050: #f5fafe;
  --color-brand-100: #ecf6fd;
  --color-brand-200: #c7e7f8;
  --color-brand-300: #9bd6f2;
  --color-brand-400: #62c1ed;
  --color-brand-500: #49a0db;
  --color-brand-600: #2c7fcb;
  --color-brand-700: #003b60;
  --color-brand-700-rgb: 0, 59, 96;
  --color-brand-800: #002c48;
  --color-brand-800-rgb: 0, 44, 72;
  --color-brand-900: #001f33;
  --color-brand-950: #00131f;
  --color-brand-950-rgb: 0, 19, 31;
}

/* ---- All sign-in screens (login, unlock, 2FA, hint, …) ------------------ */
auth-anon-layout .tw-bg-background-alt { background: #ecf6fd !important; }
auth-anon-layout .tw-opacity-\[\.11\] { display: none !important; } /* background illustrations */
/* The card carries the full logo lockup, so the separate top-left logo bar is redundant height. */
auth-anon-layout bit-landing-header { display: none !important; }
/* Our sign-in background stays pale blue in dark mode too, so text outside the card (titles, the
   two-step instruction, footer) keeps light-theme colours or it disappears. */
html.theme_dark auth-anon-layout bit-landing-hero, html.theme_dark auth-anon-layout bit-landing-hero * { color: #4b5565; }
html.theme_dark auth-anon-layout bit-landing-hero h1 { color: #003b60 !important; }
html.theme_dark auth-anon-layout bit-landing-footer, html.theme_dark auth-anon-layout bit-landing-footer * { color: #4b5565 !important; }
html.theme_dark auth-anon-layout .wn-webchip:not(.wn-empty), html.theme_dark auth-anon-layout .wn-webchip * { color: #003b60; }
html.theme_dark auth-anon-layout .wn-locked, html.theme_dark auth-anon-layout .wn-locked * { color: #62c1ed; }
html.theme_dark auth-anon-layout .wn-account { background: #fff; border-color: #d5e3ee; color: #003b60 !important; }
html.theme_dark auth-anon-layout .wn-account * { color: #003b60; }
/* Shorter screens: less space above the logo so the form starts higher. */
@media (max-height: 820px) {
  auth-anon-layout bit-landing-content > div { padding-top: 1rem !important; }
  auth-anon-layout bit-landing-hero > div { margin-bottom: 1rem !important; }
}
auth-anon-layout bit-landing-header a bit-svg > svg { display: none !important; }
auth-anon-layout bit-landing-header a bit-svg::before {
  content: ""; display: block; width: 190px; height: 42px;
  background: url(/wn-brand/logo.svg) no-repeat left center / contain;
}
auth-anon-layout bit-landing-hero bit-svg > svg { display: none !important; }
/* Card logo: the same lockup as the sidebar banner - the full logo with "powered by Vaultwarden"
   tucked under the wordmark, starting at the W (x 56.1 of 168 in the artwork). */
auth-anon-layout bit-landing-hero bit-svg { position: relative; display: block !important; width: 244px; height: 56px; margin: 0 auto; }
auth-anon-layout bit-landing-hero bit-svg::before {
  content: ""; position: absolute; left: 0; top: 0; width: 244px; height: 54px;
  background: url(/wn-brand/logo.svg) no-repeat left top / contain;
}
auth-anon-layout bit-landing-hero bit-svg::after {
  content: ""; position: absolute; left: 81px; top: 40px; width: 142px; height: 15px;
  background: url(/wn-brand/poweredby.svg) no-repeat left center / contain;
}
auth-anon-layout bit-landing-hero > div > div:first-child { width: auto !important; height: auto !important; }
auth-anon-layout bit-landing-hero h1 {
  font-family: "WN Poppins", Inter, sans-serif; font-weight: 500 !important; color: #003b60 !important;
}
@media (min-width: 640px) {
  auth-anon-layout bit-base-card {
    box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06) !important; border-color: transparent !important;
  }
}
/* Eyebrow above the card heading ("Use it on the web"): plain text with a line icon. */
.wn-webchip {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px auto 8px;
  color: #2c6f9e; font: 500 13px/20px "WN Poppins", sans-serif;
}
.wn-webchip.wn-empty { display: none; }
/* The two ways in ("Use the apps" / "Use it on the web") share the lime of the "or" disc that joins them. */
#wn-panel .wn-eyebrow.wn-path, .wn-webchip:not(.wn-empty) {
  display: flex; width: fit-content; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 6px;
  background: #b4e717; color: #003b60; font: 500 14px/20px "WN Poppins", sans-serif;
}
.wn-sub { margin: 4px auto 0; max-width: 360px; font-size: 14px; line-height: 20px; color: #5b6b7c; text-align: center; }
.wn-icon { flex: none; width: 16px; height: 16px; }
/* Unlock button while unlocking: text hidden, a spinner in its place. */
button[data-wn-busy] { position: relative; pointer-events: none; }
button[data-wn-busy] > span:not(.wn-spin) { visibility: hidden; }
button[data-wn-busy] .wn-spin {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; visibility: visible;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  animation: wn-spin 700ms linear infinite;
}
@keyframes wn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button[data-wn-busy] .wn-spin { animation-duration: 2s; } }
/* Unlock screen: the signed-in account as a clear tag under the subtitle. */
.wn-account {
  display: inline-flex !important; align-items: center; gap: 8px; margin-top: 8px !important; padding: 6px 14px 6px 12px;
  border-radius: 8px; background: #fff; border: 1px solid #d5e3ee; color: #003b60 !important;
  font-size: 15px !important; line-height: 20px; font-weight: 500;
}
/* Unlock heading: "locked" in an inverted navy tag with a lock that tugs at its shackle and rattles. */
.wn-locked {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; padding: 0 10px 2px 12px;
  border-radius: 10px; background: #003b60; color: #62c1ed; line-height: 1.3; vertical-align: baseline;
}
.wn-lockicon { width: .78em; height: .78em; flex: none; overflow: visible; }
.wn-lock-shackle, .wn-lock-body { transform-box: view-box; transform-origin: 12px 16px; }
@keyframes wn-tug {
  0%, 8%, 30%, 100% { transform: translateY(0); }
  11%, 19% { transform: translateY(-4px); }
  14%, 22% { transform: translateY(0); }
}
@keyframes wn-rattle {
  0%, 22%, 40%, 100% { transform: rotate(0); }
  25% { transform: rotate(-14deg); }
  29% { transform: rotate(11deg); }
  33% { transform: rotate(-6deg); }
  37% { transform: rotate(3deg); }
}
.wn-lockicon { animation: wn-rattle 3.2s cubic-bezier(0.22, 1, 0.36, 1) 600ms infinite; transform-origin: 50% 70%; }
.wn-lock-shackle { animation: wn-tug 3.2s cubic-bezier(0.22, 1, 0.36, 1) 600ms infinite; }
@media (prefers-reduced-motion: reduce) { .wn-lockicon, .wn-lock-shackle { animation: none; } }
/* "Forgot your master password?" at the bottom of the login/unlock card: hover or focus shows the tip. */
.wn-forgot { position: relative; margin-top: 16px; text-align: center; font-size: 13px; line-height: 20px; }
.wn-forgot-q {
  color: #2c6f9e; cursor: help; text-decoration: underline dotted rgba(44, 111, 158, .6); text-underline-offset: 3px;
  border-radius: 4px; outline: none;
}
.wn-forgot-q:focus-visible { box-shadow: 0 0 0 2px #2c7fcb; }
.wn-forgot-tip {
  position: absolute; left: 50%; top: calc(100% + 8px); z-index: 40; width: max-content; max-width: 300px;
  padding: 8px 12px; border-radius: 8px; background: #003b60; color: #fff; text-align: left;
  font-size: 13px; line-height: 20px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px); pointer-events: none;
  transition: opacity 160ms cubic-bezier(0.22, 1, 0.36, 1), transform 160ms cubic-bezier(0.22, 1, 0.36, 1), visibility 160ms;
}
.wn-forgot-tip::after {
  content: ""; position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
  border: 6px solid transparent; border-bottom-color: #003b60;
}
.wn-forgot-q:hover + .wn-forgot-tip, .wn-forgot-q:focus-visible + .wn-forgot-tip {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
html.theme_dark .wn-forgot-q { color: #62c1ed; text-decoration-color: rgba(98, 193, 237, .6); }

/* ---- Loading screens ------------------------------------------------------ */
/* Initial boot screen (static markup in index.html, shown before the app starts). */
app-root > div:has(> .spinner-container) { background: #ecf6fd; }
app-root > div > div.tw-fixed:has(> img.new-logo-themed) { display: none !important; }
app-root > div > .tw-relative.tw-grow { display: none !important; } /* boot background illustration */
body .spinner-container:is(app-root > div > *) {
  position: fixed !important; inset: 0 !important; transform: none !important;
  width: auto !important; height: auto !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
}
app-root > div > .spinner-container::before {
  content: ""; display: block; width: 240px; height: 54px;
  background: url(/wn-brand/logo.svg) no-repeat center / contain;
}
/* "powered by Vaultwarden" line between the logo and the spinner. */
body .spinner-container:is(app-root > div > *)::before { order: -2; }
body .spinner-container:is(app-root > div > *)::after {
  order: -1; content: ""; display: block; margin-top: -8px; width: 190px; height: 20px;
  background: url(/wn-brand/poweredby.svg) no-repeat center / contain;
}

/* Spinners everywhere (boot, unlock, vault loading) in brand blue. */
html:not(.theme_dark) .bwi-spinner { color: #2c7fcb !important; }
html.theme_dark .bwi-spinner { color: #62c1ed !important; }

/* ---- Login + unlock: two-panel layout ------------------------------------ */
#wn-panel, #wn-or { display: none; }

@media (min-width: 1000px) {
  html.wn-split { --wn-split: clamp(420px, 44vw, 640px); }

  html.wn-split #wn-panel {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--wn-split); z-index: 20;
    overflow-y: auto; scrollbar-width: none; color: #fff; font-family: "WN Poppins", Inter, sans-serif;
    background: #003b60;
  }
  html.wn-login #wn-or {
    display: grid; place-items: center; position: fixed; z-index: 30;
    left: var(--wn-split); top: 50%; transform: translate(-50%, -50%);
    width: 48px; height: 48px; border-radius: 50%; border: 4px solid #ecf6fd;
    background: #b4e717; color: #003b60; font: 500 15px/1 "WN Poppins", sans-serif; letter-spacing: .04em;
  }

  /* Shift the web vault's own page into the right-hand area. */
  html.wn-split app-root { display: block; margin-left: var(--wn-split); }
  html.wn-split body .spinner-container:is(app-root > div > *) { left: var(--wn-split) !important; }
  html.wn-split bit-landing-header { display: none !important; }
  html.wn-split auth-anon-layout bit-landing-content > div { justify-content: center; padding-top: 2rem !important; }
}
/* Phones/tablets: no side panel; keep a single logo (the one in the card). */
@media (max-width: 999.98px) {
  html.wn-split bit-landing-header { display: none !important; }
}

/* ---- Panel contents ------------------------------------------------------ */
#wn-panel .wn-panel-inner { margin-block: auto; padding: 40px 48px 32px; max-width: 600px; box-sizing: border-box; } /* vertically centred; margin:auto keeps it scrollable on short screens */
#wn-panel .wn-eyebrow { display: flex; align-items: center; gap: 8px; color: #a9cde6; font-size: 13px; line-height: 20px; font-weight: 500; }
#wn-panel h2 { font-size: 28px; line-height: 1.2; font-weight: 500; margin: 12px 0 0; color: #fff; }
#wn-panel .wn-lead { font-size: 15px; line-height: 24px; color: #cfe6f7; margin: 8px 0 0; }
#wn-panel .wn-steps { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
#wn-panel .wn-step {
  display: flex; gap: 12px; padding: 16px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
#wn-panel .wn-n {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.10); color: #fff; font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums;
}
#wn-panel h3 { font-size: 15px; line-height: 20px; font-weight: 500; margin: 4px 0 0; color: #fff; }
#wn-panel .wn-step p { font-size: 13px; line-height: 20px; color: #cfe6f7; margin: 4px 0 0; }
#wn-panel .wn-step b { color: #fff; font-weight: 500; }
#wn-panel a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 2px; }
#wn-panel code {
  font: 500 12px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #fff;
  background: rgba(0,0,0,.24); padding: 2px 8px; border-radius: 6px; user-select: all;
}
/* Install block: one button for this browser's extension, then direct links for the other apps. */
#wn-panel .wn-install { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
#wn-panel a.wn-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 8px;
  background: #b4e717; color: #003b60; font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
#wn-panel a.wn-btn:hover { background: #c6f03a; }
#wn-panel a.wn-btn:active { transform: scale(.97); }
#wn-panel a.wn-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Sheen that sweeps across the button. */
#wn-panel a.wn-btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.85) 50%, transparent 75%);
  transform: translateX(-120%);
}
/* Eye-catcher: pops in on load, then every 3s a ring pulses out, the sheen sweeps and the arrow
   bounces. Loops until hovered; off for reduced motion. */
@keyframes wn-pop {
  0%   { transform: scale(.85); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes wn-ring {
  0%   { box-shadow: 0 0 0 0 rgba(180, 231, 23, .8); }
  35%  { box-shadow: 0 0 0 14px rgba(180, 231, 23, 0); }
  100% { box-shadow: 0 0 0 14px rgba(180, 231, 23, 0); }
}
@keyframes wn-sheen {
  0%, 10% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(120%); }
}
@keyframes wn-bob {
  0%, 36%, 100% { transform: translateY(0); }
  8%, 24%       { transform: translateY(4px); }
  16%           { transform: translateY(-1px); }
}
#wn-panel a.wn-btn {
  animation: wn-pop 500ms cubic-bezier(0.22, 1, 0.36, 1) 300ms both,
             wn-ring 3s cubic-bezier(0.22, 1, 0.36, 1) 900ms infinite;
}
#wn-panel a.wn-btn::after { animation: wn-sheen 3s cubic-bezier(0.22, 1, 0.36, 1) 900ms infinite; }
#wn-panel a.wn-btn .wn-icon { animation: wn-bob 3s cubic-bezier(0.22, 1, 0.36, 1) 900ms infinite; }
#wn-panel a.wn-btn:hover, #wn-panel a.wn-btn:hover::after, #wn-panel a.wn-btn:hover .wn-icon { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  #wn-panel a.wn-btn, #wn-panel a.wn-btn::after, #wn-panel a.wn-btn .wn-icon { animation: none; }
}
/* Extension check: hide the button until the check answers; once installed, show the green note. */
#wn-panel .wn-installed { display: none; align-items: center; gap: 8px; color: #4cc38a; font-size: 14px; line-height: 20px; font-weight: 500; }
#wn-panel .wn-installed .wn-icon { width: 18px; height: 18px; }
#wn-panel .wn-install[data-ext="checking"] a.wn-btn { visibility: hidden; }
#wn-panel .wn-install[data-ext="yes"] a.wn-btn { display: none; }
#wn-panel .wn-install[data-ext="yes"] .wn-installed { display: inline-flex; }
/* "Trouble setting it up?": only shown once the extension is installed; hover or focus shows the steps. */
#wn-panel .wn-setup { display: none; position: relative; }
#wn-panel .wn-install[data-ext="yes"] .wn-setup { display: inline-block; }
#wn-panel .wn-setup-q {
  font-size: 13px; line-height: 20px; color: #cfe6f7; cursor: help; outline: none; border-radius: 4px;
  text-decoration: underline dotted rgba(207, 230, 247, .6); text-underline-offset: 3px;
}
#wn-panel .wn-setup-q:focus-visible { box-shadow: 0 0 0 2px #b4e717; }
#wn-panel .wn-setup-tip {
  position: absolute; left: calc(100% + 12px); top: 50%; z-index: 40;
  /* As wide as the panel allows: from the text to 16px short of the panel edge (text starts ~252px in). */
  width: min(400px, calc(var(--wn-split, 640px) - 268px));
  padding: 12px 16px; border-radius: 10px; background: #fff; color: #003b60;
  font-size: 13px; line-height: 20px; box-shadow: 0 8px 24px rgba(0,0,0,.24);
  opacity: 0; visibility: hidden; transform: translate(-4px, -50%); pointer-events: none;
  transition: opacity 160ms cubic-bezier(0.22, 1, 0.36, 1), transform 160ms cubic-bezier(0.22, 1, 0.36, 1), visibility 160ms;
}
#wn-panel .wn-setup-tip b { color: #003b60; font-weight: 500; white-space: nowrap; }
#wn-panel .wn-setup-tip code { color: #003b60; background: #ecf6fd; white-space: nowrap; }
#wn-panel .wn-setup-tip::after {
  content: ""; position: absolute; right: 100%; top: 50%; transform: translateY(-50%); border: 7px solid transparent; border-right-color: #fff;
}
#wn-panel .wn-setup-q:hover + .wn-setup-tip, #wn-panel .wn-setup-q:focus-visible + .wn-setup-tip {
  opacity: 1; visibility: visible; transform: translate(0, -50%);
}
#wn-panel .wn-also { font-size: 13px; line-height: 20px; color: #a9cde6; }
#wn-panel .wn-tip {
  margin-top: 24px; font-size: 13px; line-height: 20px; color: #cfe6f7;
  border-left: 2px solid rgba(255,255,255,.24); padding: 0 0 0 12px;
}
#wn-panel .wn-tip b { color: #fff; font-weight: 500; }
#wn-panel .wn-tip + .wn-tip { margin-top: 12px; }
/* "Need a passkey?": a lime-outlined chip; hover or focus opens a white bubble above it. */
#wn-panel .wn-passkey { position: relative; margin-top: 24px; }
#wn-panel .wn-passkey-q {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 8px;
  border: 1.5px solid #b4e717; background: rgba(180, 231, 23, .12); color: #b4e717;
  font-size: 14px; line-height: 20px; font-weight: 500; cursor: help; outline: none;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
#wn-panel .wn-passkey-q:hover, #wn-panel .wn-passkey-q:focus-visible { background: rgba(180, 231, 23, .22); }
#wn-panel .wn-passkey-q:focus-visible { box-shadow: 0 0 0 2px #003b60, 0 0 0 4px #b4e717; }
#wn-panel .wn-q {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #b4e717; color: #003b60; font-size: 12px; font-weight: 500;
}
#wn-panel .wn-passkey-tip {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 40; width: 340px; max-width: calc(100vw - 32px);
  padding: 12px 16px; border-radius: 10px; background: #fff; color: #003b60;
  font-size: 13px; line-height: 20px; box-shadow: 0 8px 24px rgba(0,0,0,.24);
  opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none;
  transition: opacity 160ms cubic-bezier(0.22, 1, 0.36, 1), transform 160ms cubic-bezier(0.22, 1, 0.36, 1), visibility 160ms;
}
#wn-panel .wn-passkey-tip b { color: #003b60; font-weight: 500; }
#wn-panel .wn-passkey-tip::after {
  content: ""; position: absolute; left: 24px; bottom: 100%; border: 7px solid transparent; border-bottom-color: #fff;
}
#wn-panel .wn-passkey-q:hover + .wn-passkey-tip, #wn-panel .wn-passkey-q:focus-visible + .wn-passkey-tip {
  opacity: 1; visibility: visible; transform: translateY(0);
}
#wn-panel .wn-help { margin-top: 16px; font-size: 13px; line-height: 20px; color: #a9cde6; }
#wn-panel .wn-help b { color: #fff; font-weight: 500; }
#wn-panel .wn-help a { color: #fff; font-weight: 500; }
/* Slack channel mention: the same pill Slack draws around a #channel link. */
#wn-panel .wn-help a.wn-slack {
  display: inline-block; padding: 0 3px; border-radius: 4px; text-decoration: none; font-weight: 500;
  color: #36b6ef; background: rgba(29, 155, 209, .18);
  transition: background-color 120ms cubic-bezier(0.22, 1, 0.36, 1), color 120ms cubic-bezier(0.22, 1, 0.36, 1);
}
#wn-panel .wn-help a.wn-slack:hover, #wn-panel .wn-help a.wn-slack:focus-visible { color: #6fd0ff; background: rgba(29, 155, 209, .34); outline: none; }

/* Short screens: the passkey bubble would run off the bottom of the panel, so it opens upward there. */
@media (min-width: 1000px) and (max-height: 760px) {
  #wn-panel .wn-passkey-tip { top: auto; bottom: calc(100% + 10px); transform: translateY(4px); }
  #wn-panel .wn-passkey-tip::after { bottom: auto; top: 100%; border-bottom-color: transparent; border-top-color: #fff; }
}
/* Shorter laptop screens: tighten the panel so it fits without scrolling. */
@media (min-width: 1000px) and (max-height: 820px) {
  #wn-panel .wn-panel-inner { padding: 32px 48px 24px; }
  #wn-panel h2 { font-size: 24px; margin-top: 8px; }
  #wn-panel .wn-lead { display: none; } /* the intro line is the first thing to go on short screens */
  #wn-panel .wn-steps { margin-top: 16px; }
  #wn-panel .wn-step { padding: 8px 16px; }
  #wn-panel .wn-install { margin-top: 8px; }
  #wn-panel .wn-tip { margin-top: 16px; }
  #wn-panel .wn-help { margin-top: 12px; }
}

/* ---- Inside the vault (signed in) ---------------------------------------- */
/* Side nav: navy instead of near-black. These tokens feed the default nav variant. */
html:root, html .theme_light, html .theme_dark {
  --color-nav-bg-primary: #003b60;
  --color-nav-bg-primary-strong: rgba(98, 193, 237, .20);   /* active item */
  --color-nav-bg-primary-hover: rgba(255, 255, 255, .08);
  --color-nav-bg-primary-hover-strong: rgba(98, 193, 237, .28);
  --color-nav-border-primary: rgba(255, 255, 255, .14);
  --color-nav-border-primary-focus: #b4e717;
  /* Admin Console uses the light "secondary" nav variant: pale brand blue with navy text. */
  --color-nav-fg-secondary: #003b60;
  --color-nav-bg-secondary: #ecf6fd;
  --color-nav-bg-secondary-strong: #c7e7f8;
  --color-nav-bg-secondary-hover: rgba(0, 59, 96, .07);
  --color-nav-bg-secondary-hover-strong: rgba(0, 59, 96, .14);
  --color-nav-border-secondary: #d5e3ee;
  --color-nav-border-secondary-focus: #003b60;
}
/* Light mode: invert the two sidebars. Password Manager gets the pale blue sidebar with navy text,
   the Admin Console gets navy. Dark mode keeps the block above (Password Manager navy). */
html.theme_light {
  --color-nav-fg-primary: #003b60;
  --color-nav-bg-primary: #ecf6fd;
  --color-nav-bg-primary-strong: #c7e7f8;
  --color-nav-bg-primary-hover: rgba(0, 59, 96, .07);
  --color-nav-bg-primary-hover-strong: rgba(0, 59, 96, .14);
  --color-nav-border-primary: #d5e3ee;
  --color-nav-border-primary-focus: #003b60;
  --color-nav-fg-secondary: #fff;
  --color-nav-bg-secondary: #003b60;
  --color-nav-bg-secondary-strong: rgba(98, 193, 237, .20);
  --color-nav-bg-secondary-hover: rgba(255, 255, 255, .08);
  --color-nav-bg-secondary-hover-strong: rgba(98, 193, 237, .28);
  --color-nav-border-secondary: rgba(255, 255, 255, .14);
  --color-nav-border-secondary-focus: #b4e717;
}
/* Active item: lime marker on the left edge. */
bit-side-nav bit-nav-item:has(a[aria-current="page"]) [data-testid="nav-item-container"] {
  box-shadow: inset 3px 0 0 #b4e717;
}
/* Logo banner on a white pill: the full logo with "powered by Vaultwarden" under the wordmark.
   Mascot only when the nav is collapsed. */
/* The Admin Console's nav is the one whose inline style maps primary onto the secondary tokens. */
bit-side-nav bit-nav-logo a {
  background: #fff !important; border-radius: 12px !important; height: 72px !important;
}
bit-side-nav bit-nav-logo a:hover { background: #f1f8fd !important; }
html.theme_light bit-side-nav nav:not([style*="nav-bg-secondary"]) bit-nav-logo a { background: transparent !important; }
html.theme_light bit-side-nav nav:not([style*="nav-bg-secondary"]) bit-nav-logo a:hover { background: rgba(0, 59, 96, .06) !important; }
bit-side-nav bit-nav-logo bit-svg > svg { display: none !important; }
/* 1. The original Work Ninjas logo, untouched: head on the left, bandanna tail flying above
   the WORKNINJAS wordmark. 244px wide = 1.45x the artwork (viewBox 168 x 37). */
bit-side-nav bit-nav-logo bit-svg::before {
  content: ""; position: absolute; left: 12px; top: 6px; width: 244px; height: 54px;
  background: url(/wn-brand/logo.svg) no-repeat left top / contain;
}
/* 2. "powered by Vaultwarden" under the wordmark, starting at the W (x 56.1 in the artwork). */
bit-side-nav bit-nav-logo bit-svg::after {
  content: ""; position: absolute; left: 93px; top: 46px; width: 142px; height: 15px;
  background: url(/wn-brand/poweredby.svg) no-repeat left center / contain;
}
@container (max-width: 140px) {
  bit-side-nav bit-nav-logo bit-svg::before {
    left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
    background-image: url(/wn-brand/mark.svg); background-position: center;
  }
  bit-side-nav bit-nav-logo bit-svg::after { display: none; }
  bit-side-nav bit-nav-logo a { height: 56px !important; }
}
/* Page headings. The "Add" button keeps the standard navy primary; lime is reserved for the
   active nav marker and the "or" divider. */
bit-header h1 { font-family: "WN Poppins", Inter, sans-serif; font-weight: 500 !important; color: #003b60 !important; }
html:not(.theme_dark) bit-header h1 { color: #003b60 !important; }
html.theme_dark bit-header h1 { color: #fff !important; }
/* Filters panel: soft card. */
app-vault-filter > div { border-radius: 12px !important; overflow: hidden; border-color: #d5e3ee !important; }
html:not(.theme_dark) app-vault-filter > div > div > div:first-child { background: #ecf6fd; color: #003b60; }
app-vault-filter > div > div > div:first-child { text-transform: none !important; letter-spacing: 0 !important; }
