/* ==========================================================================
   Accred suite navigation — app tabs and app launcher (brand kit, with accred-suitenav.js).
   Load after accred-premium.css. Vendored verbatim by tools/brand-sync.mjs --suitenav; never edit a copy.
   Rules: ACCRED_PRODUCT_DESIGN_SYSTEM.md §4.3 App tabs, §4.4 App launcher.
   ========================================================================== */

/* Each app's on-dark accent: glyphs sit on graphite (tiles) or on the suite bar (tabs). */
.asn-tab, .asn-tile { --asn-c: var(--suite-product-hub-on-dark); }
[data-app="consult"].asn-tab, [data-app="consult"].asn-tile { --asn-c: var(--suite-product-consult-on-dark); }
[data-app="migrate"].asn-tab, [data-app="migrate"].asn-tile { --asn-c: var(--suite-product-migrate-on-dark); }
[data-app="connect"].asn-tab, [data-app="connect"].asn-tile { --asn-c: var(--suite-product-connect-on-dark); }
[data-app="assess"].asn-tab, [data-app="assess"].asn-tile { --asn-c: var(--suite-product-assess-on-dark); }
[data-app="manage"].asn-tab, [data-app="manage"].asn-tile { --asn-c: var(--suite-product-manage-on-dark); }
[data-app="protect"].asn-tab, [data-app="protect"].asn-tile { --asn-c: var(--suite-product-protect-on-dark); }
[data-app="fleet"].asn-tab, [data-app="fleet"].asn-tile { --asn-c: var(--suite-product-fleet-on-dark); }
[data-app="devices"].asn-tab, [data-app="devices"].asn-tile { --asn-c: var(--suite-product-devices-on-dark); }
[data-app="aware"].asn-tab, [data-app="aware"].asn-tile { --asn-c: var(--suite-product-aware-on-dark, #6cb6ff); }
[data-app="automate"].asn-tab, [data-app="automate"].asn-tile { --asn-c: var(--suite-product-automate-on-dark); }

/* ---------- App tabs: quiet pills on the suite bar; the current app is a lit pill ---------- */

.acc-topbar .acc-apptabs.asn-tabs { align-items: center; align-self: center; gap: 0.125rem; height: 2.5rem; padding: 0 0.125rem; }
.acc-apptabs .acc-apptab.asn-tab {
  height: 2rem; gap: 0.5rem; padding: 0 0.75rem 0 0.625rem; border-radius: var(--radius-md);
  color: hsl(var(--suitebar-muted)); font-size: 0.875rem; font-weight: 500; letter-spacing: -0.003em;
  cursor: pointer; outline-offset: 0;
}
/* Every app can be pinned (3.16): tabs keep their width; the kit hides the ones that don't fit (never the current one). */
.acc-topbar .acc-apptabs.asn-tabs > .asn-tab { flex: 0 0 auto; }
.acc-apptabs .acc-apptab.asn-tab::after { display: none; }
.asn-tab__glyph { width: 1rem; height: 1rem; flex: 0 0 auto; color: var(--asn-c); opacity: 0.78; transition: opacity var(--dur-fast) var(--ease-out); }
.acc-apptabs .acc-apptab.asn-tab:hover { background: hsl(var(--suitebar-hover)); color: hsl(var(--suitebar-foreground)); }
.acc-apptabs .acc-apptab.asn-tab:hover .asn-tab__glyph { opacity: 1; }
.acc-apptabs .acc-apptab.asn-tab[aria-current="page"] {
  background: hsl(var(--suitebar-elevated)); color: hsl(var(--suitebar-foreground));
  box-shadow: 0 0 0 1px hsl(var(--suitebar-border));
}
.acc-apptabs .acc-apptab.asn-tab[aria-current="page"] .asn-tab__glyph { opacity: 1; }
.acc-apptabs .acc-apptab.asn-tab:focus-visible { outline: 2px solid hsl(var(--suitebar-foreground)); outline-offset: -2px; }
/* The launcher button lines up with the tabs, as their last pill. */
.acc-topbar .acc-apptabs.asn-tabs + [data-shell="app-launcher"] { margin-left: 0.125rem; border-radius: var(--radius-md); }
/* 3.14.4: each app tab is exactly its width in Geist, here and in the boot splash, so the bar never moves while
   the font loads in a new document (a switch paints the splash first, often before Geist is in).
   3.22.4: rounded up to a whole pixel (round(up, …, 1px); the em width stays as the fallback), so every tab, glyph
   and label after the first starts on a pixel instead of a fraction of one (72.156 px, 96.656 px…), which drew the
   glyphs soft at 100% and 125% scaling. */
@media (min-width: 1024px) {
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="hub"] { width: 5.1551em; width: round(up, 5.1551em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="consult"] { width: 6.9051em; width: round(up, 6.9051em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="migrate"] { width: 6.8527em; width: round(up, 6.8527em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="connect"] { width: 7.2087em; width: round(up, 7.2087em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="assess"] { width: 6.6328em; width: round(up, 6.6328em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="manage"] { width: 7.0212em; width: round(up, 7.0212em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="protect"] { width: 6.7321em; width: round(up, 6.7321em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="fleet"] { width: 5.644em; width: round(up, 5.644em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="devices"] { width: 6.9866em; width: round(up, 6.9866em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="aware"] { width: 6.1953em; width: round(up, 6.1953em, 1px); }
  .acc-topbar .acc-apptabs.asn-tabs .asn-tab[data-app="automate"] { width: 7.8438em; width: round(up, 7.8438em, 1px); }
}

/* Below 1024 px the foundation moves the tabs into the sidebar sheet's 3 × 2 grid. */
.acc-sidebar__apps .acc-apptab.asn-tab { height: auto; padding: 0.5rem 0.125rem; color: hsl(var(--sidebar-foreground, var(--foreground))); }
.acc-sidebar__apps .asn-tab__glyph { width: 1.25rem; height: 1.25rem; opacity: 1; color: var(--asn-c); }
.acc-sidebar__apps .asn-tab { --asn-c: var(--suite-product-hub); }
.acc-sidebar__apps [data-app="consult"].asn-tab { --asn-c: var(--suite-product-consult); }
.acc-sidebar__apps [data-app="migrate"].asn-tab { --asn-c: var(--suite-product-migrate); }
.acc-sidebar__apps [data-app="connect"].asn-tab { --asn-c: var(--suite-product-connect); }
.acc-sidebar__apps [data-app="assess"].asn-tab { --asn-c: var(--suite-product-assess); }
.acc-sidebar__apps [data-app="manage"].asn-tab { --asn-c: var(--suite-product-manage); }
.acc-sidebar__apps [data-app="protect"].asn-tab { --asn-c: var(--suite-product-protect); }
.acc-sidebar__apps [data-app="fleet"].asn-tab { --asn-c: var(--suite-product-fleet); }
.acc-sidebar__apps [data-app="devices"].asn-tab { --asn-c: var(--suite-product-devices); }
.acc-sidebar__apps [data-app="aware"].asn-tab { --asn-c: var(--suite-product-aware, #1f6fd1); }
.acc-sidebar__apps [data-app="automate"].asn-tab { --asn-c: var(--suite-product-automate); }

/* ---------- App launcher panel ---------- */

.asn-launcher {
  position: fixed; z-index: var(--z-popover, 50);
  display: flex; flex-direction: column;
  width: min(25rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 5rem);
  border: 1px solid hsl(var(--border)); border-radius: var(--radius-xl, 12px);
  background: hsl(var(--popover)); color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 12px 32px -6px rgb(0 0 0 / 0.18), 0 32px 64px -24px rgb(0 0 0 / 0.22);
  font-size: 0.875rem; line-height: 1.4; letter-spacing: -0.003em;
  overflow: hidden; outline: none;
  opacity: 0; transform: translateY(-4px) scale(0.985); transform-origin: top left;
  transition: opacity 140ms var(--ease-out), transform 180ms var(--ease-out);
}
.asn-launcher[data-open] { opacity: 1; transform: none; }
/* All apps in two columns (DS 3.14): 640 px wide, rows run down column 1 then column 2 (DOM order). The kit sets
   --cols at 1100 px and wider with four or more apps; a phone or a short list is one 400 px list. */
.asn-launcher--cols { width: min(40rem, calc(100vw - 1.5rem)); }
.asn-launcher--cols :is(.asn-launcher__pinned, .asn-launcher__list) { columns: 2; column-gap: 0.25rem; }
.asn-launcher--cols :is(.asn-launcher__pinned, .asn-launcher__list) > li { break-inside: avoid; }
:root.dark .asn-launcher, [data-theme="dark"] .asn-launcher {
  border-color: hsl(0 0% 100% / 0.1);
  box-shadow: 0 1px 0 hsl(0 0% 100% / 0.05) inset, 0 16px 40px -8px rgb(0 0 0 / 0.7), 0 32px 80px -24px rgb(0 0 0 / 0.8);
}
@media (prefers-reduced-motion: reduce) { .asn-launcher { transition: none; transform: none; } }

/* Body (no search since 3.16: the label "All apps" is the panel's first line) */
.asn-launcher__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0.75rem 0.5rem; scrollbar-width: thin; scrollbar-color: hsl(var(--border-strong)) transparent; }
.asn-launcher ul { margin: 0; padding: 0; list-style: none; }
.acc-apptabs[aria-busy] .asn-tab { cursor: progress; }
.asn-group__label {
  margin: 0; padding: 0.25rem 0.625rem 0.375rem;
  color: hsl(var(--muted-foreground)); font-size: 0.75rem; font-weight: 600; line-height: 1.2; letter-spacing: 0.005em;
}

/* Rows */
.asn-app {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 3.25rem; padding: 0.5rem 0.625rem;
  border: 0; border-radius: var(--radius-md); background: transparent; color: inherit;
  font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.asn-app:hover { background: hsl(var(--subtle, var(--muted))); }
:root.dark .asn-app:hover, [data-theme="dark"] .asn-app:hover { background: hsl(0 0% 100% / 0.06); }
.asn-app:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: -2px; background: hsl(var(--subtle, var(--muted))); }
.asn-app__text { display: grid; gap: 0.0625rem; flex: 1 1 auto; min-width: 0; }
.asn-app__name { font-weight: 550; line-height: 1.3; color: hsl(var(--foreground)); }
/* One line, so every row is the same height (3.14.3); the full text is the span's title. */
.asn-app__desc { overflow: hidden; color: hsl(var(--muted-foreground)); font-size: 0.8125rem; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.asn-app__current { flex: 0 0 auto; width: 1rem; height: 1rem; margin-left: auto; color: hsl(var(--primary)); }
.asn-app[aria-current="page"] .asn-app__name::after { content: none; }

/* Graphite tile: the app mark's squircle in miniature, the same in light and dark. */
.asn-tile {
  position: relative; display: grid; place-items: center; flex: 0 0 auto;
  width: 2.25rem; height: 2.25rem; border-radius: 27%;
  background: linear-gradient(#2a2a30, #141417);
  color: var(--asn-c);
  box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.14), inset 0 0 0 1px hsl(0 0% 100% / 0.06), 0 1px 2px rgb(0 0 0 / 0.18);
}
.asn-tile > svg { width: 1.25rem; height: 1.25rem; }

.asn-launcher [hidden] { display: none !important; }

/* Phones: one column, full width less gutters, scrolls inside itself. */
@media (max-width: 639px) {
  .asn-launcher { width: calc(100vw - 1rem); }
}
@media (pointer: coarse) { .asn-app { min-height: 3.5rem; } }
@media (forced-colors: active) {
  .asn-launcher { border: 1px solid CanvasText; }
  .asn-app:focus-visible { outline: 2px solid Highlight; }
  .acc-apptabs .acc-apptab.asn-tab[aria-current="page"] { outline: 1px solid CanvasText; }
}

/* ---------- Your apps (3.11): ⋯ menu, drag, Add apps ---------- */

.asn-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A row is the link plus its ⋯ button, which shows only on hover and focus; on touch a long-press opens the menu. */
.asn-row { position: relative; }
.asn-row > .asn-app { padding-right: 2.75rem; }
.asn-more {
  position: absolute; top: 50%; right: 0.5rem; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding: 0;
  border: 0; border-radius: var(--radius-sm, 6px); background: transparent; color: hsl(var(--muted-foreground));
  cursor: pointer; opacity: 0; transform: translateY(-50%);
  transition: opacity var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.asn-more > svg { width: 1rem; height: 1rem; }
.asn-row:hover .asn-more, .asn-row:focus-within .asn-more, .asn-more[aria-expanded="true"] { opacity: 1; }
.asn-more:hover { background: hsl(var(--fill)); color: hsl(var(--foreground)); }
.asn-more:focus-visible { opacity: 1; outline: 2px solid hsl(var(--ring)); outline-offset: -2px; color: hsl(var(--foreground)); }

.asn-launcher__none { margin: 0; padding: 1rem 0.625rem; color: hsl(var(--muted-foreground)); }
/* Every app on the bar (3.16): under the label, one placeholder slot (the filled slot a drag shows) that reads
   "Organize apps here: drag one off the bar."; a tab carried over the panel takes its place. */
.asn-launcher--all-on-bar .asn-launcher__none {
  display: flex; align-items: center; justify-content: center; min-height: 3.25rem; margin: 0 0.125rem; padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md); background: hsl(var(--fill)); font-size: 0.8125rem; text-align: center;
}
@media (pointer: coarse) { .asn-launcher--all-on-bar .asn-launcher__none { min-height: 3.5rem; } }
@media (forced-colors: active) { .asn-launcher--all-on-bar .asn-launcher__none { border: 1px solid CanvasText; } }
.asn-launcher--all-on-bar .asn-launcher__list:has(> .asn-ph) { padding: 0.5rem 0; }
.asn-launcher__list:has(> .asn-ph) ~ .asn-launcher__none { display: none; }

/* The small menu: one of .acc-menu's looks, sized for four actions. */
.asn-menu {
  position: fixed; z-index: calc(var(--z-popover, 50) + 1); min-width: 12rem; padding: 0.25rem;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg, 10px);
  background: hsl(var(--popover)); color: hsl(var(--popover-foreground, var(--foreground)));
  box-shadow: var(--shadow-md); font-size: 0.875rem;
}
:root.dark .asn-menu, [data-theme="dark"] .asn-menu { border-color: hsl(0 0% 100% / 0.1); }
.asn-menu__item {
  display: flex; align-items: center; width: 100%; min-height: 2rem; padding: 0 0.625rem;
  border: 0; border-radius: var(--radius-sm, 6px); background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.asn-menu__item:hover, .asn-menu__item:focus-visible { background: hsl(var(--subtle, var(--muted))); outline: none; }
:root.dark .asn-menu__item:hover, :root.dark .asn-menu__item:focus-visible, [data-theme="dark"] .asn-menu__item:focus-visible { background: hsl(0 0% 100% / 0.06); }
.asn-menu__item:focus-visible { box-shadow: inset 0 0 0 2px hsl(var(--ring)); }
.asn-menu__item[aria-disabled="true"] { color: hsl(var(--muted-foreground)); cursor: default; }
.asn-menu__item[aria-disabled="true"]:hover { background: transparent; }
.asn-menu__sep { height: 1px; margin: 0.25rem 0; background: hsl(var(--border)); }

/* Add apps (Owners and Admins): one quiet link at the foot. */
.asn-launcher__foot { flex: 0 0 auto; display: flex; padding: 0.375rem 0.5rem; border-top: 1px solid hsl(var(--border)); }
.asn-launcher__add {
  display: inline-flex; align-items: center; height: 2rem; padding: 0 0.625rem; border-radius: var(--radius-md);
  color: hsl(var(--primary)); font-size: 0.8125rem; font-weight: 500; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.asn-launcher__add:hover { background: hsl(var(--subtle, var(--muted))); }
:root.dark .asn-launcher__add:hover, [data-theme="dark"] .asn-launcher__add:hover { background: hsl(0 0% 100% / 0.06); }
.asn-launcher__add:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: -2px; }

/* Drag: no native link drag or callout; the lifted app rises 2 px on a 1 px border and the large shadow; the slot it
   leaves is a soft filled pill, never a dashed outline. */
.asn-tab, .asn-row > .asn-app { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
.asn-row > .asn-app { touch-action: pan-y; }
.asn-src { display: none !important; }
.asn-tabs > .asn-tab { transition: transform 150ms var(--ease-out), color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.asn-launcher__list > .asn-row { transition: transform 150ms var(--ease-out); }
.asn-dragging, .asn-dragging * { cursor: grabbing !important; }
.asn-ghost {
  position: fixed; z-index: calc(var(--z-popover, 50) + 2); margin: 0; pointer-events: none;
  display: flex; align-items: center; box-sizing: border-box;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius-md);
  background: hsl(var(--popover)); color: hsl(var(--foreground));
  box-shadow: var(--shadow-lg);
}
:root.dark .asn-ghost, [data-theme="dark"] .asn-ghost {
  border-color: hsl(0 0% 100% / 0.16);
  box-shadow: 0 0 0 1px hsl(0 0% 0% / 0.5), var(--shadow-lg);
}
.asn-ghost--tab { gap: 0.5rem; padding: 0 0.75rem 0 0.625rem; font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.asn-ghost--tab .asn-tab__glyph { width: 1rem; height: 1rem; color: var(--asn-c); }
.asn-ghost--tab::after { display: none; }
.asn-ghost--row { gap: 0.75rem; padding: 0.5rem 0.625rem; }
.asn-ghost--row.asn-ghost--compact { width: auto !important; height: 2rem !important; min-height: 0 !important; gap: 0.5rem; padding: 0 0.75rem 0 0.375rem; font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.asn-ghost--compact .asn-tile { width: 1.5rem; height: 1.5rem; border-radius: 0.4rem; }
.asn-ghost--compact .asn-tile svg { width: 0.875rem; height: 0.875rem; }
.asn-ghost--compact .asn-app__desc { display: none; }
.asn-lift { transform: translateY(-2px); }
.asn-ph { box-sizing: border-box; border: 0; border-radius: var(--radius-md); background: hsl(var(--fill)); }
.asn-ph--tab { display: block; flex: 0 0 auto; height: 2rem; background: hsl(var(--suitebar-hover)); }
.acc-sidebar__apps .asn-ph--tab { width: auto !important; height: 3.25rem; background: hsl(var(--fill)); }
.asn-ph--row { min-height: 3.25rem; list-style: none; }
@media (pointer: coarse) {
  .asn-ph--row { min-height: 3.5rem; }
  .asn-more { width: 2.75rem; height: 2.75rem; right: 0.25rem; }
  .asn-row > .asn-app { padding-right: 3.25rem; }
  .asn-menu__item { min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .asn-tabs > .asn-tab, .asn-launcher__list > .asn-row, .asn-more { transition: none; }
  .asn-lift { transform: none; }
}
@media (forced-colors: active) {
  .asn-ghost, .asn-menu { border: 1px solid CanvasText; }
  .asn-ph { border: 1px solid CanvasText; background: Canvas; }
  .asn-menu__item:focus-visible { outline: 2px solid Highlight; }
}
