/* Portal shell — login screen, sidebar nav, iframe stage. Portal Phase 1 (2026-08-06).
   Loaded after tokens.css + shared.css. Deliberately its own small vocabulary (.shell-*)
   rather than reusing omd.css/transaction.css's component classes — this page has a genuinely
   different layout (sidebar + iframe stage) from either module, so there's nothing real
   to share beyond the tokens already shared. */
:root{ --panel-hi: #22262f; }

html, body{ margin:0; padding:0; height:100%; }
body{
  background:var(--bg); color:var(--text); font-family:var(--sans);
  height:100vh; overflow:hidden;
}

/* ---------- login screen ---------- */
#shellGate{ display:flex; align-items:center; justify-content:center; min-height:100vh; }
.shell-gate-card{
  width:100%; max-width:400px; background:var(--panel); border:1px solid var(--line);
  border-radius:14px; padding:36px 32px 30px; box-shadow:0 20px 60px -20px rgba(0,0,0,0.5);
}
.shell-gate-mark{
  width:40px; height:40px; border-radius:10px; margin-bottom:18px;
  background:linear-gradient(135deg, var(--cashier), var(--audit));
  display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-weight:700; font-size:15px; color:#0d1013;
}
.shell-gate-eyebrow{font-family:var(--mono); font-size:11px; color:var(--text-dim); letter-spacing:1.2px; text-transform:uppercase; margin-bottom:6px;}
.shell-gate-card h1{font-size:21px; font-weight:700; margin:0 0 6px;}
.shell-gate-card p.sub{color:var(--text-dim); font-size:13px; line-height:1.55; margin:0 0 24px;}
.shell-gate-error{
  display:none; align-items:flex-start; gap:8px; margin-top:14px; padding:10px 12px;
  background:rgba(229,98,106,0.1); border:1px solid rgba(229,98,106,0.35); border-radius:8px;
  color:#f0a7ac; font-size:12.5px; line-height:1.5;
}
.shell-gate-error.show{ display:flex; }

/* ---------- signed-in shell ---------- */
#shellApp{ display:none; height:100vh; }
#shellApp.show{ display:flex; }

.shell-sidebar{
  width:220px; flex:0 0 auto; background:var(--panel); border-right:1px solid var(--line);
  padding:20px 14px; display:flex; flex-direction:column; height:100vh; box-sizing:border-box;
}
.shell-brand{ font-family:var(--mono); font-size:12px; font-weight:700; letter-spacing:0.5px; color:var(--text); padding:0 8px 18px; }
.shell-brand span{ color:var(--text-dim); font-weight:400; display:block; font-size:10.5px; margin-top:2px; }

.shell-nav{ flex:1 1 auto; overflow-y:auto; }
/* Real <a> links (2026-08-24) so right-click / middle-click / Ctrl-click can open the
   module in a new tab. :link/:visited spelled out explicitly because the browser's UA
   link stylesheet (a:link blue, a:visited purple, specificity 0,1,1) would otherwise
   override the single-class .shell-nav-btn color (0,1,0); text-decoration:none kills the
   UA underline. Hover/active keep their own color (later in source, same specificity,
   and :hover/:active raise specificity to 0,2,0 so they win regardless). */
.shell-nav-btn, .shell-nav-btn:link, .shell-nav-btn:visited{
  text-decoration:none; color:var(--text-dim);
}
.shell-nav-btn{
  width:100%; text-align:left; background:transparent; border:none; border-radius:8px;
  padding:10px 12px; font-family:var(--sans); font-size:13px; cursor:pointer;
  margin-bottom:3px; display:flex; align-items:center; gap:9px; box-sizing:border-box;
}
.shell-nav-btn:hover{ background:var(--panel-hi); color:var(--text); }
.shell-nav-btn.active, .shell-nav-btn.active:visited{ background:var(--panel-hi); color:var(--text); box-shadow:inset 0 0 0 1px var(--region); }
.shell-nav-btn.soon{ cursor:default; color:var(--text-faint); opacity:0.65; }
.shell-nav-btn.soon:hover{ background:transparent; color:var(--text-faint); }

/* ---------- notification badges (Phase 8C Part 2, 2026-08-11) ----------
   Small pill on the Reports/Announcements nav buttons, driven by GET
   /api/notifications/counts (see assets/js/shell/main.js's pollNotificationCounts()).
   --neg chosen over --audit for this one (the task left it a pick-one-be-consistent
   choice) -- reads as the familiar "unread count" red badge; --audit is used instead for
   the Reports list's own unseen-activity dot (modules/reports/reports.css), a different,
   spec-mandated token for a different element, not an inconsistency. Hidden at 0 by the
   inline style on the element itself (see renderNavItems()), not by a CSS rule, so a
   badge with no count never needs an extra class to disappear. */
.shell-nav-badge{
  margin-left:auto; flex-shrink:0; min-width:17px; height:17px; padding:0 5px;
  border-radius:99px; background:var(--neg); color:#fff;
  font-family:var(--mono); font-size:10px; font-weight:700; line-height:17px; text-align:center;
}
.shell-nav-tag{
  margin-left:auto; font-family:var(--mono); font-size:8.5px; text-transform:uppercase; letter-spacing:0.4px;
  color:var(--text-faint); border:1px solid var(--line); border-radius:99px; padding:1px 6px;
}
.shell-nav-sep{ border:none; border-top:1px solid var(--line-soft); margin:12px 4px; }
.shell-nav-label{ font-family:var(--mono); font-size:10px; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.8px; padding:0 12px; margin:4px 0 6px; }

.shell-who{ border-top:1px solid var(--line-soft); padding-top:12px; margin-top:8px; }
.shell-who-row{ display:flex; align-items:center; gap:8px; padding:0 8px; margin-bottom:8px; }
.shell-who-avatar{
  width:26px; height:26px; border-radius:50%; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  font-family:var(--mono); font-size:11px; font-weight:700; color:#0d1013; background:var(--region);
}
.shell-who-meta{ min-width:0; }
.shell-who-name{ font-size:12px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shell-who-role{ font-family:var(--mono); font-size:9.5px; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.4px; }
.shell-signout-btn{
  width:100%; background:transparent; border:1px solid var(--line); color:var(--text-dim); padding:8px 12px;
  border-radius:7px; font-family:var(--sans); font-size:12px; cursor:pointer;
}
.shell-signout-btn:hover{ border-color:var(--neg); color:var(--neg); }

.shell-stage{ flex:1 1 auto; height:100vh; position:relative; overflow:hidden; }
.shell-stage iframe{ width:100%; height:100%; border:none; display:block; }
.shell-placeholder{
  display:flex; align-items:center; justify-content:center; height:100%; text-align:center;
  padding:40px; color:var(--text-dim); font-family:var(--sans);
}
.shell-placeholder h1{ color:var(--text); font-size:19px; margin:0 0 8px; }
.shell-placeholder p{ font-size:13.5px; line-height:1.6; max-width:420px; }
.shell-placeholder .tag{
  display:inline-block; margin-bottom:14px; font-family:var(--mono); font-size:10px; text-transform:uppercase;
  letter-spacing:0.6px; color:var(--region); border:1px solid var(--region); border-radius:99px; padding:3px 10px;
}

/* ---------- responsive nav (Phase 7C, 2026-08-07) ----------
   Everything in this block is scoped inside the max-width:860px media query, so above
   that width nothing here applies at all -- .shell-hamburger/.shell-drawer-backdrop stay
   display:none (their default, set just below, outside the query) and .shell-sidebar/
   .shell-stage keep the exact rules already defined above, untouched. This is additive
   only: no existing selector above is edited, and no rule in this block can fire on a
   desktop-width viewport. */
.shell-hamburger{ display:none; }
.shell-drawer-backdrop{ display:none; }

/* Phase 8C Part 2 (2026-08-11): plain dot (no number) on the closed hamburger button
   when any notification count is nonzero, so a collapsed drawer still signals attention
   without opening it. Positioned relative to .shell-hamburger's own `position:fixed`
   (set inside the media query below), so this needs no extra positioning context of its
   own. Hidden by default (no .has-badge class); toggled via JS in
   assets/js/shell/main.js's updateNavBadges(). */
.shell-hamburger-dot{
  display:none; position:absolute; top:4px; right:4px;
  width:8px; height:8px; border-radius:50%; background:var(--neg);
  border:1.5px solid var(--panel);
}
.shell-hamburger.has-badge .shell-hamburger-dot{ display:block; }

@media (max-width: 860px){
  .shell-hamburger{
    display:flex; align-items:center; justify-content:center;
    position:fixed; top:14px; left:14px; z-index:60;
    width:38px; height:38px; border-radius:8px;
    background:var(--panel); border:1px solid var(--line); color:var(--text);
    cursor:pointer; font-size:18px; padding:0;
  }
  .shell-sidebar{
    position:fixed; top:0; left:0; z-index:55; height:100vh;
    transform:translateX(-100%); transition:transform 0.22s ease;
    box-shadow:0 0 40px rgba(0,0,0,0.5);
  }
  #shellApp.drawer-open .shell-sidebar{ transform:translateX(0); }
  .shell-drawer-backdrop{
    display:block; position:fixed; inset:0; background:rgba(10,11,14,0.6); z-index:50;
    opacity:0; pointer-events:none; transition:opacity 0.22s ease;
  }
  #shellApp.drawer-open .shell-drawer-backdrop{ opacity:1; pointer-events:auto; }
  .shell-stage{ width:100%; }
}
@media (prefers-reduced-motion: reduce){
  .shell-sidebar, .shell-drawer-backdrop{ transition:none; }
}

/* DEV badge (2026-08-28; see AFXHub.md "Dev environment") -- inert on prod, only the dev
   shell renders this. Makes it visually obvious at a glance this is the dev instance. */
.shell-dev-badge{
  display:inline-block; margin-left:8px; padding:1px 7px;
  font-size:10px; font-weight:700; letter-spacing:.08em; line-height:16px;
  color:#0b0d12; background:#e8a33d; border-radius:4px; vertical-align:middle;
}
