/* ============================================================
   $NPC — Non-Playable Corporation brand layer (additive).
   THEME: "crypto terminal" (Rarible structure), LIGHT + Coinbase blue.
   Light canvas (#f7f8f9) · flat surfaces split by
   hairline borders (no shadows) · JetBrains Mono for all UI/data ·
   Inter for section headings · TWO blues (Coinbase palette):
   #0011c4 brand — filled CTAs/active states (white text);
   #0011c4 interactive — links, positive data, text accents.
   Negative data: #e5486b. Everything else monochrome blue-gray.
   The pixel office canvas keeps its own look.
   ============================================================ */
:root {
  /* surfaces (navy instead of onyx) */
  --bg-dark: #f7f8f9;        /* page canvas */
  --bg-panel: #ffffff;       /* card/table surface (hairline-separated) */
  --bg-panel-alt: #f0f2f5;   /* carbon — interactive/elevated */
  --bg-card: #ffffff;
  --border: #e3e6ea;         /* zinc hairline, navy-tinted */
  /* text */
  --text-primary: #0a0b0d;
  --pixel-white: #0a0b0d;
  --text-dim: #8a919e;       /* ash */
  --pixel-gray: #5b616e;     /* steel */
  /* data colors: lime = positive/active, pink = negative.
     Everything else renders as blue-gray monochrome. */
  --pixel-green: #0011c4;
  --pixel-blue: #6e7684;
  --pixel-yellow: #0011c4;
  --pixel-red: #e5486b;
  --pixel-cyan: #3f4854;
  --pixel-purple: #6e7684;
  --pixel-orange: #3f4854;
  --bg-darker: #f7f8f9;

  /* $NPC tokens */
  --npc-brand: #0011c4;   /* filled CTAs, active states */
  --npc-lime: #0011c4;    /* interactive text accent (legacy name) */
  --npc-neg: #e5486b;
  --npc-hairline: #e3e6ea;
  --npc-smoke: #cfd4dc;      /* heavier border for inputs/definition */
  --npc-carbon: #f0f2f5;
  --npc-steel: #5b616e;
  --npc-ash: #8a919e;
  --npc-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --npc-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --npc-read: var(--npc-mono);
}

/* App background + base text */
body {
  background: var(--bg-dark) !important;
  color: var(--text-primary) !important;
}

/* ============================================================
   TYPOGRAPHY — terminal mono for all UI/data (Geist Mono sub);
   Inter (Tomorrow sub) 500 for section/panel headings only.
   ============================================================ */
body, button, input, textarea, select,
.roster-name, .roster-role, .roster-empnum,
.ceo-section-header, .ceo-nav-btn, #ceo-conv-messages, #activity-log,
.modal-body, .form-input, .status-item, .ceo-msg, .ceo-msg-sender,
#projects-panel-list, #ceo-projects-section, #ceo-oneonone-items,
.dashboard-grid, #announcements-list,
.brand-sub, .npc-navbtn, .version-badge,
.ceo-label, .npc-tweet .t-draft, .pixel-btn {
  font-family: var(--npc-sans) !important;
  letter-spacing: 0 !important;
}
body { font-size: 13px !important; line-height: 1.43 !important; }
.roster-name { font-size: 13px !important; line-height: 1.35 !important; }
.roster-role, .roster-empnum { font-size: 11px !important; line-height: 1.4 !important; }
#activity-log, #ceo-conv-messages { font-size: 12px !important; line-height: 1.55 !important; }
.status-item { font-size: 11px !important; }
.ceo-section-header { font-size: 12px !important; }
.ceo-nav-btn { font-size: 12px !important; }

/* Headings: Tomorrow-substitute (Inter 500), white, no glow */
.pixel-title, .collapsible-header .pixel-title,
h1.pixel-title, h2.pixel-title, h3.pixel-title,
.npc-lore h2 {
  font-family: var(--npc-sans) !important;
  font-weight: 500 !important;
  color: #0a0b0d !important;
  text-shadow: none !important;
  text-transform: uppercase;
  letter-spacing: 0.04em !important;
}
h1.pixel-title { font-size: 16px !important; line-height: 1.3; }
h2.pixel-title { font-size: 13px !important; }
h3.pixel-title { font-size: 12px !important; line-height: 1.4; }
.brand-sub { color: var(--npc-steel) !important; }
.collapse-arrow, .collapsible-header { color: #0a0b0d !important; }

/* Header brand row vertically centered */
.panel-header { display: flex !important; align-items: center !important; }
.panel-header h1.pixel-title { display: flex !important; align-items: center !important; gap: 8px; margin: 0 !important; }
.panel-header .brand-sub { display: inline-flex; align-items: center; line-height: 1; }

/* Foregrounds on dark surfaces */
.npc-board-msg .bm-text, .npc-feed-card .fc-body, .npc-result-card .r-body,
.npc-tweet .t-text, #ceo-conv-messages { color: #3f4854 !important; }
.roster-name { color: #0a0b0d !important; }
.npc-board-msg .bm-who, .npc-feed-card .fc-title, .npc-result-card .r-title,
.npc-tweet .t-name { color: #0a0b0d !important; }
#status-bar .status-item { color: var(--npc-steel) !important; }

/* Activity-log terminal on canvas */
#activity-log, #activity-log .xterm, #activity-log .xterm-viewport,
#activity-log .xterm-screen, #left-bottom-panel .collapsible-body {
  background: #ffffff !important;
}

/* ============================================================
   PANELS — flat navy surfaces, hairline borders, 12px radius,
   NO shadows. Elevation = layering, not blur.
   ============================================================ */
#left-top-panel, #left-bottom-panel, #menu-panel, #roster-panel, #console-panel, #office-panel {
  background: var(--bg-panel) !important;
  border: 1px solid var(--npc-hairline) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
#office-canvas { border-radius: 6px; background: #eceef2; }
.panel-header, .collapsible-header { border-bottom: 1px solid var(--npc-hairline) !important; }

/* ============================================================
   SPECTATOR MODE — the public watches, never steers.
   Every control point is hidden (belt-and-suspenders; office.js
   also swallows clicks on agents/rooms). Keep only view + filters.
   ============================================================ */
#ceo-conv-input-area, #ceo-attach-btn, #ceo-file-input,
#meeting-ceo-input-area, #settings-floating-panel,
#create-product-btn, #import-product-btn, #create-product-modal,
#emp-avatar-upload, #emp-avatar-upload-label, #emp-avatar-upload-input,
.avatar-upload-btn, #emp-settings-container, #emp-oneonone-btn,
#emp-fire-btn, #emp-model-save-btn, #emp-model-edit, #emp-task-cancel-btn,
#emp-self-hosted-model, #emp-detail-provider, #emp-detail-model,
#hiring-request-modal, #candidate-modal, #talent-pool-modal, #interview-modal,
#hiring-request-approve, #hiring-request-reject,
#detail-interview-btn, #detail-select-btn, #candidate-batch-hire-btn,
#interview-file-input, #interview-hire-btn,
#company-culture-modal, #company-direction-modal,
#company-culture-input, #company-culture-add-btn,
#company-direction-input, #company-direction-save-btn, #company-direction-enrich-btn,
#workflow-edit-btn, #workflow-save-btn,
#oneonone-modal, #meeting-type-select, #oneonone-target, #oneonone-start-btn,
#oneonone-input, #oneonone-send-btn, #oneonone-end-btn,
#meeting-ceo-send-btn,
#dnd-toggle-btn, #bg-tasks-toolbar-btn, #abort-all-toolbar-btn,
#reload-toolbar-btn, #screenshot-toolbar-btn,
.chat-attach-btn,
#ceo-avatar-area, #ceo-project-list, #ceo-list-toggle {
  display: none !important;
}
/* Spectator: hide destructive/iteration controls inside any modal */
#continue-iter-btn, #stop-iter-btn, #followup-btn,
.proj-trace-btn, .project-trace-btn, .company-culture-delete-btn,
#project-delete-btn, .project-delete-btn, .emp-cron-stop-all-btn {
  display: none !important;
}

