/* ══════════════════════════════════════════════════════════════════════════
   GX Theme — the shared design language for every Green Cross app.
   Source of truth. Extracted from Leaderboard (the most refined app) + GX Core.
   Apps import this once; nothing here is app-specific. Store colors are NOT here —
   they are data from GX Core (?action=stores) so they can never drift again.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Canvas & surfaces (dark, green-tinted) ── */
  --gx-bg:            #0a0e0d;
  --gx-surface:       #121715;
  --gx-surface-2:     #161c1a;
  --gx-surface-3:     #1a221f;
  --gx-surface-dashed:#0f1412;

  /* ── Borders ── */
  --gx-border:        #232a27;
  --gx-border-strong: #2e3733;

  /* ── Text ── */
  --gx-text:          #e6ece9;
  --gx-text-dim:      #8a958f;
  --gx-text-mute:     #5e6864;

  /* ── Brand accent (GreenCross green) ── */
  --gx-green:         #4ade80;
  --gx-green-bright:  #5ee68f;
  --gx-green-dim:     #2f8a52;
  --gx-green-ink:     #06210f;   /* text on a green fill */
  --gx-green-soft:    rgba(74,222,128,.10);
  --gx-glow:          rgba(74,222,128,.07);   /* ambient page glow behind the login card */
  --gx-green-hair:    rgba(74,222,128,.03);

  /* ── Gold (highlights: #1 rank, superadmin, "special") ── */
  --gx-gold:          #d4a847;
  --gx-gold-line:     rgba(212,168,71,.6);
  --gx-gold-soft:     rgba(212,168,71,.07);

  /* ── Status / semantic (reserved — never used for store colors) ── */
  --gx-red:           #ef4444;
  --gx-red-soft:      rgba(239,68,68,.10);
  --gx-amber:         #eab308;
  --gx-yellow:        #facc15;
  --gx-orange:        #f97316;
  --gx-blue:          #60a5fa;
  --gx-purple:        #a78bfa;
  --gx-pink:          #f472b6;

  /* ── Type ── */
  --gx-font: -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,sans-serif;

  /* ── Radii ── */
  --gx-radius-sm:   4px;
  --gx-radius:      6px;
  --gx-radius-md:   8px;
  --gx-radius-lg:   10px;
  --gx-radius-xl:   12px;
  --gx-radius-pill: 999px;

  /* ── Spacing ── */
  --gx-gap-xs: 4px; --gx-gap-sm: 6px; --gx-gap: 8px; --gx-gap-md: 10px;
  --gx-gap-lg: 14px; --gx-gap-xl: 18px; --gx-gap-2xl: 24px;

  /* ── Elevation ── */
  --gx-shadow:    0 12px 32px rgba(0,0,0,.5);
  --gx-shadow-lg: 0 28px 70px rgba(0,0,0,.5);
}

/* ── Base ── */
.gx-app {
  /* Tells the browser this surface is dark, so NATIVE control chrome follows: autofill backgrounds,
     select arrows, date pickers, inner scrollbars, caret. Without it those render in the browser's
     light scheme on top of dark CSS -- which is why an autofilled login box came out white. */
  color-scheme: dark;
  background: var(--gx-bg);
  color: var(--gx-text);
  font-family: var(--gx-font);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Brand wordmark ── */
.gx-wordmark { font-weight: 900; font-size: 20px; letter-spacing: .5px; color: var(--gx-text); }
.gx-wordmark .gx-green { color: var(--gx-green); }

/* ── Section header (LABEL / description) ── */
.gx-section-head { display: flex; align-items: baseline; gap: var(--gx-gap-lg); margin: var(--gx-gap-2xl) 0 var(--gx-gap-md); }
.gx-section-head h2 { margin: 0; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gx-text-dim); font-weight: 700; }
.gx-section-head .gx-sep { color: var(--gx-border-strong); }
.gx-section-head .gx-desc { font-size: 11px; color: var(--gx-text-mute); }

/* ── Label (small caps) ── */
.gx-label { font-size: 10px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--gx-text-mute); font-weight: 600; }

/* ── Cards ── */
.gx-card { background: var(--gx-surface); border: 1px solid var(--gx-border); border-radius: var(--gx-radius-lg); }
.gx-card-2 { background: var(--gx-surface-2); border: 1px solid var(--gx-border); border-radius: var(--gx-radius-md); }

