/* ==================== the staff top bar (js/staff-topbar.js) ====================
   The admin's pages: the person, the Ask bar in the middle, Settings, the bell,
   the language and the region (or Home). Its colours, the white header of the
   design language, are in css/veyora-shell.css; this file is its layout. The
   round buttons that stand for a choice (language, region, Home) carry the
   brand's orange outline (the owner, 8 Nov 2026: "Buttons like the region
   changer should have an orange outline, not grey"); the person, Settings and
   the bell are plain icons, as the bell was. The search's results and the
   menus open under the bar, inside the page, never over the whole screen.
   Loaded after brand-frame.css, so its colours win on this bar. */

.topbar.stb{gap:8px;padding:0 24px;--stb-side:120px}
/* Design language, phase 2 (Sam's mockup 02): the wordmark, the seven places,
   the Ask bar on the right with its key, the bell and the person. */
.topbar.stb .stb-logo{flex:none;display:flex;align-items:center;margin-inline-end:16px;line-height:0}
.topbar.stb .stb-logo img{height:20px;width:auto;display:block}
.topbar.stb .stb-tabs{flex:1 1 auto;min-width:0;align-self:stretch;display:flex;gap:2px;overflow-x:auto;scrollbar-width:none}
.topbar.stb .stb-tabs::-webkit-scrollbar{display:none}
.topbar.stb .stb-tab{flex:none;display:inline-flex;align-items:center;margin:0 12px;padding:0;border-top:2px solid transparent;border-bottom:2px solid transparent;font-size:14px;font-weight:500;text-decoration:none;white-space:nowrap}
.topbar.stb .stb-tab[hidden]{display:none}
.topbar.stb .stb-avatar{flex:none;width:40px;height:40px;padding:0;border:0;border-radius:50%;display:inline-grid;place-items:center;font:inherit;font-size:13px;font-weight:600;letter-spacing:.02em;cursor:pointer}
.topbar.stb .stb-kbd{position:absolute;inset-inline-end:10px;top:50%;transform:translateY(-50%);padding:2px 6px;border:1px solid;border-radius:6px;font:inherit;font-size:11px;font-weight:600;line-height:1.3;pointer-events:none}
.topbar.stb .stb-search-box:focus-within .stb-kbd{display:none}
/* both sides one width, so the search sits in the exact middle */
.topbar.stb .stb-side{flex:0 0 var(--stb-side);width:var(--stb-side);display:flex;align-items:center;gap:0}
.topbar.stb .stb-side-end{justify-content:flex-end}
.topbar.stb .stb-side .notif-wrap{margin:0;order:0}
.topbar.stb .stb-slot{display:inline-flex;flex:0 0 auto}

/* quick create, the "+" (Sam, 21 Nov 2026): a quiet outlined circle that fills on hover */
.topbar.stb .stb-create{flex:none;width:36px;height:36px;margin-inline-end:6px;padding:0;border:1.5px solid;border-radius:50%;display:inline-grid;place-items:center;cursor:pointer;transition:background .15s,color .15s}
.topbar.stb .stb-create[hidden]{display:none}
.topbar.stb .stb-create svg{width:18px;height:18px;display:block}
.topbar.stb .stb-pop kbd.stb-item-code{margin-inline-start:auto;padding:1px 6px;border:1px solid;border-radius:5px;font:inherit;font-size:11px;font-weight:600}

/* plain icons: the person, Settings, the bell */
.topbar.stb .stb-icon,
.topbar.stb .icon-btn.stb-icon{width:40px;height:40px;padding:0;border:0;border-radius:50%;background:transparent;
  display:inline-grid;place-items:center;flex:0 0 auto;cursor:pointer;text-decoration:none}
.topbar.stb .stb-icon svg{width:22px;height:22px;display:block}

