/* OG dashboards — shared scaffold + Manager Dashboard styles
   (OG W dashboards wave, 2026-10-16). OG black-and-gold:
   #0b0b0b family surfaces, #ffc107 gold. Mobile-first,
   full-screen surfaces. */

/* --- The surface frame ---------------------------------------------------- */
.og-dash {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: #0b0b0b;
  color: #f2f2f2;
  display: flex;
  flex-direction: column;
  font-family: inherit;
}
.og-dash[hidden] { display: none !important; }

/* --- Ticket L2 (2026-10-22): the surface is its own page ----
   Brent's drill: the Financial page opened as a dimmed
   overlay on chat and its cards stacked/ghosted while
   scrolling. The stack underneath was fully alive — chat,
   hero, topbar, and the animating rain canvas — and this
   scroller chained into it. Page mode (html.og-dash-page,
   toggled by OGDS in og_dashboards.js while a full-screen
   surface is open) removes the stack instead of stacking
   better: every other top-level layer leaves the render
   tree, the rain engine is stopped by the scaffold, and
   the scroller keeps its scroll to itself. The surface is
   also its own stacking context (isolation), so nothing
   inside it can ever paint into the page behind. The age
   gate, the helper job cards, and every script/style/link
   are exempt — they are not the page. The profile sheet
   never engages page mode (see og_dashboards.js). */