/* ── Buttons ── */
.gx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent; color: var(--gx-text-dim);
  border: 1px solid var(--gx-border-strong); border-radius: var(--gx-radius);
  padding: 6px 12px; font-size: 12px; font-family: inherit; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, transform .06s;
}
.gx-btn:hover { color: var(--gx-text); border-color: var(--gx-green); }
.gx-btn:active { transform: scale(.985); }
.gx-btn-green {
  background: var(--gx-green); border: 1px solid var(--gx-green);
  color: var(--gx-green-ink); font-weight: 700;
}
.gx-btn-green:hover { background: var(--gx-green-bright); border-color: var(--gx-green-bright); color: var(--gx-green-ink); }
.gx-btn:disabled { opacity: .55; cursor: default; }

/* ── Inputs ── */
/* box-sizing is SCOPED to the components this file owns, deliberately not a global `* { }` reset:
   five apps load this stylesheet over their own CSS, and flipping box-sizing globally would resize
   layouts none of this file wrote. Inputs default to content-box while buttons default to border-box,
   so `width:100%` made an input 26px wider than the button beside it and pushed it past the card's
   padding -- the two disagreed by exactly the padding plus border. */
.gx-input, .gx-btn, .gx-login-card, .gx-login-submit, .gx-topnav, .gx-topnav-tab, .gx-user-btn,
.gx-user-menu, .gx-user-item { box-sizing: border-box; }

.gx-input {
  color-scheme: dark;            /* also here: some controls render outside a .gx-app subtree */
  width: 100%; background: var(--gx-surface-3);
  border: 1px solid var(--gx-border); border-radius: var(--gx-radius);
  color: var(--gx-text); padding: 10px 12px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.gx-input:focus { border-color: var(--gx-green-dim); box-shadow: 0 0 0 3px var(--gx-green-soft); }
.gx-input::placeholder { color: var(--gx-text-mute); }
/* Chrome paints autofilled inputs with its OWN background and ignores background-color entirely. A
   1000px inset shadow is the only reliable way to reclaim it; the absurd transition delay stops the
   yellow flash on fill. This is why the box looked right empty and white once a password manager
   filled it -- the state we never tested. */
.gx-input:-webkit-autofill,
.gx-input:-webkit-autofill:hover,
.gx-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--gx-surface-3) inset;
  -webkit-text-fill-color: var(--gx-text);
  caret-color: var(--gx-text);
  transition: background-color 9999s ease-in-out 0s;
}

/* ── Pills & badges ── */
.gx-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px;
  border: 1px solid var(--gx-border-strong); color: var(--gx-text-dim);
  background: var(--gx-surface-2); border-radius: var(--gx-radius-pill);
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
}
.gx-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gx-green); box-shadow: 0 0 6px var(--gx-green); }
.gx-badge-super {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--gx-gold); border: 1px solid var(--gx-gold-line); background: var(--gx-gold-soft);
  border-radius: var(--gx-radius-sm); padding: 2px 6px;
}

/* ── Avatar ── */
.gx-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg,#3a5a4a,#1e2a26); color: var(--gx-text);
  font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gx-border-strong); flex: none;
}

@keyframes gx-pulse { 0%,100%{ opacity:1 } 50%{ opacity:.35 } }

/* ── Login card ──────────────────────────────────────────────────────────────────────────────────
   ONE sign-in treatment for every GX app. Lifted from the Command Center, whose login was already
   using these exact values inline (#1a221f = --gx-surface-3, #232a27 = --gx-border, #4ade80 =
   --gx-green, #06210f = --gx-green-ink) -- this only gives them names so every app inherits them.

   Structure is wordmark + ONE uppercase subtitle. No pill, no secondary line: the app's identity is
   the subtitle ("SALES DASHBOARD", "SALES PERFORMANCE", "COMMAND CENTER", "INVENTORY"), nothing else.

     <div class="gx-login">
       <div class="gx-login-card">
         <img class="gx-login-mark" src="…">           (or a .gx-wordmark)
         <div class="gx-login-sub">Sales Dashboard</div>
         <div class="gx-login-art">…</div>             (optional -- Inventory's graphic goes here)
         <form class="gx-login-form">
           <label class="gx-login-field"><span>Username</span><input class="gx-input"></label>
           <label class="gx-login-field"><span>Password</span><input class="gx-input" type="password"></label>
           <button class="gx-btn gx-btn-green gx-login-submit">Sign in</button>
           <div class="gx-login-err">…</div>           (only when there is an error)
         </form>
       </div>
     </div>                                                                                         */
/* The three details that make this card read as finished rather than flat, all measured off the
   Command Center: an ambient green glow thrown from above the card, a 2px gradient hairline across the
   card's top edge, and a 12px radius (not the 10px used elsewhere). Without them the card is just a
   gray box with the right colors in it. */
