/* The chrome: what base.html draws around every page (the top bar and
   its menus, the bands above and below it, the hub rail, the phone
   drawer, the hub bar, the client nav, the flash messages and the
   foot). Interface rebuild step 8 (2026-11-30): the chrome uses no
   Bootstrap class and no Bootstrap script, so it stands when Bootstrap
   leaves. Its menus, dialogs and drawer are the app's own parts
   (static/app/app.css); this file holds the chrome's own layout and look.
   Every colour is an --app-* token, so light, dark and each person's
   accent just work.

   Loaded after base.html's own <style> blocks, last of the app's
   stylesheets (bridge.css, which re-skinned Bootstrap, left with it).
   base.html still holds the chrome's older rules (geometry, the jump
   box, the rail, the hub bar); those read the same tokens. */

/* ── Ground and type ─────────────────────────────────────────────────
   The page's ground and type, and the little of Bootstrap's reset the
   chrome leans on (box sizing, no body margin). Moved from bridge.css. */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--app-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--app-text);
  background: var(--app-bg);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--app-font);
  font-weight: 600;
  color: var(--app-text);
}
/* --hubbar-gap: the space under the hub bar, which the page header
   strip (app.css) closes up. */
.content-area { background: var(--app-bg); --hubbar-gap: 1.25rem; }
footer { background: transparent; color: var(--app-muted); border-top: 1px solid var(--app-border); font-size: 12px; }
/* The sign-in page keeps its dark brand ground, where the muted text
   of the foot cannot be read in light mode: there the foot sits on the
   panel ground. */
body:has(.signin-page) footer { background: var(--app-panel); }
hr { border-color: var(--app-border-strong); opacity: 1; }
:focus-visible { outline: 2px solid var(--app-accent-ink); outline-offset: 2px; }

/* ── The frame: the column of nav and the content beside it ─────────── */
.shell-main { display: flex; flex-grow: 1; }
.site-foot { text-align: center; padding: 1rem 0; margin-top: auto; }
.site-foot-version { margin-left: 8px; font-size: 0.75rem; color: var(--app-muted); }

/* ── Bands: the impersonation banner and the two-factor nag (in the
   sticky top), the profile and calendar reminders and the demo banner
   (scrolled away with the page). ───────────────────────────────────── */