/* outlined choices: the language, the region, Home; pills with a caret (the owner, 9 Nov 2026) */
.topbar.stb .stb-round{width:40px;height:40px;padding:0;border:1px solid;border-radius:50%;background:transparent;display:inline-grid;place-items:center;flex:0 0 auto;cursor:pointer;text-decoration:none;font:inherit}
.topbar.stb .stb-pill{width:64px;height:38px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;gap:4px}
.topbar.stb .stb-caret{display:inline-flex}
.topbar.stb .stb-caret svg{width:14px;height:14px}
.topbar.stb .stb-lang-code{font-size:13px;font-weight:700;letter-spacing:.04em;line-height:1}
.topbar.stb .stb-region-btn .vmode-flag-svg{width:22px;height:15px;display:block;border-radius:2px}
.topbar.stb .stb-home svg{width:20px;height:20px;display:block}

/* the search, in the middle */
.topbar.stb .stb-search{flex:0 1 380px;min-width:0;display:flex;justify-content:flex-end;margin:0 4px}
.topbar.stb .stb-search-box{position:relative;width:100%;max-width:380px}
.topbar.stb .stb-search-ico{position:absolute;inset-inline-start:13px;top:50%;transform:translateY(-50%);display:flex;pointer-events:none}
.topbar.stb .stb-search-ico svg{width:18px;height:18px}
.topbar.stb .stb-search-input{display:block;width:100%;min-width:0;height:40px;margin:0;border:1px solid;border-radius:999px;font:inherit;font-size:15px;padding-block:0;padding-inline:38px 14px;outline:none;-webkit-appearance:none;appearance:none}

/* the menus and the results: white, under the bar */
.topbar.stb .stb-pop,
.topbar.stb .stb-results{position:absolute;z-index:90;background:#fff;color:#191612;border:1px solid rgba(25,22,18,.12);border-radius:14px;
  box-shadow:0 18px 50px rgba(25,22,18,.24);text-align:start;box-sizing:border-box}