/* ============================================================
   FULL-HEIGHT MAP LAYOUT — compact gaps (flat theme, no shadow
   clearance needed).
   ============================================================ */
#app {
  grid-template-columns: 240px 1fr 320px !important;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  grid-template-areas:
    "left-top    canvas  roster"
    "left-menu   canvas  roster"
    "left-bottom canvas  console" !important;
  gap: 8px !important;
  padding: 8px !important;
}
#menu-panel { grid-area: left-menu; }
#office-panel { grid-area: canvas; }
#left-top-panel { grid-area: left-top; }
#left-bottom-panel { grid-area: left-bottom; }
#roster-panel { grid-area: roster; }
#console-panel { grid-area: console; }
#left-top-panel, #left-bottom-panel, #menu-panel, #roster-panel, #console-panel {
  min-height: 0; overflow: hidden;
}

#ceo-body { padding: 0 !important; gap: 0 !important; }

/* ============================================================
   STATUS STRIP — data readouts: label steel caps, value mono.
   Treasury (positive flow) reads in lime; spend in white.
   ============================================================ */
#npc-status-strip {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--npc-hairline);
  background: transparent;
  flex: 0 0 auto;
}
.npc-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--npc-carbon);
  border: 1px solid var(--npc-hairline);
  border-radius: 6px;
  padding: 8px 10px;
  min-width: 0;
  overflow: hidden;
}
#npc-stat-treasury { background: var(--npc-carbon); }
#npc-stat-spend { background: var(--npc-carbon); }
.npc-stat-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--npc-steel);
  white-space: nowrap;
}
.npc-stat-value {
  font-family: var(--npc-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--npc-lime);
  text-shadow: none;
  white-space: nowrap;
}
#npc-stat-spend .npc-stat-value { color: #0a0b0d; text-shadow: none; }
.npc-stat-sub { font-size: 10px; color: var(--npc-ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The old CEO chat split is retired — Boardroom replaces it */
#ceo-split { display: none !important; }
#ceo-split.hidden { display: none !important; }
.npc-feed-pane { flex: 1 1 auto; min-height: 0; }

/* ============================================================
   LIVE FEED TABS — chain-filter pills: ghost default,
   lime fill + black text when active.
   ============================================================ */
#npc-feed-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 10px 0;
  flex: 0 0 auto;
}
.npc-feed-tab {
  flex: 1;
  font-family: var(--npc-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--npc-steel);
  background: transparent;
  border: 1px solid var(--npc-hairline);
  border-radius: 9999px;
  padding: 6px 6px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.npc-feed-tab:hover { background: var(--npc-carbon); color: #0a0b0d; }
.npc-feed-tab.active {
  color: #ffffff;
  border-color: var(--npc-brand);
  background: var(--npc-brand);
  font-weight: 700;
}
.npc-feed-pane {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.npc-feed-pane.hidden { display: none !important; }

/* ============================================================
   FEED CARDS — flat surfaces, hairline borders, 12px radius.
   No colored side-bars: monochrome, data speaks.
   ============================================================ */
.npc-board-msg {
  background: var(--bg-panel);
  border: 1px solid var(--npc-hairline);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 0;
}
.npc-board-msg .bm-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.npc-board-msg .bm-who { color: #0a0b0d; font-size: 12px; font-weight: 700; }
.npc-board-msg .bm-role { color: var(--npc-ash); font-size: 10px; }
.npc-board-msg .bm-when { color: var(--npc-ash); font-size: 10px; margin-left: auto; }
.npc-board-msg .bm-text { color: #3f4854; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

.npc-feed-card {
  background: var(--bg-panel);
  border: 1px solid var(--npc-hairline);
  border-radius: 12px;
  padding: 10px 14px;
}
.npc-feed-card .fc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.npc-feed-card .fc-title { color: #0a0b0d; font-size: 13px; font-weight: 700; }
.npc-feed-card .fc-status { color: var(--npc-lime); font-size: 10px; font-weight: 500; white-space: nowrap; }
.npc-feed-card .fc-parts { color: var(--npc-steel); font-size: 11px; margin-top: 4px; }
.npc-feed-card .fc-body { color: #3f4854; font-size: 12px; line-height: 1.55; margin-top: 5px; max-height: 5em; overflow: hidden; }
.npc-feed-card .fc-meta { color: var(--npc-ash); font-size: 10px; margin-top: 7px; }

/* Hover tooltip on the map — carbon panel, hairline, flat */
.tooltip {
  background: var(--npc-carbon) !important;
  color: #0a0b0d !important;
  border: 1px solid var(--npc-smoke) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-family: var(--npc-sans) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

/* Connection status dot — lime when live */
.npc-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 9999px;
  background: var(--npc-lime);
  border: none;
  box-shadow: none;
  vertical-align: middle;
}
.version-badge { display: none !important; }

/* ============================================================
   NAVBAR — ghost buttons; THE BUILD is the single lime CTA.
   ============================================================ */
.npc-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 26px;
  border: 1px solid var(--npc-hairline);
  background: transparent;
  border-radius: 6px;
  margin-left: 4px;
  transition: background 0.12s;
}
.npc-social img { width: 15px; height: 15px; opacity: 0.95; }
/* X glyph → white on dark. pump.fun keeps its own colors. */
.npc-social-x img { filter: brightness(0); opacity: 0.75; }
.npc-social-pump img { filter: none; }
.npc-social:hover { background: var(--npc-carbon); border-color: var(--npc-smoke); }
.npc-social-x:hover img { opacity: 1; }

.brand-logo {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  border: 1px solid var(--npc-smoke);
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 6px;
}

/* Ghost nav buttons (LORE / RESULTS / TWEETS) */
.npc-navbtn {
  font-family: var(--npc-sans) !important;
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0a0b0d !important;
  background: transparent !important;
  border: 1px solid var(--npc-smoke) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  box-shadow: none;
  transition: background 0.1s;
}
.npc-navbtn:hover {
  background: var(--npc-carbon) !important;
  color: #0a0b0d !important;
}
#lore-toolbar-btn, #results-toolbar-btn, #tweets-toolbar-btn {
  border-color: var(--npc-smoke) !important;
}

/* THE BUILD — the one filled CTA on the page: lime on black */
.npc-navbtn-saas {
  background: var(--npc-brand) !important;
  color: #ffffff !important;
  border: 1px solid var(--npc-brand) !important;
  border-radius: 6px !important;
  padding: 6px 14px !important;
  margin: 0 4px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  box-shadow: none;
}
.npc-navbtn-saas:hover {
  background: #1a2bdd !important;
  color: #ffffff !important;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   MODALS — flat navy windows, hairline edge, 12px radius,
   near-black scrim. Lime tick marks the window title.
   ============================================================ */
.modal-overlay { background: rgba(10, 11, 13, 0.4) !important; }

.modal-content,
.npc-modal-content {
  background: var(--bg-panel) !important;
  color: #0a0b0d !important;
  border: 1px solid var(--npc-smoke) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
.npc-modal-content {
  width: min(720px, 92vw) !important;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}
.npc-modal-content .modal-body { overflow-y: auto; padding: 20px 22px !important; }

.modal-header {
  padding: 14px 18px !important;
  background: var(--bg-dark) !important;
  border-bottom: 1px solid var(--npc-hairline) !important;
  border-radius: 12px 12px 0 0;
  gap: 12px;
}
.modal-header .pixel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--npc-sans) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  line-height: 1.4 !important;
  letter-spacing: 0.04em;
  color: #0a0b0d !important;
  text-shadow: none !important;
  margin: 0;
}
/* lime tick — the single accent voice */
.modal-header .pixel-title::before {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--npc-brand);
  border: none;
  border-radius: 1px;
}

/* Close button: ghost chip */
.modal-close {
  background: transparent !important;
  border: 1px solid var(--npc-smoke) !important;
  border-radius: 6px !important;
  color: #0a0b0d !important;
  font-family: var(--npc-sans) !important;
  font-size: 12px !important;
  line-height: 1 !important;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  flex-shrink: 0;
  transition: background 0.1s;
}
.modal-close:hover {
  background: var(--npc-carbon) !important;
  color: #0a0b0d !important;
}

/* Modal body: mono, readable floors (upstream inlines 5-7px) */
.modal-content .modal-body,
.modal-content .modal-body *:not(.npc-stat-value) { font-family: var(--npc-sans) !important; }
.modal-content .modal-body { color: #3f4854 !important; font-size: 13px !important; line-height: 1.55 !important; }
.modal-content .modal-body,
.modal-content .modal-body div,
.modal-content .modal-body span,
.modal-content .modal-body p,
.modal-content .modal-body li,
.modal-content .modal-body a,
.modal-content .modal-body td,
.modal-content .modal-body th,
.modal-content .modal-body tr,
.modal-content .modal-body pre,
.modal-content .modal-body code,
.modal-content .modal-body b,
.modal-content .modal-body em,
.modal-content .modal-body small,
.modal-content .modal-body label,
.modal-content .modal-body button {
  font-size: 12px !important;
  line-height: 1.5 !important;
}
.modal-content .modal-body h1, .modal-content .modal-body h2,
.modal-content .modal-body h3, .modal-content .modal-body .section-title,
.modal-content .modal-body strong { font-size: 13px !important; }
.modal-content .modal-body [class*="tab"], .modal-content .modal-body nav span { font-size: 12px !important; }

/* ============================================================
   SECTION LABELS — 10px mono steel caps on a trailing hairline
   (table-column-header voice).
   ============================================================ */
.emp-detail-section-title,
.meeting-chat-header {
  font-family: var(--npc-sans) !important;
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--npc-steel) !important;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
  white-space: nowrap;
}
.emp-detail-section-title::after,
.meeting-chat-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--npc-hairline);
}

/* ============================================================
   EXPANDABLE CARDS (Projects / Results): click to reveal
   ============================================================ */
.npc-card-expandable { cursor: pointer; }
.npc-card-expandable .fc-body,
.npc-card-expandable .r-body { max-height: 4.6em; overflow: hidden; transition: max-height 0.15s; }
.npc-card-expandable.expanded .fc-body,
.npc-card-expandable.expanded .r-body { max-height: 2000px; }
.npc-card-expandable:hover { border-color: var(--npc-smoke); }

/* ============================================================
   RESULTS CARDS
   ============================================================ */
.npc-results { display: flex; flex-direction: column; gap: 8px; }

.npc-result-card {
  background: var(--bg-panel);
  border: 1px solid var(--npc-hairline);
  border-radius: 12px;
  padding: 14px 16px 12px;
  transition: background 0.12s, border-color 0.12s;
}
.npc-result-card:hover {
  background: var(--npc-carbon);
  border-color: var(--npc-smoke);
  box-shadow: none;
  transform: none;
}

.npc-result-card .r-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.npc-result-card .r-title {
  color: #0a0b0d !important;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.35 !important;
}
.npc-result-card .r-by {
  color: var(--npc-steel) !important;
  font-size: 11px !important;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
/* status chip: ghost with lime voice */
.npc-result-card .r-status {
  display: inline-block;
  font-family: var(--npc-sans);
  font-size: 9px !important;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  vertical-align: middle;
  padding: 4px 8px;
  margin-left: 8px;
  border: 1px solid var(--npc-smoke);
  border-radius: 9999px;
  background: transparent;
  color: var(--npc-lime);
}
.npc-result-card .r-body {
  color: #3f4854 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  margin-top: 9px;
}
.npc-result-card .r-meta {
  color: var(--npc-ash) !important;
  font-size: 11px !important;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--npc-hairline);
}

/* ============================================================
   TWEETS
   ============================================================ */
.npc-tweets { display: flex; flex-direction: column; gap: 8px; }

.npc-tweet {
  background: var(--bg-panel);
  border: 1px solid var(--npc-hairline);
  border-radius: 12px;
  padding: 14px 16px;
  transition: background 0.12s, border-color 0.12s;
}
.npc-tweet-live { cursor: pointer; }
.npc-tweet-live:hover {
  background: var(--npc-carbon);
  border-color: var(--npc-smoke) !important;
  box-shadow: none;
  transform: none;
}
.npc-tweet .t-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}
.npc-tweet .t-avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px !important;
  border: 1px solid var(--npc-smoke);
  background: var(--npc-carbon);
  image-rendering: pixelated;
  object-fit: cover;
  flex-shrink: 0;
}
.npc-tweet .t-name {
  color: #0a0b0d !important;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.25 !important;
}
.npc-tweet .t-handle {
  color: var(--npc-ash) !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
}
.npc-tweet .t-text {
  color: #3f4854 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  white-space: pre-wrap;
}
.npc-tweet .t-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--npc-hairline);
  color: var(--npc-ash) !important;
  font-size: 11px !important;
}
/* VIEW ON X → lime action chip (active voice) */
.npc-tweet .t-live {
  font-family: var(--npc-sans);
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff !important;
  border: 1px solid var(--npc-brand);
  border-radius: 9999px;
  background: var(--npc-brand);
  padding: 4px 9px;
  line-height: 1;
}
.npc-tweet-live:hover .t-live { background: #1a2bdd; color: #ffffff !important; }
/* DRAFT: ghost chip, lime text — pending state */
.npc-tweet .t-draft {
  font-family: var(--npc-sans) !important;
  font-size: 9px !important;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--npc-lime) !important;
  border: 1px solid var(--npc-smoke);
  border-radius: 9999px !important;
  padding: 4px 9px;
  line-height: 1;
  background: transparent;
}