.chrome-band {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 16px; padding: 8px 16px; font-size: 0.9rem;
}
.chrome-band i.bi { margin-right: 6px; }
.chrome-band-btn i.bi { margin-right: 4px; }
.chrome-band-aside { margin-left: 8px; }
.impersonation-banner .chrome-band-aside { opacity: .85; font-size: .85em; }
.chrome-band-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chrome-band-form { margin: 0; }
.chrome-band-btn { flex-shrink: 0; font-weight: 600; }
.chrome-band-link {
  background: none; border: 0; padding: 4px 8px; font: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.impersonation-banner { position: sticky; top: 0; z-index: 1060; }
.two-factor-nag { position: sticky; top: 0; z-index: 1059; }
.impersonation-banner { background: var(--app-accent); color: var(--app-accent-text); border-bottom: 1px solid var(--app-accent-hover); }
.two-factor-nag { background: var(--app-warn-bg); color: var(--app-warn); border-bottom: 1px solid var(--app-border); }
.two-factor-nag.past-deadline { background: var(--app-bad-bg); color: var(--app-bad); }
.staff-profile-nag { background: var(--app-info-bg); color: var(--app-text); border-bottom: 1px solid var(--app-border); }
.staff-profile-nag a:not(.app-btn), .two-factor-nag a:not(.app-btn) { color: inherit; }
/* The demo banner: inverted (the text colour as its ground), with the
   accent under it, in every mode. */
.demo-banner {
  text-align: center; padding: 4px 16px; font-size: .85rem;
  background: var(--app-text); color: var(--app-panel); border-bottom: 2px solid var(--app-accent);
}
.demo-banner i.bi { margin-right: 4px; }

/* ── Flash messages (the message part), under the bands ─────────────── */
.flash-messages { padding: 16px 24px 0; }
@media (max-width: 575.98px) { .flash-messages { padding: 12px 16px 0; } }

/* ── Top bar ─────────────────────────────────────────────────────────
   A plain panel with a line under it. The logo is the only brand. */
.navbar-start { display: flex; align-items: center; gap: 8px; min-width: 0; }
.navbar-end { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
@media (min-width: 768px) { .navbar-end { gap: 16px; } }
.navbar-mp .brand-mp { text-decoration: none; white-space: nowrap; padding: 5px 0; margin-right: 16px; }
@media (max-width: 575.98px) { .brand-mp-text { display: none; } }
.navbar-toggler-mp { display: none; align-items: center; justify-content: center; font-size: 1.25rem; line-height: 1; cursor: pointer; }
@media (max-width: 767.98px) { .navbar-toggler-mp { display: inline-flex; } }
@media (max-width: 767.98px) { .navbar-mp .client-brand-logo, .navbar-mp .badge-client { display: none; } }
.navbar-mp .badge-client { display: inline-block; border-radius: 20px; }

.navbar-mp {
  background: var(--app-panel); color: var(--app-text);
  border-bottom: 1px solid var(--app-border);
  padding: 8px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.navbar-mp .brand-mp { color: var(--app-text); font-weight: 600; font-size: 15px; letter-spacing: 0; }
.navbar-mp .brand-mp img { height: 28px; width: 28px; }
.navbar-mp .client-brand-logo { border: 1px solid var(--app-border); }
.navbar-mp .badge-client {
  background: var(--app-surface); color: var(--app-muted);
  border: 1px solid var(--app-border); font-weight: 500; font-size: 12px; padding: 2px 10px;
}
.jump-box-btn, .mobile-search-toggle, .navbar-toggler-mp, .dark-mode-toggle, .account-btn {
  background: var(--app-panel); color: var(--app-muted);
  border: 1px solid var(--app-border-strong);
}
.jump-box-btn { background: var(--app-surface); border-radius: var(--app-radius-control); font-size: 14px; }
.jump-box-btn:hover, .jump-box-btn:focus-visible { background: var(--app-hover); border-color: var(--app-border-input); }
/* base.html takes the outline off the jump box; with the keyboard on it
   the ring comes back, in the ink. */
.jump-box-btn:focus-visible { outline: 2px solid var(--app-accent-ink); outline-offset: 2px; }
.mobile-search-toggle:hover, .navbar-toggler-mp:hover, .dark-mode-toggle:hover,
.account-btn:hover, details[open] > .account-btn {
  background: var(--app-hover); color: var(--app-text); border-color: var(--app-border-input);
}
.account-btn { color: var(--app-text); }
.account-btn-sub { color: var(--app-muted); }
@media (max-width: 575.98px) { .account-btn-text { display: none; } .account-btn { padding-right: 2px; } }
.global-search-kbd { background: var(--app-panel); color: var(--app-muted); border: 1px solid var(--app-border-strong); }
.qa-btn {
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--app-accent); color: var(--app-accent-text); border-radius: var(--app-radius-control);
}
.qa-btn:hover, .qa-btn:focus-visible, details[open] > .qa-btn { background: var(--app-accent-hover); color: var(--app-accent-text); filter: none; }
.account-menu-name { font-weight: 600; color: var(--app-text); }
.account-menu-sub { color: var(--app-muted); }
.topstack { background: var(--app-panel); }
.jump-box-dialog, .tour-tip { box-shadow: var(--app-shadow-pop); }
.jump-item:hover, .jump-item.is-active { background: var(--app-hover); border-left-color: var(--app-accent); }

/* The top bar's menus (the + menu, the bell, the account menu): the
   app-menu part. A summary is a button, not a disclosure triangle. On a
   phone the open list spans the screen under the bar, so a menu at the
   right never runs off the left edge. */
.navbar-menu > summary { list-style: none; }
.navbar-menu > summary::-webkit-details-marker { display: none; }
.navbar-menu .app-menu-list { z-index: 1040; max-height: calc(100dvh - var(--shell-top, 60px) - 16px); overflow-y: auto; }
/* A closed menu's list takes no room. Chromium still lays out the hidden
   contents of a closed <details>; on a phone the list is position: fixed
   inside that hidden box, so its rows spilled past the screen's right edge
   and the page scrolled sideways (83px on Timesheets at 390). */
.navbar-menu:not([open]) > .app-menu-list { display: none; }
@media (max-width: 575.98px) {
  .navbar-menu .app-menu-list {
    position: fixed; top: calc(var(--shell-top, 60px) - 4px); left: 8px; right: 8px;
    width: auto; min-width: 0; max-width: none;
  }
}
.dark-mode-toggle { display: inline-flex; align-items: center; justify-content: center; position: relative; color: var(--app-muted); }

/* The bell: a red count on the button, the list in the menu. */
.notif-badge {
  position: absolute; top: 0; left: 100%; transform: translate(-50%, -50%);
  min-width: 18px; padding: 1px 5px; border-radius: 999px;
  background: var(--app-bad); color: var(--app-panel);
  font-size: 0.6rem; font-weight: 700; line-height: 1.4; text-align: center;
}
.notif-badge[hidden] { display: none; }
.notif-menu .notif-list-box { width: 340px; max-height: 420px; overflow-y: auto; padding: 0; }
@media (max-width: 575.98px) { .notif-menu .notif-list-box { width: auto; } }
.notif-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 14px; border-bottom: 1px solid var(--app-border); font-size: 13px;
}
.notif-mark-all {
  background: none; border: 0; padding: 0; font: inherit; font-size: 13px;
  color: var(--app-accent-ink); cursor: pointer;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-empty { padding: 14px; font-size: 13px; color: var(--app-muted); }
.notif-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 14px;
  border-bottom: 1px solid var(--app-border); color: var(--app-text); text-decoration: none;
  font-size: 13px; white-space: normal;
}
.notif-item:hover { background: var(--app-hover); color: var(--app-text); text-decoration: none; }
.notif-item > i.bi { color: var(--app-muted); margin-top: 2px; }
.notif-unread { font-weight: 600; }
.notif-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.notif-when { font-weight: 400; color: var(--app-muted); }

/* ── Dialogs the chrome opens: keyboard shortcuts and quick add ──────── */
.shortcut-group + .shortcut-group { margin-top: 4px; }
.shortcut-group .app-menu-label { padding-left: 0; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.shortcut-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; }
.qa-body { display: flex; flex-direction: column; gap: 12px; }

/* ── Hub rail and the nav rows ───────────────────────────────────────
   The side ground, a line on its right. The current hub sits on the
   soft accent in the accent ink. */
.rail.hubs { background: var(--app-side-bg); border-right: 1px solid var(--app-border); }
.rail-btn { color: var(--app-muted); border-radius: 8px; }
.rail-btn small { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 10.5px; }
.rail-btn:hover { background: var(--app-hover); color: var(--app-text); }
.rail-btn.active { background: var(--app-accent-soft); color: var(--app-accent-ink); }
.rail-btn.active small { font-weight: 600; }
.rail-btn.active::before { background: var(--app-accent); }
.nav-section-header { color: var(--app-muted); letter-spacing: .06em; font-size: 11px; font-weight: 500; }
.nav-item-link { color: var(--app-text); font-size: 14px; }
.nav-item-link i:first-child { color: var(--app-muted); }
.nav-item-link:hover { background: var(--app-hover); color: var(--app-text); }
.nav-item-link.active { background: var(--app-accent-soft); color: var(--app-accent-ink); font-weight: 600; }
.nav-item-link.active i:first-child { color: var(--app-accent-ink); }
.pin-toggle, .pin-reset { color: var(--app-muted); }
.pin-toggle:hover, .pin-toggle .bi-star-fill { color: var(--app-accent-ink); }
.nav-drawer .drawer-hub.current > summary i.bi { color: var(--app-accent-ink); }
.navshell.app-drawer { background: var(--app-side-bg); }
/* A count on a menu row (Accounting's Review queue). */
.nav-badge { font-size: 0.6rem; margin-left: 4px; padding: 0 6px; }

/* The client's nav: the same side ground and current-item look. */
.client-nav { background: var(--app-side-bg); font-family: var(--app-font); }
.client-nav .cn-app, .client-nav .cn-item { border-radius: 6px; font-size: 14px; font-weight: 400; }
.client-nav .cn-app:hover, .client-nav .cn-item:hover { color: var(--app-text); }
.client-nav .cn-app.on { box-shadow: none; font-weight: 600; }
.client-nav .cn-item.on { color: var(--app-accent-ink); }
.client-nav .cn-item.on::before { background: var(--app-accent); }
.client-nav .cn-cnt { background: var(--app-accent); color: var(--app-accent-text); font-family: var(--app-font); font-weight: 600; }

/* ── Hub bar: the hub's own tabs, as underline tabs ──────────────── */
.hubbar { background: var(--app-panel); border-bottom: 1px solid var(--app-border); margin-bottom: var(--hubbar-gap); }
.hubbar .hname { font-weight: 600; font-size: 15px; color: var(--app-text); border-bottom-width: 2px; }
.hubbar .hname i, .hubbar-switcher .ht-link i, .pinbtn i { color: var(--app-muted); }
.hubbar a.hname.on { border-bottom-color: var(--app-accent); }
.hubnav .ht-link { color: var(--app-muted); font-weight: 400; font-size: 14px; border-bottom-width: 2px; }
.hubnav .ht-link:hover, .hubnav .ht-link:focus-visible { color: var(--app-text); }
.hubnav .ht.on > .ht-link { color: var(--app-accent-ink); border-bottom-color: var(--app-accent); font-weight: 600; }
.hubbar-switcher .ht-link { color: var(--app-text); font-weight: 600; }
.pinbtn { background: var(--app-panel); color: var(--app-muted); border: 1px solid var(--app-border-strong); font-weight: 500; font-size: 13px; }
.pinbtn:hover, .pinbtn:focus-visible, details[open] > .pinbtn { color: var(--app-text); border-color: var(--app-border-input); }
/* A menu's button in the hub bar is a tab, not a disclosure triangle. */
.hubbar .app-menu > summary { list-style: none; }
.hubbar .app-menu > summary::-webkit-details-marker { display: none; }
.hubbar .app-menu-list { z-index: 1025; }
@media (max-width: 575.98px) { .content-area { --hubbar-gap: 1rem; } }

/* ── The help page's small type (moved from bridge.css with Bootstrap,
   step 8): the contents' group labels in the accent ink, and the mono
   uppercase section labels of the help and guide pages. ──────────────── */
body .help-toc .toc-group-label { color: var(--app-accent-ink); }
.section-label { font-family: var(--app-font); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--app-muted); font-weight: 500; }