.topbar.stb .stb-results[hidden]{display:none}
.topbar.stb .stb-pop{width:300px;max-width:calc(100% - 16px);padding:6px;max-height:calc(100vh - 80px);max-height:calc(100dvh - 80px);overflow:auto;overscroll-behavior:contain}
.stb-pop-head{display:flex;flex-direction:column;gap:2px;padding:10px 12px 12px;margin-bottom:6px;border-bottom:1px solid rgba(25,22,18,.1)}
.stb-pop-name{font-weight:700;font-size:16px;line-height:1.25;overflow-wrap:anywhere}
.stb-pop-sub{font-size:13px;line-height:1.3;color:#6b6560;overflow-wrap:anywhere}
.stb-pop-sep{height:1px;margin:6px 4px;background:rgba(25,22,18,.1)}
.topbar.stb .stb-item,
.stb-more .stb-item{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:8px 12px;border:0;border-radius:10px;
  background:none;color:#191612;font:inherit;font-size:15px;font-weight:600;line-height:1.25;text-align:start;text-decoration:none;cursor:pointer;box-sizing:border-box}
.topbar.stb .stb-item:hover,
.topbar.stb .stb-item:focus-visible,
.stb-more .stb-item:hover,
.stb-more .stb-item:focus-visible{background:#f4f1ec;outline:none}
.topbar.stb .stb-item[aria-checked="true"]{background:#fdf0e8}
.topbar.stb .stb-item > svg,
.stb-more .stb-item > svg{flex:0 0 auto;width:20px;height:20px;color:#6b6560}
.stb-item-text{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.stb-item-code{flex:0 0 auto;font-size:12px;font-weight:700;letter-spacing:.04em;color:#6b6560}
.stb-tick{flex:0 0 18px;width:18px;display:inline-flex;color:var(--vx-ink)}
.stb-tick svg{width:18px;height:18px}
.stb-flag{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:30px}
.stb-flag .vmode-flag-svg{width:30px;height:20px;display:block;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.14)}
.stb-flag svg{width:22px;height:22px}
.topbar.stb .stb-item > .vmode-flag-svg{width:20px;height:14px;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.14)}
.topbar.stb .stb-settings[hidden]{display:none}

.topbar.stb .stb-results{max-height:min(70vh,560px);overflow:auto;overscroll-behavior:contain;padding:6px;border-radius:0 0 14px 14px}
.stb-group + .stb-group{margin-top:4px;padding-top:4px;border-top:1px solid rgba(25,22,18,.08)}
.stb-group-h{padding:8px 12px 4px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#6b6560}
.topbar.stb .stb-opt{display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:44px;padding:8px 12px;border-radius:10px;
  color:#191612;text-decoration:none;cursor:pointer}
.topbar.stb .stb-opt.is-active{background:#f4f1ec}
.stb-opt-title{font-size:15px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.stb-opt-hint{font-size:13px;line-height:1.3;color:#6b6560;overflow-wrap:anywhere}
.stb-none{padding:14px 12px;font-size:15px;color:#6b6560}
.stb-wait{height:3px;margin:12px;overflow:hidden;border-radius:2px;background:#f1ece6}
.stb-wait-bar{display:block;width:40%;height:100%;background:var(--vx-ink);animation:adm-host-load 1s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){.stb-wait-bar{animation:none}}

/* a phone: the same row, tighter; the bell keeps its place in it */
@media(max-width:900px){
  .topbar.stb{padding:0 10px;gap:4px;--stb-side:120px}
  .topbar.stb .stb-tabs{display:none}
  .topbar.stb .stb-kbd{display:none}
  .topbar.stb .stb-search{flex:1 1 auto}
  .topbar.stb .notif-wrap{margin-inline-start:0;margin-left:0;order:0;z-index:auto}
  .topbar.stb .stb-search{margin:0 2px}
}
@media(max-width:360px){
  .topbar.stb{padding:0 6px;gap:2px;--stb-side:99px}
  .topbar.stb .stb-icon,
  .topbar.stb .icon-btn.stb-icon{width:33px;height:38px}
  .topbar.stb .stb-search-input{padding-inline:32px 8px;font-size:14px}
  .topbar.stb .stb-search-ico{inset-inline-start:10px}
}

/* ==================== the admin's top bar: smaller, thinner icons (Sam Peer, 10 Nov 2026) ====================
   On the admin's pages the bar's round icons step down a size and draw a
   thinner line, to the buttons' hairline standard. Tap targets keep their size.
   (Moved here from css/brand-frame.css, where it was an "html body" override; it
   needs no extra weight over the rules above.) */
.app-shell.is-admin .topbar.stb .stb-icon svg{width:19px;height:19px}
.app-shell.is-admin .topbar.stb .stb-icon svg,.app-shell.is-admin .topbar.stb .stb-icon svg *{stroke-width:1.5}
/* All pages folds the side menu on a computer; a phone has its own bar. */
@media(max-width:900px){.topbar.stb .stb-item[data-stb-act="all-pages"]{display:none}}

/* Design language, phase 2: the end is the bell and the person, as wide as they are. */
.topbar.stb .stb-side.stb-side-end{flex:none;width:auto;gap:6px}
/* A smaller computer: the places close up and the search gives them room. */
@media(min-width:901px) and (max-width:1200px){
  .topbar.stb{padding:0 16px}
  .topbar.stb .stb-tab{margin:0 7px;font-size:13.5px}
  .topbar.stb .stb-logo{margin-inline-end:6px}
  .topbar.stb .stb-logo img{height:17px}
  .topbar.stb .stb-kbd{display:none}
}

/* Design language, phase 4: eight places (Today and CEO, Sam's mockups 02 and
   02b). On a computer the places keep their width and the Ask bar gives way. */
@media(min-width:901px){.topbar.stb .stb-tabs{flex:0 0 auto}}

/* ==================== the phone bar's More (js/staff-topbar.js openMore) ====================
   Sam, 11 Nov 2026: More opens a sheet with Warehouse, Money, Team and the rest
   of the menu. The language's sheet (.vx-sheet) rising from the bottom over the
   bar, its rows the person menu's; the place you are in is lit. */
.stb-more-back{position:fixed;inset:0;z-index:60;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.4);overscroll-behavior:contain}
.stb-more.vx-sheet{width:100%;max-width:560px;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);overflow:auto;box-sizing:border-box;
  padding:8px 8px calc(12px + env(safe-area-inset-bottom,0px));border-radius:16px 16px 0 0}
.stb-more .stb-item{min-height:52px;font-size:16px}
.stb-more .stb-item[aria-current="page"]{background:#f4f1ec}
.stb-more .stb-item[aria-current="page"] > svg{color:#191612}
.stb-more .stb-pop-sep{margin:6px 12px}