.gx-login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;
  background:var(--gx-bg) radial-gradient(1100px 560px at 50% -12%,var(--gx-glow),transparent 62%);}
.gx-login-card{position:relative;overflow:hidden;width:100%;max-width:380px;background:var(--gx-surface);
  border:1px solid var(--gx-border);border-radius:var(--gx-radius-xl);padding:30px 28px 28px;
  box-shadow:var(--gx-shadow-lg);}
/* ::before rather than a markup element, so an app adopting .gx-login needs no extra div. */
.gx-login-card::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,transparent,var(--gx-green),transparent);opacity:.75;}
/* Logo is CENTERED, like Leaderboard and Sales. The shared asset is gx-theme/gx-logo.png, so every
   app shows the same mark rather than its own inlined base64 copy. */
.gx-login-head{text-align:center;margin:0 0 26px;}
/* The mark spans the card's content width, so it lines up exactly with the inputs and the button
   beneath it. Width-driven rather than height-driven: the card is the constant, and the logo's own
   8.22:1 aspect decides the height (322px wide -> ~39px tall at the current card size). */
.gx-login-mark{display:block;width:100%;height:auto;margin:0 auto 6px;}
.gx-login-sub{font-size:12px;letter-spacing:1.4px;text-transform:uppercase;color:var(--gx-text-mute);
  font-weight:700;margin:0;}
.gx-login-art{margin:0 0 22px;border-radius:var(--gx-radius-md);overflow:hidden;}
.gx-login-art img{display:block;width:100%;height:auto;}
/* Artwork ABOVE the card rather than inside it: Inventory's portrait is the app's personality and
   should read as its own thing, with the standard sign-in card beneath. Matched to the card's width so
   the two align as one column. */
.gx-login-stack{display:flex;flex-direction:column;align-items:center;gap:18px;width:100%;max-width:380px;}
.gx-login-stack .gx-login-card{max-width:none;}
.gx-login-above{display:block;width:100%;height:auto;border-radius:var(--gx-radius-xl);
  box-shadow:var(--gx-shadow-lg);}
.gx-login-form{display:grid;gap:14px;}
.gx-login-field{display:grid;gap:6px;}
.gx-login-field>span{font-size:10px;letter-spacing:1.1px;text-transform:uppercase;color:var(--gx-text-mute);font-weight:600;}
.gx-login-submit{width:100%;justify-content:center;padding:11px 14px;font-size:13.5px;font-weight:700;}
.gx-login-err{font-size:12px;color:var(--gx-red);min-height:1em;}

/* ── Top nav ─────────────────────────────────────────────────────────────────────────────────────
   One app header for the whole suite. Modeled on the two apps that already got their piece right:
   TABS are Inventory's treatment (inset box-shadow underline, so switching tabs shifts no layout, and
   the row scrolls horizontally with the scrollbar hidden), and the RIGHT CLUSTER is Leaderboard's
   clock. Settings / version / logout are NOT separate header items -- they live inside the user menu,
   so the bar stays legible as apps grow.

   Sales keeps its own mobile bottom bar; this is the desktop/top chrome only.

     <header class="gx-topnav">
       <div class="gx-topnav-brand"><img src="…"><span class="gx-topnav-sub">Crew</span></div>
       <nav class="gx-topnav-tabs">
         <button class="gx-topnav-tab is-active">Roster</button>
         <button class="gx-topnav-tab">Review</button>
       </nav>
       <div class="gx-topnav-right">
         <div class="gx-clock"><div class="gx-clock-time">2:14 PM</div><div class="gx-clock-date">Wed Aug 19</div></div>
         <div class="gx-user">
           <button class="gx-user-btn" aria-haspopup="menu" aria-expanded="false">SK</button>
           <div class="gx-user-menu" role="menu" hidden>
             <div class="gx-user-head">Sky Pinnick<span>Admin</span></div>
             <button class="gx-user-item" data-gx-action="settings">Settings</button>
             <button class="gx-user-item" data-gx-action="version">Version <span class="gx-user-ver">v11</span></button>
             <button class="gx-user-item is-danger" data-gx-action="logout">Sign out</button>
           </div>
         </div>
       </div>
     </header>
   gx-topnav.js wires the menu (click outside / Escape to close) and emits gx-topnav:action.          */
.gx-topnav{display:flex;align-items:center;gap:14px;padding:0 20px;background:var(--gx-surface);
  border-bottom:1px solid var(--gx-border);min-height:52px;}
.gx-topnav-brand{display:flex;align-items:center;gap:10px;flex-shrink:0;font-weight:800;font-size:14px;color:var(--gx-text);}
.gx-topnav-logo{height:22px;width:auto;display:block;flex-shrink:0;}   /* gx-logo.png, like Leaderboard */
.gx-topnav-sub{color:var(--gx-text-mute);font-size:11px;text-transform:uppercase;letter-spacing:1.1px;font-weight:700;}