.og-dash { isolation: isolate; }
.og-dash-body { overscroll-behavior: contain; }
html.og-dash-page body > *:not(.og-dash):not(#ageGate):not(#ogDesignerCard):not(#ogMotionCard):not(#ogPodcastCard):not(#ogBookCard):not(#ogVoiceCard):not(script):not(style):not(link) { visibility: hidden !important; }

/* The canonical X (R87 law): 42x42 circle, top-right. */
.og-dash-x {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1b1b1b;
  border: 1px solid #333;
  color: #e8e8e8;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  flex: 0 0 auto;
}
.og-dash-x svg { width: 21px; height: 21px; }
.og-dash-x:hover { border-color: rgba(255, 193, 7, .7); color: #ffc107; }

.og-dash-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: calc(16px + env(safe-area-inset-top)) 16px
    calc(32px + env(safe-area-inset-bottom));
}

/* --- Manager: slim control row (NOT a header banner) ----------------------- */
.og-dash-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  /* Clear of the canonical X at the top right. */
  padding-right: 52px;
  margin-bottom: 14px;
}
.og-dash-btn {
  background: #1b1b1b;
  border: 1px solid rgba(255, 193, 7, .45);
  color: #ffc107;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
.og-dash-btn:hover { background: rgba(255, 193, 7, .12); }
.og-dash-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #bcbcbc;
  font-size: .88rem;
  cursor: pointer;
  margin-left: auto;
}
.og-dash-auto input { accent-color: #ffc107; width: 17px; height: 17px; }

/* --- Manager: sections ------------------------------------------------------- */
.og-dash-sec {
  background: #121212;
  border: 1px solid #262626;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.og-dash-sec-title {
  margin: 0 0 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #ffc107;
}
.og-dash-line { margin: 4px 0; color: #bcbcbc; font-size: .92rem; line-height: 1.45; }

/* System Overview figures */
.og-dash-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.og-dash-fig {
  background: #171717;
  border: 1px solid #232323;
  border-radius: 12px;
  padding: 10px 12px;
}
.og-dash-fig-label {
  font-size: .72rem; letter-spacing: 1px; text-transform: uppercase;
  color: #8f8f8f;
}
.og-dash-fig-value { font-size: 1.25rem; font-weight: 700; color: #f5f5f5; margin-top: 3px; }
.og-dash-fig-sub { font-size: .8rem; color: #a8a8a8; margin-top: 2px; overflow-wrap: anywhere; }

/* Performance chart */
.og-dash-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 150px;
  padding-top: 4px;
}
.og-dash-bar-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}
.og-dash-bar-count { font-size: .72rem; color: #bcbcbc; margin-bottom: 3px; }
.og-dash-bar {
  width: 100%;
  max-width: 26px;
  min-height: 4px;
  background: linear-gradient(180deg, #ffc107, #ff8f00);
  border-radius: 4px 4px 0 0;
}
.og-dash-bar-day {
  font-size: .62rem; color: #8f8f8f; margin-top: 4px;
  white-space: nowrap; transform: rotate(-38deg); transform-origin: top center;
  height: 20px;
}

/* Helper Status COMPACT rows: one line per seat, minimal height. */
.og-helper-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 2px;
  border-bottom: 1px solid #1f1f1f;
  font-size: .85rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
}
.og-helper-row:last-child { border-bottom: none; }
.og-helper-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #ececec; }
.og-helper-state { font-size: .72rem; font-weight: 700; letter-spacing: .6px; }
.og-helper-state.is-working { color: #ffc107; }
.og-helper-state.is-ready { color: #9ccc65; }
.og-helper-state.is-off { color: #777; }
.og-helper-state.is-unknown { color: #ff9800; }
.og-helper-load { color: #a8a8a8; font-size: .8rem; }
.og-helper-cap { color: #777; font-size: .8rem; min-width: 12px; text-align: right; }

/* Recent Tasks */
.og-dash-task { padding: 7px 2px; border-bottom: 1px solid #1f1f1f; }
.og-dash-task:last-child { border-bottom: none; }
.og-dash-task-top { display: flex; align-items: center; gap: 8px; }
.og-dash-task-title {
  flex: 1 1 auto; min-width: 0; color: #ececec; font-size: .95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.og-dash-chip {
  flex: 0 0 auto;
  font-size: .7rem; font-weight: 700; letter-spacing: .5px;
  color: #ffc107; border: 1px solid rgba(255, 193, 7, .45);
  border-radius: 999px; padding: 2px 9px;
}
.og-dash-task-meta { color: #a8a8a8; font-size: .82rem; margin-top: 2px; }

/* Communication Hub */
.og-dash-comm { padding: 7px 2px; border-bottom: 1px solid #1f1f1f; }
.og-dash-comm:last-child { border-bottom: none; }
.og-dash-comm-head { color: #ffc107; font-size: .78rem; font-weight: 600; }
.og-dash-comm-title { color: #ececec; font-size: .92rem; margin-top: 1px; }
.og-dash-comm-text { color: #a8a8a8; font-size: .85rem; margin-top: 1px; overflow-wrap: anywhere; }

/* The Progress panel's Manager button (og_shell.js markup). */
.og-manager-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(165deg, #1d1d1d, #131313);
  border: 1px solid rgba(255, 193, 7, .45);
  border-radius: 16px;
  color: #ffc107;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.og-manager-btn:hover { background: rgba(255, 193, 7, .12); }

/* --- Profile Sheet (surface 'profile' only) --------------------------------
   The manager surface keeps the full-screen face above; only
   the profile surface root carries .og-dash--sheet, turning
   the frame into a translucent backdrop with a bottom sheet.
   The canonical X stays in the scaffold frame, untouched. */
.og-dash--sheet { background: rgba(5, 5, 5, .62); }
.og-dash--sheet .og-dash-body {
  display: flex;
  flex-direction: column;
}
@keyframes og-sheet-slide-up {
  from { transform: translateY(28px); opacity: .4; }
  to { transform: translateY(0); opacity: 1; }
}
.og-sheet {
  margin-top: auto;
  max-height: 94%;
  overflow-y: auto;
  background: #101010;
  border: 1px solid #2a2a2a;
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: og-sheet-slide-up .22s ease-out;
}
.og-sheet-header {
  display: flex;
  align-items: center;
  gap: 14px;
  /* Clear of the canonical X at the top right. */
  padding-right: 52px;
  margin-bottom: 12px;
}
.og-sheet-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 193, 7, .55);
  flex: 0 0 auto;
  background: #1b1b1b;
}
.og-sheet-head-text { flex: 1 1 auto; min-width: 0; }
.og-sheet-name { font-size: 1.35rem; font-weight: 800; color: #f5f5f5; line-height: 1.2; }
.og-sheet-status { color: #ffc107; font-size: .92rem; margin-top: 3px; line-height: 1.4; overflow-wrap: anywhere; }
.og-sheet-status-detail { color: #a8a8a8; font-size: .84rem; margin-top: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.og-sheet-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.og-sheet-btn {
  background: #1b1b1b;
  border: 1px solid rgba(255, 193, 7, .45);
  color: #ffc107;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.3;
}
.og-sheet-btn:hover { background: rgba(255, 193, 7, .12); }
.og-sheet-look-btn { background: #ffc107; border: none; color: #111; min-height: 48px; padding: 12px 20px; font-size: 1rem; font-weight: 800; }
.og-sheet-look-btn:hover { background: #ffd54f; }
.og-sheet-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #262626;
  margin-bottom: 14px;
}
.og-sheet-tab {
  flex: 1 1 0;
  min-width: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #a8a8a8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px 9px;
  font-family: inherit;
  cursor: pointer;
}
.og-sheet-tab:hover { color: #e8e8e8; }
.og-sheet-tab.is-active { color: #ffc107; border-bottom-color: #ffc107; }
.og-sheet-tab-icon { display: grid; place-items: center; }
.og-sheet-tab-icon svg { width: 20px; height: 20px; }
.og-sheet-tab-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.og-sheet-content { min-height: 120px; }
.og-sheet-panel[hidden] { display: none !important; }
.og-sheet-row {
  display: flex;
  gap: 10px;
  padding: 7px 2px;
  border-bottom: 1px solid #1f1f1f;
  font-size: .92rem;
  line-height: 1.45;
}
.og-sheet-row:last-child { border-bottom: none; }
.og-sheet-time { flex: 0 0 auto; color: #ffc107; font-size: .82rem; font-weight: 600; padding-top: 1px; }
.og-sheet-text { flex: 1 1 auto; min-width: 0; color: #ececec; overflow-wrap: anywhere; }
.og-sheet-group-title {
  margin: 12px 0 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #ffc107;
}
.og-sheet-group-title:first-child { margin-top: 0; }
.og-sheet-card {
  background: #171717;
  border: 1px solid #232323;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 10px;
}
.og-sheet-card-title { color: #ececec; font-size: .95rem; font-weight: 700; overflow-wrap: anywhere; }
.og-sheet-card-line { color: #a8a8a8; font-size: .88rem; margin-top: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.og-sheet-card-meta { color: #8f8f8f; font-size: .8rem; margin-top: 4px; overflow-wrap: anywhere; }
.og-sheet-empty { margin: 4px 0; color: #bcbcbc; font-size: .92rem; line-height: 1.45; }
.og-sheet-unavailable { margin: 4px 0; color: #bcbcbc; font-size: .92rem; line-height: 1.45; }
.og-sheet-identity-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 193, 7, .55);
  background: #1b1b1b;
  margin-bottom: 8px;
}
.og-sheet-account { margin: 4px 0; color: #a8a8a8; font-size: .86rem; line-height: 1.45; overflow-wrap: anywhere; }