/* ============================================================
   LORE
   ============================================================ */
.npc-lore { color: #3f4854; line-height: 1.7; font-size: 13px; }

.npc-lore .npc-lore-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--npc-carbon);
  border: 1px solid var(--npc-hairline);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 22px;
  box-shadow: none;
}
.npc-lore .npc-lore-hero img {
  width: 92px;
  height: 92px;
  image-rendering: pixelated;
  border: 1px solid var(--npc-smoke);
  border-radius: 6px !important;
  flex-shrink: 0;
}
.npc-lore .npc-lore-hero h2 {
  margin: 6px 0 8px !important;
  color: #0a0b0d !important;
  text-shadow: none !important;
  border-bottom: none !important;
}
.npc-lore .npc-lore-hero .tag {
  font-family: var(--npc-sans);
  color: var(--npc-lime);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.npc-lore h2 {
  font-size: 14px !important;
  margin: 26px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--npc-hairline);
}
.npc-lore h2:first-child { margin-top: 0; }
.npc-lore p { margin: 0 0 14px; color: #3f4854; }

/* funding-loop callout: carbon well, lime left rule */
.npc-lore .npc-loop {
  background: var(--npc-carbon);
  border: 1px solid var(--npc-hairline);
  border-left: 2px solid var(--npc-brand);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.6;
  color: #23272f;
}

/* pills: ghost chips */
.npc-lore .npc-pill {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--npc-smoke);
  border-radius: 9999px !important;
  color: #23272f;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  margin: 0 6px 6px 0;
}