/* Inventory's tab treatment, verbatim in behavior: underline via inset shadow (no layout shift),
   flex-shrink:0 so labels never squash, horizontal scroll with the scrollbar hidden. */
.gx-topnav-tabs{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;min-width:0;}
/* A vertical rule between the app name and the first tab (Sky, 2026-09-07).
   GUARDED BY THE ADJACENT SIBLING, so no app needs an HTML change and none gets a dangling rule: it
   draws only where tabs actually follow the brand. Price Cards has a brand and NO tabs -- its next
   sibling is .topbar-meta -- so it correctly gets nothing. Verified in the browser by building that
   exact markup and reading the computed background back: `none`.
   DRAWN AS A BACKGROUND, NOT A ::before INSIDE THE BOX: .gx-topnav-tabs scrolls horizontally, and a
   pseudo-element inside it would slide out of view with the tabs. A background is painted against the
   element (background-attachment defaults to `scroll`, meaning fixed to the box, not to its scrolled
   content) -- measured by scrolling the tab strip and confirming the rule did not move.
   18px tall rather than full height: the header is 52px and a full-height divider reads as a panel
   edge, which is a heavier statement than "these are two groups".
   COLORED --gx-text-mute, NOT --gx-border-strong. The border token is what dividers use elsewhere,
   and it is invisible here: measured against the topnav's own darker surface (#121715) it lands at
   1.48:1, so the rule shipped correct and unseeable — Sky looked at the live page and found nothing
   there. --gx-text-mute is 3.14:1, clearing the 3:1 floor for non-text, and is the same color as
   .gx-topnav-sub beside it, so the divider reads at the weight of the label rather than competing
   with the active tab. Checking a computed style proves a rule APPLIED; it does not prove anyone can
   see it, and only looking does.
   padding-left is 4px, not 14: .gx-topnav-tab carries 12px of its own, so 14 here put the rule 14px
   from the app name and 26px from the first tab's TEXT -- measured, and visibly off-centre. 4 + 12
   lands the text at 16px against 14px on the name side.

   ONLY ON A WIDE VIEWPORT, and this is the real constraint rather than a preference. .gx-topnav is
   `flex-wrap: wrap`: below its wrap point the tab strip drops to its own row, where a rule at the
   far left separates nothing and reads as a stray tick. There is no CSS way to ask "did my previous
   sibling stay on my line", so the wrap point is approximated by width. 1000px is chosen to clear the
   phone and tablet cases outright; an app with MANY tabs (Inventory has ten) can still wrap in a
   narrow desktop window and show the rule leading its row. That is the known cost of the
   approximation, and it is a stray hairline rather than anything broken. */
@media (min-width: 1000px) {
  .gx-topnav-brand + .gx-topnav-tabs{padding-left:4px;
    background:linear-gradient(var(--gx-text-mute),var(--gx-text-mute)) left center/1px 18px no-repeat;}
}
.gx-topnav-tabs::-webkit-scrollbar{display:none;}
/* Sentence case, following Inventory's tabs. Weight 700, not the 500 an isolated mock suggested:
   every app sets -webkit-font-smoothing:antialiased via .gx-app, which renders text visibly lighter
   than an unstyled page, so a weight that looks right in a mock reads thin in an actual app. */
.gx-topnav-tab{flex-shrink:0;height:40px;padding:6px 12px;border:none;background:none;border-radius:0;
  color:var(--gx-text-mute);font:900 12px/1 var(--gx-font);cursor:pointer;
  transition:color .15s,box-shadow .15s;}
.gx-topnav-tab:hover:not(.is-active){color:var(--gx-text);}
.gx-topnav-tab.is-active{color:var(--gx-text);box-shadow:inset 0 -2px 0 var(--gx-green);}

.gx-topnav-right{margin-left:auto;display:flex;align-items:center;gap:12px;flex-shrink:0;}
.gx-clock{text-align:right;line-height:1.2;}
.gx-clock-time{font-weight:700;font-size:14px;color:var(--gx-text);}
.gx-clock-date{color:var(--gx-text-mute);font-size:10px;letter-spacing:.8px;text-transform:uppercase;}

/* User menu — the one place settings, version and sign-out live. */
.gx-user{position:relative;}
/* Avatar + name pill, lifted from Leaderboard's .user-chip / .uc-avatar. .gx-user-ava takes either
   initials as text or an <img> (Crew has avatar_config on the employee roster). */
