/* ===========================================================================
   bo-shell.css — HALCYON CLEARANCE — unified back-office header
   ---------------------------------------------------------------------------
   ONE header, shared byte-for-byte (via bo-shell.js renderBackOfficeHeader)
   across finance.html / staff.html / driver.html. Ported from finance.css's
   "ink bar" (.fin-header) treatment — the estate's existing dark sticky
   header — so staff/driver gain it without loading finance.css. Everything
   here is namespaced under .bo-shell-* to avoid any collision with the
   legacy .fin-header/.site-header/.dv-header/.role-badge rules those three
   pages' own stylesheets still carry (dead now, left in place on purpose —
   see the U3 build notes).

   Relies on styles.css's shared tokens (--ink-900/--amber/--amber-ink/
   --display/--ease/--line) — every page already loads styles.css first.
   ========================================================================= */

/* <main> is a programmatic focus target after interactive sign-in (bo-shell.js
   focusMain) — a landmark, not a control, so no ring. Standard skip-link-target
   treatment. */
main:focus, main:focus-visible { outline: none; }

.bo-shell-header {
  position: sticky; top: 0; z-index: 150;
  background: rgba(17, 24, 32, .96);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}
.bo-shell-wrap {
  display: flex; align-items: center; gap: 18px;
  padding: 11px 32px; min-height: 44px;
}

/* ---------- brand ---------- */
.bo-shell-brand {
  display: flex; align-items: center; gap: 10px; min-width: 0; flex: none;
  min-height: 44px; text-decoration: none;
}
.bo-shell-mark {
  width: 28px; height: 28px; flex: none; border-radius: 7px;
  background: var(--amber); display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800; color: var(--amber-ink); font-size: .9rem;
}
.bo-shell-word {
  font-family: var(--display); font-weight: 800; font-size: 1.14rem;
  color: #fff; letter-spacing: -.015em; white-space: nowrap;
}

/* ---------- tabs (role-gated nav; hidden by default, shown by updateForRole) ---------- */
.bo-shell-tabs { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bo-shell-tab {
  font-family: var(--display); font-weight: 700; font-size: .86rem;
  color: #AEB8C4; text-decoration: none; white-space: nowrap;
  padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 8px; border-bottom: 2px solid transparent;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.bo-shell-tab:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.bo-shell-tab.is-active { color: #fff; border-bottom-color: var(--amber); }
.bo-shell-tab[hidden] { display: none; }

.bo-shell-spacer { flex: 1; }

/* ---------- who / sign out ---------- */
.bo-shell-who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.bo-shell-who[hidden] { display: none; }
.bo-shell-email {
  color: #fff; font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums;
  max-width: 26vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bo-shell-role {
  font-family: var(--display); font-size: .62rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #C9CDD2; white-space: nowrap;
}
.bo-shell-role.r-admin { background: var(--amber); color: var(--amber-ink); }
.bo-shell-role.r-staff,
.bo-shell-role.r-driver { background: rgba(255, 255, 255, .20); color: #fff; }

.bo-shell-header .bo-shell-signout.btn-ghost {
  min-height: 44px; padding: 8px 14px; font-size: .82rem;
}
.bo-shell-header .bo-shell-signout.btn-ghost:hover { background: rgba(255, 255, 255, .14); }

/* ---------- responsive — wrap, no page-level horizontal overflow at 390 ---------- */
@media (max-width: 820px) {
  .bo-shell-wrap { padding: 10px 18px; gap: 10px; flex-wrap: wrap; }
  .bo-shell-tabs {
    order: 3; flex: 1 1 100%; justify-content: flex-start;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .bo-shell-who { flex: none; margin-left: auto; }
  .bo-shell-email { max-width: 38vw; }
}
@media (max-width: 480px) {
  .bo-shell-word { font-size: 1rem; }
  .bo-shell-email { max-width: 30vw; font-size: .78rem; }
  .bo-shell-role { display: none; }  /* role is implied by which page you're on; frees width for email + sign out at 390 */
}