/* CA / handle line: boxed data readout */
.npc-lore .npc-ca {
  margin-top: 12px;
  font-size: 11px;
  word-break: break-all;
  background: var(--npc-carbon);
  border: 1px solid var(--npc-hairline);
  border-radius: 6px;
  padding: 8px 10px;
}
.npc-lore .npc-ca a {
  color: var(--npc-lime);
  text-decoration: none;
  font-family: var(--npc-sans);
  font-weight: 500;
}
.npc-lore .npc-ca a:hover { text-decoration: underline; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.npc-empty {
  color: var(--npc-ash);
  font-size: 12px;
  text-align: center;
  padding: 44px 0;
  line-height: 1.8;
}

/* ============================================================
   SAAS modal
   ============================================================ */
.npc-saas { display: flex; flex-direction: column; gap: 12px; }
.saas-idea {
  background: var(--npc-carbon);
  border: 1px solid var(--npc-hairline);
  border-left: 2px solid var(--npc-brand);
  border-radius: 6px;
  padding: 12px 16px;
}
.saas-idea-label {
  font-family: var(--npc-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--npc-lime); margin-bottom: 8px;
}
.saas-idea pre { margin: 0; white-space: pre-wrap; font-family: var(--npc-sans); font-size: 13px; color: #23272f; line-height: 1.5; }
.saas-file {
  background: var(--bg-panel); border: 1px solid var(--npc-hairline);
  border-radius: 12px; cursor: pointer;
}
.saas-file:hover { background: var(--npc-carbon); }
.saas-file-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; border-bottom: 1px solid var(--npc-hairline);
}
.saas-file-name { font-size: 12px; font-weight: 700; color: #0a0b0d; font-family: var(--npc-sans); }
.saas-file-kind {
  font-family: var(--npc-sans); font-size: 9px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--npc-steel); border: 1px solid var(--npc-smoke);
  border-radius: 9999px; background: transparent; padding: 4px 9px;
}
.saas-file-body {
  margin: 0; padding: 12px; font-family: var(--npc-sans);
  font-size: 11px; line-height: 1.55; color: #3f4854; white-space: pre-wrap;
  max-height: 8em; overflow: hidden;
}
.npc-card-expandable.expanded .saas-file-body { max-height: 2000px; }
.saas-logo-prev { padding: 18px; text-align: center; background: var(--npc-carbon); border-radius: 6px; }
.saas-logo-prev svg { max-width: 160px; max-height: 160px; }
.saas-page-prev { width: 100%; height: 360px; border: 0; background: #fff; border-radius: 6px; }

.saas-prodname { font-size: 16px; font-weight: 700; color: #0a0b0d; margin: 4px 0 10px; }
.saas-section { margin-top: 18px; }
.saas-section:first-child { margin-top: 0; }
.saas-section-label {
  font-family: var(--npc-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--npc-steel); padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 1px solid var(--npc-hairline);
  display: flex; align-items: center; gap: 8px;
}
.saas-section-count {
  font-family: var(--npc-sans); font-size: 10px; color: var(--npc-lime);
  border: 1px solid var(--npc-smoke); border-radius: 9999px;
  background: transparent; padding: 1px 8px;
}
.saas-file { margin-bottom: 10px; }

/* ============================================================
   PROJECT WALL
   ============================================================ */
.project-card {
  background: var(--bg-panel) !important;
  border: 1px solid var(--npc-hairline) !important;
  border-radius: 12px;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
  transition: background 0.12s, border-color 0.12s;
}
.project-card:hover {
  background: var(--npc-carbon) !important;
  border-color: var(--npc-smoke) !important;
  box-shadow: none;
  transform: none;
}
.project-card-header { color: #0a0b0d !important; font-size: 13px !important; font-weight: 700; }
.project-card-date, .project-card-meta { color: var(--npc-ash) !important; font-size: 11px !important; }

.project-list {
  max-height: none !important;
  overflow-y: auto;
}
#project-detail, .project-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  min-height: 0;
  background: transparent !important;
  color: #0a0b0d !important;
}
#project-detail-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.project-detail-split {
  flex: 1;
  min-height: 0;
  gap: 0 !important;
}
.project-iter-list {
  flex: 0 0 240px !important;
  max-height: none !important;
  border-right: 1px solid var(--npc-hairline) !important;
  padding-right: 12px !important;
}
.project-iter-card {
  background: var(--bg-panel) !important;
  border: 1px solid var(--npc-hairline) !important;
  border-radius: 6px;
  padding: 10px 12px !important;
  margin-bottom: 8px !important;
}
.project-iter-card:hover { background: var(--npc-carbon) !important; border-color: var(--npc-smoke) !important; }
.project-iter-card.active {
  background: var(--npc-carbon) !important;
  border-color: var(--npc-smoke) !important;
  border-left: 2px solid var(--npc-brand) !important;
}
.project-iter-detail { max-height: none !important; padding-left: 14px !important; }

/* View tabs (Detail / Task Tree / Kanban / Timeline) — pills */
.project-tabs { gap: 6px !important; margin-bottom: 12px !important; padding: 2px 0; }
.project-tab {
  font-family: var(--npc-sans) !important;
  font-size: 11px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--npc-steel) !important;
  background: transparent !important;
  border: 1px solid var(--npc-hairline) !important;
  border-radius: 9999px !important;
  padding: 6px 14px !important;
  cursor: pointer;
}
.project-tab:hover { background: var(--npc-carbon) !important; color: #0a0b0d !important; }
.project-tab.active {
  background: var(--npc-brand) !important;
  color: #ffffff !important;
  border-color: var(--npc-brand) !important;
  font-weight: 700;
}

/* Task-tree canvas + drawers: page canvas, never light */
.project-tree-canvas, .project-tree-layout, .project-tree-drawer,
.project-tab-content[data-tab="task-tree"],
.task-tree-container, .timeline-container, .g6-container {
  background: var(--bg-dark) !important;
  color: #0a0b0d !important;
}
.project-file-item:hover { background: var(--npc-carbon) !important; color: #0a0b0d !important; }
.file-tree-dir:hover { background: var(--npc-carbon) !important; }
.loading-text { color: var(--npc-ash) !important; }

/* Kanban: wide boards scroll inside their own container */
.kanban-board { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; padding-bottom: 10px; }
.project-tab-content { overflow-x: auto; }
.kanban-column {
  background: var(--bg-panel) !important;
  border: 1px solid var(--npc-hairline) !important;
  border-radius: 12px;
  min-width: 180px; padding: 8px;
}
.kanban-column-header {
  font-family: var(--npc-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--npc-steel) !important; padding: 6px 4px 10px;
  border-bottom: 1px solid var(--npc-hairline);
}
.kanban-card {
  background: var(--npc-carbon) !important; border: 1px solid var(--npc-hairline) !important;
  border-left: 2px solid var(--npc-brand) !important; border-radius: 6px;
  color: #0a0b0d !important;
  padding: 8px 10px; margin-top: 8px;
}
.kanban-card-title { color: #0a0b0d !important; font-size: 12px !important; }
.kanban-card-meta, .kanban-sp { color: var(--npc-steel) !important; font-size: 11px !important; }
.kanban-priority { font-size: 9px !important; }
.modal-body [class*="tab"], .modal-body .project-view-tab { color: #0a0b0d !important; }

/* ============================================================
   WORKFLOWS WINDOW
   ============================================================ */
.workflow-rendered {
  max-height: none !important;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 20px !important;
  background: var(--bg-panel) !important;
  color: #3f4854 !important;
  border: none !important;
}
.workflow-textarea {
  background: var(--bg-dark) !important;
  color: #23272f !important;
  border: 1px solid var(--npc-smoke) !important;
  border-radius: 6px;
}
.workflow-sidebar {
  width: 250px !important;
  overflow-x: hidden;
  border-right: 1px solid var(--npc-hairline) !important;
}
.workflow-item {
  font-size: 11px !important;
  line-height: 1.5 !important;
  color: var(--npc-steel) !important;
  padding: 9px 12px !important;
  border-bottom: 1px solid var(--npc-hairline) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workflow-item:hover { background: var(--npc-carbon) !important; color: #0a0b0d !important; }
.workflow-item.active {
  background: var(--npc-carbon) !important;
  border-left: 2px solid var(--npc-brand) !important;
  color: #0a0b0d !important;
  font-weight: 500;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px !important;
  border-top: 1px solid var(--npc-hairline) !important;
  background: var(--bg-dark) !important;
  border-radius: 0 0 12px 12px;
}
.modal-footer .pixel-btn, .modal-footer button {
  flex: 0 0 auto !important;
  width: auto !important;
  padding: 7px 16px !important;
  font-size: 11px !important;
}

/* ============================================================
   EMPLOYEE WINDOW — compact profile rail + logs
   ============================================================ */
.emp-detail-grid {
  grid-template-columns: 280px minmax(0, 1fr) minmax(0, 1.3fr) !important;
}
.emp-detail-left, .emp-detail-center, .emp-detail-right {
  padding: 16px !important;
  border-right-color: var(--npc-hairline) !important;
}
.emp-detail-right { border-right: none !important; }

.employee-avatar-section {
  justify-content: center !important;
  margin-bottom: 14px !important;
}
.employee-avatar {
  width: 84px !important;
  height: 84px !important;
  border-radius: 6px !important;
  border: 1px solid var(--npc-smoke) !important;
  box-shadow: none;
  image-rendering: pixelated;
}

.emp-detail-status-card {
  margin-bottom: 4px !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}
.emp-detail-status-card .emp-detail-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0 !important;
  border-bottom: 1px solid var(--npc-hairline);
}
.emp-detail-status-card .emp-detail-row:last-child { border-bottom: none; }
.emp-detail-label {
  color: var(--npc-steel) !important;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px !important;
  letter-spacing: 0.06em;
  min-width: 76px !important;
}
.emp-detail-value {
  color: #0a0b0d !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  word-break: break-word;
}

/* Perf quarters: compact readout row */
.perf-quarters { display: flex; gap: 6px; margin: 4px 0 6px; }
.perf-quarter-card {
  flex: 1; padding: 6px 4px !important; text-align: center;
  background: var(--npc-carbon) !important;
  border: 1px solid var(--npc-hairline) !important;
  border-radius: 6px !important;
}
.perf-quarter-card .pq-label {
  color: var(--npc-steel) !important;
  font-family: var(--npc-sans) !important;
  font-size: 10px !important;
  font-weight: 500;
}
.perf-quarter-card .pq-score { color: #0a0b0d !important; font-weight: 700; }
.perf-quarter-card.high { border-color: var(--npc-smoke) !important; }
.perf-quarter-card.high .pq-score { color: var(--npc-lime) !important; }
.perf-quarter-card.low { border-color: var(--npc-smoke) !important; }
.perf-quarter-card.low .pq-score { color: var(--npc-neg) !important; }
.perf-quarter-card.mid .pq-score { color: #23272f !important; }
.perf-quarter-card.empty .pq-score { color: var(--npc-ash) !important; }

.emp-detail-section { margin-top: 16px !important; }
.emp-detail-section-content {
  font-size: 12px !important;
  line-height: 1.55 !important;
  color: #3f4854 !important;
}

/* HR badges: ghost pills */
.roster-badge {
  font-family: var(--npc-sans) !important;
  font-size: 9px !important;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 9999px !important;
  padding: 3px 9px !important;
}
.roster-badge.onboarding {
  background: transparent !important;
  color: var(--npc-lime) !important;
  border: 1px solid var(--npc-smoke) !important;
}
.roster-badge.probation {
  background: transparent !important;
  color: var(--npc-steel) !important;
  border: 1px solid var(--npc-smoke) !important;
}
.roster-badge.pip {
  background: transparent !important;
  color: var(--npc-neg) !important;
  border: 1px solid var(--npc-smoke) !important;
}

/* Permission tags: ghost chips */
.perm-tag {
  display: inline-block;
  font-family: var(--npc-sans) !important;
  font-size: 10px !important;
  font-weight: 500;
  color: #23272f !important;
  background: transparent !important;
  border: 1px solid var(--npc-smoke) !important;
  border-radius: 9999px !important;
  padding: 3px 9px !important;
  margin: 0 4px 4px 0;
}

/* Log wells: canvas-dark readouts with own scroll */
.emp-log-viewer,
#emp-detail-progress,
#emp-detail-logs {
  background: var(--bg-dark) !important;
  color: #3f4854 !important;
  border: 1px solid var(--npc-hairline) !important;
  border-radius: 6px;
  padding: 10px 12px !important;
}
.modal-content .modal-body .emp-log-viewer,
.modal-content .modal-body .emp-log-viewer div,
.modal-content .modal-body .emp-log-viewer span,
.modal-content .modal-body #emp-detail-progress,
.modal-content .modal-body #emp-detail-progress div,
.modal-content .modal-body #emp-detail-progress span {
  font-size: 11px !important;
  line-height: 1.55 !important;
}

/* ============================================================
   MEETING WINDOW
   ============================================================ */
.meeting-info-label {
  color: var(--npc-steel) !important;
  font-family: var(--npc-sans) !important;
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.meeting-info-value, .meeting-participants-list { color: #0a0b0d !important; }
.meeting-chat-messages {
  background: var(--bg-dark) !important;
  color: #3f4854 !important;
}

/* ============================================================
   GENERIC CONTROLS — 6px radius, ghost by default
   ============================================================ */
button, input, select, textarea,
.roster-filter-select, .pixel-btn, .toolbar-icon-btn, .panel-add-btn {
  border-radius: 6px !important;
}
.roster-filter-select {
  background: var(--npc-carbon) !important;
  color: #0a0b0d !important;
  border: 1px solid var(--npc-hairline) !important;
  padding: 4px 6px !important;
  font-size: 11px !important;
}
.pixel-btn {
  background: transparent !important;
  color: #0a0b0d !important;
  border: 1px solid var(--npc-smoke) !important;
  text-shadow: none !important;
}
.pixel-btn:hover { background: var(--npc-carbon) !important; }

.roster-card, .project-panel-card { border-radius: 6px !important; }

/* Scrollbars — slim, flat */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--npc-smoke); border: none; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b6bdc9; }

/* Collapsible headers: light hover (upstream hardcodes navy #222244) */
.collapsible-header:hover { background: #f0f2f5 !important; }

/* ============================================================
   EMPLOYEE WINDOW v2 — mockup structure:
   ┌ rail ┬ current tasks ┬ execution log ┐
   │ rail ┴───────  work history  ────────┘
   ============================================================ */
.emp-detail-grid {
  display: grid !important;
  grid-template-columns: 300px minmax(0, 1fr) minmax(0, 1.05fr) !important;
  grid-template-rows: minmax(0, 1.5fr) minmax(0, 1fr) !important;
  grid-template-areas:
    "rail tasks log"
    "rail history history" !important;
}
.emp-detail-left { grid-area: rail; overflow-y: auto; }
.emp-detail-center { grid-area: tasks; overflow: hidden; }
.emp-detail-right { grid-area: log; overflow: hidden; border-right: none !important; }
.emp-detail-bottom {
  grid-area: history;
  border-top: 1px solid var(--npc-hairline);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.emp-detail-bottom .emp-detail-section { margin-top: 0 !important; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.emp-detail-bottom .emp-detail-section-content { flex: 1; overflow-y: auto; min-height: 0; }

/* Rail hero: big avatar, name as title, nickname subtitle, level chip */
.employee-avatar {
  width: 96px !important;
  height: 96px !important;
  border-radius: 12px !important;
  border: 1px solid var(--npc-smoke) !important;
}
.emp-detail-status-card { display: flex; flex-direction: column; }
.emp-detail-status-card .emp-detail-row:has(#emp-detail-name) {
  order: -3;
  border-bottom: none;
  justify-content: center;
  padding: 8px 0 0 !important;
}
.emp-detail-status-card .emp-detail-row:has(#emp-detail-name) .emp-detail-label { display: none; }
#emp-detail-name {
  font-family: var(--npc-sans) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center;
}
.emp-detail-status-card .emp-detail-row:has(#emp-detail-nickname) {
  order: -2;
  border-bottom: none;
  justify-content: center;
  padding: 2px 0 0 !important;
}
.emp-detail-status-card .emp-detail-row:has(#emp-detail-nickname) .emp-detail-label { display: none; }
#emp-detail-nickname {
  color: var(--npc-steel) !important;
  font-size: 13px !important;
  text-align: center;
}
.emp-detail-status-card .emp-detail-row:has(#emp-detail-level) {
  order: -1;
  border-bottom: none;
  justify-content: center;
  padding: 8px 0 12px !important;
}
.emp-detail-status-card .emp-detail-row:has(#emp-detail-level) .emp-detail-label { display: none; }
#emp-detail-level {
  display: inline-block;
  background: var(--npc-brand);
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700;
  border-radius: 9999px;
  padding: 3px 12px;
  text-align: center;
}

/* Perf cards: bigger score readout (mockup Q-cards) */
.perf-quarter-card { padding: 10px 4px !important; }
.perf-quarter-card .pq-score { font-size: 16px !important; line-height: 1.2; }

/* Work-history rows: hairline-separated table feel */
#emp-detail-progress { background: var(--bg-panel) !important; border: 1px solid var(--npc-hairline) !important; }

/* Lv chip: compact, not full-width */
#emp-detail-level { flex: 0 0 auto !important; }

/* ============================================================
   FILE VIEWER — light card in the house style
   ============================================================ */
#file-viewer-overlay { background: rgba(10, 11, 13, 0.4) !important; }
.fv-card {
  max-width: 800px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--npc-smoke);
  border-radius: 12px;
  overflow: hidden;
}
.fv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--npc-hairline);
  flex: 0 0 auto;
}
.fv-name {
  font-family: var(--npc-sans);
  font-size: 12px;
  font-weight: 500;
  color: #0a0b0d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fv-close {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff !important;
  border: 1px solid var(--npc-smoke) !important;
  border-radius: 6px !important;
  color: #0a0b0d !important;
  font-size: 12px !important;
  cursor: pointer;
  padding: 0 !important;
}
.fv-close:hover { background: #f0f2f5 !important; }
.fv-body {
  padding: 16px;
  overflow-y: auto;
  min-height: 0;
  text-align: left;
}
.fv-scroll { max-height: 68vh; overflow-y: auto; }
.fv-scroll .md-rendered {
  font-family: var(--npc-sans);
  font-size: 13px;
  line-height: 1.6;
  color: #3f4854;
}
.fv-pre {
  margin: 0;
  padding: 12px 14px;
  font-family: var(--npc-sans);
  font-size: 12px;
  line-height: 1.55;
  color: #3f4854;
  background: var(--bg-dark);
  border: 1px solid var(--npc-hairline);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 68vh;
  overflow-y: auto;
}

/* ============================================================
   HEADER v2 — one clean 52px bar: brand left, stats group,
   ghost nav, PROJECT as the single filled CTA, socials, status.
   ============================================================ */
#office-panel .panel-header {
  height: 52px;
  padding: 0 16px !important;
  gap: 16px;
  flex-wrap: nowrap;
  overflow: hidden;
}
#office-panel .panel-header h1.pixel-title {
  font-family: var(--npc-sans) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-logo { width: 26px; height: 26px; }
.brand-sub {
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0.08em !important;
  color: var(--npc-ash) !important;
  text-transform: uppercase;
  white-space: nowrap;
}
#status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: nowrap;
  min-width: 0;
}
/* counters: quiet mono stats separated by hairlines */
#employee-count, #tool-count, #room-count {
  color: var(--npc-ash) !important;
  font-size: 11px !important;
  padding: 0 10px 0 0;
  border-right: 1px solid var(--npc-hairline);
  white-space: nowrap;
}
#room-count { margin-right: 4px; }
/* uniform control height across the bar */
.npc-navbtn, .npc-navbtn-saas {
  height: 30px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.npc-social { width: 30px; height: 30px; }
/* connection status: pill readout */
#connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--npc-hairline);
  border-radius: 9999px;
  padding: 5px 12px;
  white-space: nowrap;
}
#last-sync-time { color: #8a919e !important; white-space: nowrap; }
@media (max-width: 1560px) {
  #office-panel .panel-header .brand-sub { display: none !important; }
  #last-sync-time { display: none !important; }
}

/* ============================================================
   PROJECT EXPLORER — desktop-style icon grid inside #saas-modal
   ============================================================ */
#saas-modal .npc-modal-content { width: min(880px, 94vw) !important; }
.npc-exp-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--npc-hairline);
  margin-bottom: 18px;
}
.npc-exp-name {
  font-family: var(--npc-sans);
  font-size: 20px !important;
  font-weight: 700;
  color: #0a0b0d;
  line-height: 1.2 !important;
}
.npc-exp-meta { font-family: var(--npc-sans); font-size: 11px !important; color: var(--npc-steel); }
.npc-exp-group { margin-bottom: 20px; }
.npc-exp-label {
  font-family: var(--npc-sans);
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--npc-steel);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.npc-exp-label::after { content: ""; flex: 1; height: 1px; background: var(--npc-hairline); }
.npc-exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}
.npc-exp-item {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  padding: 12px 8px 10px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  min-width: 0;
  transition: background 0.1s, border-color 0.1s;
}
.npc-exp-item:hover {
  background: #f0f2f5 !important;
  border-color: var(--npc-hairline) !important;
}
.npc-exp-ico {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--npc-steel);
}
.npc-exp-item:hover .npc-exp-ico { color: var(--npc-brand); }
.npc-exp-ico svg { width: 38px; height: 38px; }
.npc-exp-thumb {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--npc-hairline);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}
.npc-exp-thumb svg { max-width: 36px; max-height: 36px; }
.npc-exp-fname {
  font-family: var(--npc-sans);
  font-size: 11px !important;
  line-height: 1.3 !important;
  color: #3f4854;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* file-viewer add-ons for explorer content */
.fv-logo { padding: 28px; text-align: center; background: var(--bg-dark); border-radius: 6px; }
.fv-logo svg { max-width: 240px; max-height: 240px; }
.fv-page {
  width: 100%;
  height: 68vh;
  border: 1px solid var(--npc-hairline);
  border-radius: 6px;
  background: #ffffff;
}

/* ============================================================
   MODAL TYPOGRAPHY NORMALIZATION — one voice inside windows.
   Headings: Inter 600. Body/data: 12px mono. No more clashing
   sizes from rendered markdown.
   ============================================================ */
.modal-content .modal-body .md-rendered h1,
.modal-content .modal-body .md-rendered h2,
.modal-content .modal-body .md-rendered h3,
.modal-content .modal-body .md-rendered h4,
.fv-scroll .md-rendered h1, .fv-scroll .md-rendered h2,
.fv-scroll .md-rendered h3, .fv-scroll .md-rendered h4 {
  font-family: var(--npc-sans) !important;
  font-weight: 600 !important;
  color: #0a0b0d !important;
  margin: 14px 0 6px !important;
  line-height: 1.35 !important;
}
.modal-content .modal-body .md-rendered h1, .fv-scroll .md-rendered h1 { font-size: 15px !important; }
.modal-content .modal-body .md-rendered h2, .fv-scroll .md-rendered h2 { font-size: 14px !important; }
.modal-content .modal-body .md-rendered h3, .fv-scroll .md-rendered h3,
.modal-content .modal-body .md-rendered h4, .fv-scroll .md-rendered h4 { font-size: 13px !important; }
.md-rendered h1:first-child, .md-rendered h2:first-child, .md-rendered h3:first-child { margin-top: 0 !important; }
.md-rendered p, .md-rendered li { margin: 0 0 8px; }
.md-rendered ul, .md-rendered ol { padding-left: 20px; margin: 0 0 10px; }
.md-rendered code {
  font-family: var(--npc-sans);
  font-size: 11px;
  background: #f0f2f5;
  border: 1px solid var(--npc-hairline);
  border-radius: 4px;
  padding: 1px 5px;
}
.md-rendered pre {
  background: var(--bg-dark);
  border: 1px solid var(--npc-hairline);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
}
.md-rendered pre code { background: none; border: none; padding: 0; }
.md-rendered hr { border: none; border-top: 1px solid var(--npc-hairline); margin: 14px 0; }
.md-rendered strong { color: #0a0b0d; font-weight: 600; }
.md-rendered a { color: var(--npc-brand); }
.md-rendered table { border-collapse: collapse; margin: 0 0 10px; }
.md-rendered th, .md-rendered td { border: 1px solid var(--npc-hairline); padding: 4px 8px; }

/* Explorer content owns the full modal width (upstream .modal-body is flex) */
#saas-content { flex: 1 1 100%; min-width: 0; display: block !important; }

/* ============================================================
   KANBAN PLUGIN CARDS — the plugin injects its own CSS after
   ours (7px fonts, neon phase colors); force the house style.
   ============================================================ */
.kanban-column {
  background: var(--bg-dark) !important;
  border: 1px solid var(--npc-hairline) !important;
  border-radius: 6px !important;
  padding: 8px !important;
}
.kanban-column-title {
  font-family: var(--npc-sans) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--npc-steel) !important;
  text-align: left !important;
  padding: 2px 4px 8px !important;
  margin-bottom: 8px !important;
  border-bottom: 1px solid var(--npc-hairline) !important;
}
.kanban-card {
  background: #ffffff !important;
  border: 1px solid var(--npc-hairline) !important;
  border-left: 2px solid var(--npc-brand) !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  margin-bottom: 8px !important;
  font-size: 12px !important;
}
.kanban-card .card-employee {
  color: #0a0b0d !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}
.kanban-card .card-desc {
  color: #3f4854 !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  margin-top: 4px !important;
}
.kanban-card .card-phase {
  display: inline-block !important;
  background: transparent !important;
  color: var(--npc-brand) !important;
  border: 1px solid var(--npc-hairline) !important;
  font-family: var(--npc-sans) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  padding: 2px 9px !important;
  margin-top: 8px !important;
}
/* phases stay monochrome — one accent voice */
.kanban-card[data-phase="1"], .kanban-card[data-phase="2"],
.kanban-card[data-phase="3"], .kanban-card[data-phase="4"] {
  border-left-color: var(--npc-brand) !important;
}

/* ============================================================
   EMPLOYEE HEADER v3 — identity lives in the window title bar
   (avatar · name (nick) #num · role · dept · level)
   ============================================================ */
.emp-header { display: flex; align-items: center; gap: 12px; }
.emp-head-hidden-title { display: none !important; }
.emp-header .employee-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 8px !important;
  border: 1px solid var(--npc-smoke) !important;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.emp-head-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
.emp-head-row1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--npc-sans);
  font-size: 16px;
  font-weight: 700;
  color: #0a0b0d;
  white-space: nowrap;
  overflow: hidden;
}
#emp-detail-name { font-size: 16px !important; font-weight: 700 !important; text-align: left !important; font-family: var(--npc-sans) !important; }
.emp-head-nick { font-family: var(--npc-sans); font-size: 12px; font-weight: 400; color: var(--npc-steel); }
.emp-head-num { font-family: var(--npc-sans); font-size: 12px; font-weight: 400; color: var(--npc-ash); }
.emp-head-row2 {
  font-family: var(--npc-sans);
  font-size: 11px;
  color: var(--npc-steel);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* neutralize the old v2 chip/hero styles for ids that moved to the header */
#emp-detail-level {
  display: inline !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
#emp-detail-nickname { color: inherit !important; font-size: inherit !important; text-align: left !important; }
.employee-avatar-section { display: none !important; }

/* ============================================================
   PROJECT EXPLORER v2 — mockup layout: icon grid + preview rail
   ============================================================ */
#saas-modal .npc-modal-content { width: min(1020px, 96vw) !important; height: 84vh; }
#saas-modal .modal-body { display: flex; padding: 0 !important; overflow: hidden !important; }
#saas-content { display: flex !important; min-height: 0; }
.npc-exp-shell { display: flex; flex: 1; min-height: 0; min-width: 0; }
.npc-exp-main {
  flex: 1.4;
  min-width: 0;
  padding: 16px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--npc-hairline);
}
.npc-exp-crumb {
  font-family: var(--npc-sans);
  font-size: 11px;
  color: var(--npc-steel);
  margin-bottom: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.npc-exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 6px;
  align-content: start;
}
.npc-exp-item.selected {
  background: #f0f2f5 !important;
  border-color: var(--npc-smoke) !important;
}
.npc-exp-folder .npc-exp-ico svg { width: 42px; height: 42px; }
.npc-exp-upico { color: var(--npc-steel); }
.npc-exp-upico svg { width: 26px !important; height: 26px !important; }