.gx-user-btn{display:inline-flex;align-items:center;gap:8px;padding:4px 12px 4px 4px;
  border-radius:var(--gx-radius-pill);border:1px solid var(--gx-border);background:var(--gx-surface);
  color:var(--gx-text);font:500 12px/1 var(--gx-font);cursor:pointer;}
.gx-user-btn:hover{border-color:var(--gx-green-dim);}
.gx-user-ava{width:24px;height:24px;border-radius:50%;flex-shrink:0;overflow:hidden;
  background:linear-gradient(135deg,var(--gx-green),var(--gx-green-dim));color:var(--gx-green-ink);
  font-weight:800;font-size:10px;display:flex;align-items:center;justify-content:center;}
.gx-user-ava{position:relative;}   /* the GC hat overlay is absolutely positioned inside it */
.gx-user-ava img{width:100%;height:100%;object-fit:cover;display:block;}
/* GC hat: _gchat renders shortFlat from DiceBear and this SVG sits over the top, so hair shows under
   the brim. Same treatment Crew already uses for its roster puck. */
.gx-ava-hat{position:absolute;inset:0;pointer-events:none;}
.gx-ava-hat svg{width:100%;height:100%;display:block;}
.gx-user-name{white-space:nowrap;max-width:14ch;overflow:hidden;text-overflow:ellipsis;}
.gx-user-menu{position:absolute;top:calc(100% + 8px);right:0;min-width:190px;z-index:60;
  background:var(--gx-surface);border:1px solid var(--gx-border-strong);border-radius:var(--gx-radius-md);
  box-shadow:var(--gx-shadow-lg);padding:6px;}
.gx-user-menu[hidden]{display:none;}
.gx-user-head{padding:8px 10px 10px;border-bottom:1px solid var(--gx-border);margin-bottom:6px;
  font-size:12.5px;font-weight:700;color:var(--gx-text);display:grid;gap:2px;}
.gx-user-head span{font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--gx-text-mute);}
.gx-user-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;
  padding:8px 10px;border:0;background:none;border-radius:var(--gx-radius);cursor:pointer;
  color:var(--gx-text-dim);font:600 12.5px/1 var(--gx-font);text-align:left;}
.gx-user-item:hover{background:var(--gx-surface-2);color:var(--gx-text);}
.gx-user-item.is-danger:hover{color:var(--gx-red);}
.gx-user-ver{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;font-weight:800;color:var(--gx-green);}
/* The version row OPENS the history (gx-changelog.js), so it has to read as a live control rather
   than the dead label it was in three apps. The underline is the affordance; without it the row
   looks identical to the static info rows above it. */
.gx-user-item[data-gx-action="version"] .gx-user-ver{border-bottom:1px dotted var(--gx-green-dim);}
.gx-user-item[data-gx-action="version"]:hover .gx-user-ver{border-bottom-color:var(--gx-green);}

/* ── Version-history / What's New popup (gx-changelog.js) ─────────────────────────────────────────
   Promoted out of Leaderboard, which had the only complete implementation. Inventory, Sales and the
   Command Center each had their own; Price Cards, SPIFF and Crew had none, so their Version row was
   a dead label. One modal now, styled here, so a fix reaches all seven.

   THE SHARED STACKING ORDER, lowest to highest — check it before adding a layer:
     60    .gx-user-menu     the user tray, anchored under its chip
     200   .gx-bug-fab       floating report button
     300   .gx-bug-overlay   bug form
     1000  .gx-cl-overlay    this popup — above the bug form, since you can open it from the tray
     9999  .gx-login         the sign-in gate, which must cover EVERYTHING
   The login gate winning is deliberate, not an accident of ordering: a modal that paints over a
   sign-in screen is showing app data to someone who has not signed in. The consequence to know is
   that opening this popup before login renders it INVISIBLY behind the gate rather than failing
   loudly — so gate any auto-popup on the session, which is what GXChangelog's `whatsNew` option is
   for. */
.gx-cl-overlay{position:fixed;inset:0;background:rgba(0,0,0,.62);display:none;align-items:center;
  justify-content:center;z-index:1000;padding:20px;}
.gx-cl-overlay.gx-cl-open{display:flex;}
.gx-cl-modal{background:var(--gx-surface-2);border:1px solid var(--gx-border);border-radius:var(--gx-radius-xl);
  width:560px;max-width:100%;max-height:82vh;display:flex;flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,.5);font-family:var(--gx-font);}
.gx-cl-header{display:flex;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid var(--gx-border);}
.gx-cl-icon img{width:26px;height:26px;object-fit:contain;display:block;}
.gx-cl-icon{font-size:26px;line-height:1;flex:none;}
.gx-cl-title{font-size:17px;font-weight:800;color:var(--gx-text);}
.gx-cl-sub{font-size:12px;color:var(--gx-text-mute);margin-top:2px;}
.gx-cl-x{margin-left:auto;background:none;border:none;color:var(--gx-text-mute);font-size:16px;
  cursor:pointer;padding:4px 8px;border-radius:var(--gx-radius);line-height:1;flex:none;}
.gx-cl-x:hover{color:var(--gx-text);background:var(--gx-bg);}
.gx-cl-body{padding:6px 20px;overflow-y:auto;}
.gx-cl-empty{color:var(--gx-text-mute);padding:22px 2px;font-size:13px;line-height:1.5;text-align:center;}
.gx-cl-ver{padding:14px 0;border-bottom:1px solid var(--gx-border);}
.gx-cl-ver:last-child{border-bottom:none;}
.gx-cl-ver-head{display:flex;align-items:baseline;gap:10px;margin-bottom:8px;}
.gx-cl-ver-num{font-weight:800;color:var(--gx-green);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:13px;font-variant-numeric:tabular-nums;}
.gx-cl-ver-date{font-size:11px;color:var(--gx-text-mute);}
/* No opacity on top of --gx-text-mute: mute is ALREADY the dimmest text token, and .7 on top of it
   rendered the sha effectively unreadable against --gx-surface-2. Secondary means quieter, not
   illegible — if it is not worth reading it is not worth showing. */
.gx-cl-sha{font-size:10px;color:var(--gx-text-mute);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  margin-left:auto;}
.gx-cl-items{margin:0;padding-left:18px;}
.gx-cl-items li{font-size:13px;color:var(--gx-text-dim);line-height:1.5;margin-bottom:5px;}
.gx-cl-nonote{font-size:12px;color:var(--gx-text-mute);font-style:italic;padding-left:2px;}
.gx-cl-footer{padding:14px 20px;border-top:1px solid var(--gx-border);display:flex;align-items:center;
  justify-content:flex-end;gap:10px;}
.gx-cl-toggle{margin-right:auto;background:none;border:1px solid var(--gx-border-strong);color:var(--gx-text-dim);
  border-radius:var(--gx-radius-md);padding:7px 12px;font:600 12px/1 var(--gx-font);cursor:pointer;}
.gx-cl-toggle:hover{color:var(--gx-text);border-color:var(--gx-green-dim);}
.gx-cl-ok{background:var(--gx-green);color:var(--gx-green-ink);border:none;border-radius:var(--gx-radius-md);
  padding:8px 18px;font:700 13px/1 var(--gx-font);cursor:pointer;}
.gx-cl-ok:hover{background:var(--gx-green-bright);}

@media (max-width:720px){
  .gx-topnav{flex-wrap:wrap;padding:0 12px;gap:8px;}
  .gx-topnav-tabs{order:3;width:calc(100% + 24px);margin:0 -12px;padding:0 8px;border-top:1px solid var(--gx-border);}
}

/* ── Sub-app action row + embedded (nested) mode ──────────────────────────────────────────────────
   The pattern for an app that runs BOTH standalone and nested inside a host dashboard (Price Cards
   and SPIFF inside Inventory, embedded by iframe at their live URLs):

     standalone   .gx-topnav  +  .gx-subnav
     nested       .gx-subnav only -- the host already owns the top-level chrome

   .gx-subnav is the sub-app's own controls, which are its identity in either context. It WRAPS
   rather than shrinking: these are primary actions, and a row that overflows takes the whole page
   sideways with it (which is exactly what Price Cards did when its buttons sat in .gx-topnav-right).

   Controls that belong to only one context are marked declaratively, so no app branches in JS:
     data-gx-embed-only        Settings, which lives in the user tray when standalone but has no
                               tray to live in when nested -- the host owns that
     data-gx-standalone-only                                                                        */
.gx-subnav{display:flex;flex-wrap:wrap;align-items:center;gap:9px;padding:10px 20px;
  background:var(--gx-surface);border-bottom:1px solid var(--gx-border);}
@media (max-width:720px){ .gx-subnav{padding:10px 12px;} }

/* Nested: strip the top-level chrome. But an app whose OWN tabs live in the bar (SPIFF) would lose its
   navigation with it, so that case keeps the bar and drops only the parts the host already provides --
   brand, clock, user chip. Mark such a header data-gx-keep-nested. An app with no tabs (Price Cards)
   needs no marker and the bar goes entirely. */