/* preview rail */
.npc-exp-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}
.npc-exp-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--npc-hairline);
  flex: 0 0 auto;
}
.npc-exp-side-name {
  font-family: var(--npc-sans);
  font-size: 14px !important;
  font-weight: 700;
  color: #0a0b0d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.npc-exp-open {
  flex: 0 0 auto;
  font-family: var(--npc-sans) !important;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--npc-brand) !important;
  color: #ffffff !important;
  border: 1px solid var(--npc-brand) !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  cursor: pointer;
}
.npc-exp-open:hover { background: #1a2bdd !important; }
.npc-exp-side-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.55;
  color: #3f4854;
}
.npc-exp-side-foot {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-top: 1px solid var(--npc-hairline);
  font-family: var(--npc-sans);
  font-size: 10px !important;
  color: var(--npc-ash);
}
.npc-exp-prevlogo { padding: 20px; text-align: center; background: var(--bg-dark); border-radius: 6px; }
.npc-exp-prevlogo svg { max-width: 180px; max-height: 180px; }
.npc-exp-previframe { width: 100%; height: 100%; min-height: 300px; border: 1px solid var(--npc-hairline); border-radius: 6px; background: #fff; }
.npc-exp-prevpre {
  margin: 0;
  font-family: var(--npc-sans);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: #3f4854;
}

/* project path in the title bar reads lowercase, like a real path */
#saas-modal .modal-header .pixel-title { text-transform: none !important; font-family: var(--npc-sans) !important; font-size: 13px !important; }

/* ============================================================
   NEW LOGO BRAND — cobalt (#0011c4 family, from the logo's
   #0002ae field) + logo mark in the header. TWITTER is a text
   link button; pump.fun/status chips retired.
   ============================================================ */
.brand-logo {
  border: none !important;
  border-radius: 6px !important;
  background: #0002ae;
}
.npc-navbtn-twitter {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
}
.npc-lore-hero img { background: #0002ae; }

/* Spectator header: no connection chip, no sync time (app.js re-shows them) */
#connection-status, #last-sync-time { display: none !important; }

/* ============================================================
   COINBASE TYPE & SHAPE PASS (DESIGN 2) — fonts + rounding only,
   colors stay ours. Inter = Sans/Text sub, Manrope = Display sub.
   Mono survives strictly for DATA: logs, code, paths, filenames.
   ============================================================ */
:root {
  --npc-display: 'Manrope', var(--npc-sans);
}
body { font-size: 14px !important; line-height: 1.5 !important; }

/* Display voice for big names/heroes */
.npc-exp-name, #emp-detail-name, .saas-prodname,
.npc-lore .npc-lore-hero h2, .emp-head-row1 {
  font-family: var(--npc-display) !important;
  font-weight: 700 !important;
}
/* Panel/modal titles: Sans 600 */
.pixel-title, .modal-header .pixel-title { font-weight: 600 !important; }

/* True-mono islands: data, logs, code, identifiers */
#activity-log, #activity-log *,
.emp-log-viewer, #emp-detail-progress, #emp-detail-logs,
.npc-exp-crumb, .npc-exp-side-foot, .npc-exp-prevpre,
.fv-name, .fv-pre,
.npc-lore .npc-ca, .npc-lore .npc-ca a,
.saas-file-name, .npc-exp-fname,
.npc-stat-value, .emp-head-num,
.md-rendered code, .md-rendered pre, .md-rendered pre * {
  font-family: var(--npc-mono) !important;
}

/* Pills everywhere (buttons 56px/full radius per the guide) */
.npc-navbtn, .npc-navbtn-saas, .npc-navbtn-twitter,
.pixel-btn, .modal-footer button, .npc-exp-open,
.panel-add-btn, .toolbar-icon-btn {
  border-radius: 9999px !important;
}
.modal-close, .fv-close { border-radius: 9999px !important; }
input, select, textarea, .roster-filter-select { border-radius: 8px !important; }

/* Cards & windows: soft Coinbase corners */
#left-top-panel, #left-bottom-panel, #menu-panel, #roster-panel, #console-panel, #office-panel {
  border-radius: 16px !important;
}
.modal-content, .npc-modal-content { border-radius: 20px !important; }
.modal-header { border-radius: 20px 20px 0 0 !important; }
.modal-footer { border-radius: 0 0 20px 20px !important; }
.npc-board-msg, .npc-feed-card, .npc-result-card, .npc-tweet,
.project-card, .fv-card { border-radius: 16px !important; }

/* ============================================================
   MENU PANEL — three icon actions: Docs / Projects / Twitter
   ============================================================ */
.npc-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px;
}
.npc-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 4px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.1s, border-color 0.1s;
}
.npc-menu-item:hover {
  background: #f0f2f5 !important;
  border-color: var(--npc-hairline) !important;
}
.npc-menu-ico {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--npc-brand);
  background: #f0f4ff;
  border-radius: 9999px;
}
.npc-menu-ico svg { width: 20px; height: 20px; }
.npc-menu-label {
  font-family: var(--npc-sans);
  font-size: 13px !important;
  font-weight: 600;
  color: #0a0b0d;
}

/* ============ PROJECT WALL: icon grid + explorer detail ============ */
#project-list { padding: 6px 2px; }
.npc-pw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.npc-pw-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 12px 14px;
  background: #ffffff;
  border: 1px solid var(--npc-hairline, #e3e6ea);
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--npc-sans);
  text-align: center;
  transition: border-color .12s ease, transform .12s ease;
}
.npc-pw-tile:hover { border-color: var(--npc-brand, #0011c4); transform: translateY(-1px); }
.npc-pw-logo {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #f0f4ff; overflow: hidden;
}
.npc-pw-logo svg, .npc-pw-logo img { width: 40px; height: 40px; object-fit: contain; }
.npc-pw-logo-default { color: var(--npc-brand, #0011c4); }
.npc-pw-logo-default svg { width: 26px; height: 26px; }
.npc-pw-name {
  font-size: 13px; font-weight: 600; color: #0a0b0d; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap;
}
.npc-pw-meta { font-size: 11px; color: #7b8794; }

/* detail header: back + crumb title + tabs */
.npc-pw-head {
  display: flex; align-items: center; gap: 12px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid var(--npc-hairline, #e3e6ea);
  margin-bottom: 12px;
  font-family: var(--npc-sans);
}
.npc-pw-back {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--npc-hairline, #e3e6ea);
  background: #ffffff; color: #0a0b0d;
  font-size: 15px; cursor: pointer; line-height: 1;
}
.npc-pw-back:hover { border-color: var(--npc-brand, #0011c4); color: var(--npc-brand, #0011c4); }
.npc-pw-title {
  font-family: var(--npc-mono); font-size: 13px; color: #3f4854;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.npc-pw-tabs { margin-left: auto; display: flex; gap: 6px; }
.npc-pw-tab {
  padding: 6px 16px; border-radius: 9999px;
  border: 1px solid var(--npc-hairline, #e3e6ea);
  background: #ffffff; color: #3f4854;
  font-family: var(--npc-sans); font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.npc-pw-tab.active { background: var(--npc-brand, #0011c4) !important; border-color: var(--npc-brand, #0011c4) !important; color: #ffffff !important; }
.npc-pw-tab:not(.active):hover { border-color: var(--npc-brand, #0011c4); color: var(--npc-brand, #0011c4); }

/* body fills the modal; the explorer stretches inside it */
#project-detail-content { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.npc-pw-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.npc-pw-body .npc-exp-shell { flex: 1; }
#project-list.hidden, #project-detail.hidden { display: none !important; }
/* active tab pills always read white on cobalt (beats the broad [class*="tab"] ink rule) */
.modal-body .project-tab.active, .modal-body .npc-pw-tab.active,
.project-tab.active, .npc-pw-tab.active { color: #ffffff !important; }
/* timeline plugin bars: cobalt, not legacy neon cyan */
.timeline-bar { background: var(--npc-brand, #0011c4) !important; box-shadow: none !important; border-radius: 4px !important; }