html.gx-embedded .gx-topnav:not([data-gx-keep-nested]){display:none;}
html.gx-embedded .gx-topnav[data-gx-keep-nested] .gx-topnav-brand,
html.gx-embedded .gx-topnav[data-gx-keep-nested] .gx-topnav-right{display:none;}
/* Nested, the sub-app's row must read as a SECOND-level nav under the host's, not as a peer bar that
   happens to sit lower. Recessed surface, shorter, lighter tabs -- subordinate at a glance. */
html.gx-embedded .gx-topnav[data-gx-keep-nested],
html.gx-embedded .gx-subnav{background:var(--gx-surface-2);min-height:42px;padding-top:0;padding-bottom:0;}
html.gx-embedded .gx-topnav-tab{height:34px;font-size:11.5px;}
html.gx-embedded .gx-topnav-tab.is-active{box-shadow:inset 0 -2px 0 var(--gx-green);}
html.gx-embedded [data-gx-standalone-only]{display:none !important;}
html:not(.gx-embedded) [data-gx-embed-only]{display:none !important;}
/* Nested, the host supplies the page background and its own padding around the frame. */
html.gx-embedded body{background:transparent;}

/* ── Bug report ───────────────────────────────────────────────────────────────────────────────────
   Paired with gx-bugreport.js, which builds all of this markup — no app hand-writes it.

   These rules replace 21 near-identical local .bug-* rules in EACH of inventory, leaderboard and
   sales (63 in all), plus Price Cards' window.prompt(), which had no styling because it had no form.
   The class prefix is .gx-bug-, not .bug-, on purpose: an app can load this and delete its local
   block in either order without the two fighting over a shared name mid-migration.

   Colors are tokens only. The local copies hardcoded --amber/--red/--card from each app's own
   variable set, which is exactly how the same modal ended up three slightly different colors. */
.gx-bug-fab{position:fixed;bottom:20px;right:20px;z-index:200;width:44px;height:44px;border-radius:50%;
  background:var(--gx-surface);border:1px solid var(--gx-border);color:var(--gx-text-dim);
  font-size:19px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:border-color .15s,color .15s;}
.gx-bug-fab:hover{border-color:var(--gx-green);color:var(--gx-green);}
/* The host app owns the corner when nested — two floating bug buttons stacked on one screen is worse
   than one, and the parent's reporter files to the same board with the right tab discriminator. */
html.gx-embedded .gx-bug-fab{display:none;}

.gx-bug-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:300;
  align-items:center;justify-content:center;padding:16px;}
.gx-bug-overlay.open{display:flex;}
.gx-bug-modal{background:var(--gx-surface);border:1px solid var(--gx-border);border-radius:var(--gx-radius-md);
  width:100%;max-width:440px;max-height:90vh;overflow-y:auto;padding:20px;
  display:flex;flex-direction:column;gap:14px;font-family:var(--gx-font);}
.gx-bug-hdr{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:600;
  color:var(--gx-text);}
.gx-bug-close{background:none;border:none;color:var(--gx-text-mute);cursor:pointer;font-size:15px;line-height:1;padding:2px 4px;}
.gx-bug-close:hover{color:var(--gx-text);}
.gx-bug-label{font-size:11px;color:var(--gx-text-mute);text-transform:uppercase;letter-spacing:.5px;margin-bottom:5px;}
.gx-bug-opt{text-transform:none;letter-spacing:0;color:var(--gx-text-mute);font-weight:400;}
.gx-bug-input,.gx-bug-textarea{width:100%;background:var(--gx-bg);border:1px solid var(--gx-border);
  border-radius:var(--gx-radius);color:var(--gx-text);padding:8px 10px;font-size:13px;
  box-sizing:border-box;font-family:inherit;}
.gx-bug-input:focus,.gx-bug-textarea:focus{outline:none;border-color:var(--gx-green);}
.gx-bug-textarea{resize:vertical;min-height:80px;}
.gx-bug-pri{display:flex;gap:8px;}
.gx-bug-pri-btn{flex:1;padding:9px 0;border-radius:var(--gx-radius);border:1px solid var(--gx-border);
  background:none;color:var(--gx-text-mute);font-size:12px;font-weight:600;cursor:pointer;
  font-family:inherit;transition:border-color .15s,color .15s,background .15s;}
.gx-bug-pri-btn:hover{color:var(--gx-text-dim);}
.gx-bug-pri-btn.sel-low{border-color:var(--gx-green-dim);color:var(--gx-green);background:var(--gx-green-soft);}
.gx-bug-pri-btn.sel-normal{border-color:var(--gx-gold-line);color:var(--gx-gold);background:var(--gx-gold-soft);}
.gx-bug-pri-btn.sel-high{border-color:var(--gx-red);color:var(--gx-red);background:var(--gx-red-soft);}

/* The snapshot is disclosed, not hidden: it carries the URL and browser string, so the person filing
   can read exactly what they are about to send before they send it. */
.gx-bug-ctx{border:1px solid var(--gx-border);border-radius:var(--gx-radius);background:var(--gx-surface-2);}
.gx-bug-ctx summary{cursor:pointer;padding:8px 10px;font-size:11.5px;color:var(--gx-text-mute);user-select:none;}
.gx-bug-ctx summary:hover{color:var(--gx-text-dim);}
.gx-bug-ctx pre{margin:0;padding:0 10px 10px;font-size:10.5px;line-height:1.5;color:var(--gx-text-mute);
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;word-break:break-all;
  max-height:180px;overflow-y:auto;}

.gx-bug-submit{padding:10px;border-radius:var(--gx-radius);border:1px solid var(--gx-green);
  background:var(--gx-green);color:var(--gx-green-ink);font-size:13px;font-weight:700;cursor:pointer;
  font-family:inherit;transition:opacity .15s;}
.gx-bug-submit:hover{opacity:.9;}
.gx-bug-submit:disabled{opacity:.4;cursor:default;}
.gx-bug-status{font-size:12px;color:var(--gx-red);min-height:15px;text-align:center;}
.gx-bug-success{text-align:center;padding:18px 0;font-size:13.5px;color:var(--gx-green);font-weight:600;}

/* ── Bug report: the screenshot field ──────────────────────────────────────────────────────────────
   Added 2026-08-26 with the paste-a-screenshot pathway. The drop zone is deliberately shallow when
   empty (a bug form is already tall and this is optional) and grows only once an image is in it. */
.gx-bug-shot{position:relative;display:flex;align-items:center;justify-content:center;min-height:54px;
  padding:10px;border:1px dashed var(--gx-border-strong);border-radius:8px;background:var(--gx-bg);
  color:var(--gx-text-mute);font-size:12px;text-align:center;cursor:default;}
.gx-bug-shot.is-over{border-color:var(--gx-green);background:var(--gx-green-soft);}
.gx-bug-shot:focus-visible{outline:2px solid var(--gx-green-dim);outline-offset:2px;}
.gx-bug-shot img{max-width:100%;max-height:190px;border-radius:6px;display:block;}
.gx-bug-shot-pick{background:none;border:0;color:var(--gx-green);cursor:pointer;font-size:12px;
  padding:0;text-decoration:underline;}
.gx-bug-shot-clear{position:absolute;top:6px;right:6px;width:22px;height:22px;line-height:1;
  border-radius:50%;border:1px solid var(--gx-border-strong);background:var(--gx-surface-2);
  color:var(--gx-text);cursor:pointer;font-size:11px;}
.gx-bug-shot-clear:hover{border-color:var(--gx-green-dim);color:var(--gx-green);}

/* ── Update toast (gx-updatecheck.js) ──────────────────────────────────────────────────────────────
   Ported from Sales 2026-08-27 with its layout intact, re-expressed in --gx-* tokens so it inherits
   the shared palette instead of Sales' local --card-2/--green/--muted.

   Bottom-anchored and full-width on a phone, because that is where a thumb is and the toast must not
   cover content being read. It sits ABOVE a bottom bar on mobile (the 118px offset is Sales' bottom
   nav plus the safe-area inset); an app without one simply has a toast a little higher than it needs
   to be, which is the harmless direction to be wrong in. On a real pointer it becomes a corner card. */
.gx-upd{position:fixed;left:12px;right:12px;bottom:calc(118px + env(safe-area-inset-bottom));z-index:400;
  display:none;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;
  background:var(--gx-surface-2);border:1px solid var(--gx-green-dim);
  box-shadow:0 6px 20px rgba(0,0,0,.4);font-size:13px;color:var(--gx-text);}
.gx-upd.show{display:flex;}
.gx-upd-txt{flex:1;min-width:0;}
.gx-upd-go{flex-shrink:0;border:none;border-radius:7px;padding:7px 12px;font-family:inherit;
  font-size:13px;font-weight:600;background:var(--gx-green);color:var(--gx-green-ink);cursor:pointer;}
.gx-upd-x{flex-shrink:0;border:none;background:none;color:var(--gx-text-mute);font-size:16px;
  cursor:pointer;padding:0 2px;}
.gx-upd-x:hover{color:var(--gx-text);}
@media(min-width:768px) and (hover:hover) and (pointer:fine){
  .gx-upd{left:auto;right:20px;bottom:20px;max-width:380px;}
}
