/* ═══════════════════════════════════════════════════════════════
   nRich Diamond — Workforce Intelligence
   Matches existing dark theme: #0F0F12 bg, #16161D cards,
   #a855f7→#3b82f6 gradient accent, Inter font, white text.
═══════════════════════════════════════════════════════════════ */

/* ── TAB BAR ─────────────────────────────────────────────────── */

.nrd-tab-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  border-bottom: 1px solid #292F41;
  background: #0F0F12;
  padding: 0 16px 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nrd-tab-bar__tabs {
  display: flex;
}

.nrd-theme-switch {
  position: relative;
  align-self: center;
  display: inline-flex;
  margin: 8px 0;
  padding: 3px;
  background: #1E1E28;
  border: 1px solid #292F41;
  border-radius: 10px;
  gap: 0;
}

.nrd-theme-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  border-radius: 7px;
  transition: transform 0.22s ease;
  pointer-events: none;
  z-index: 0;
}

.nrd-theme-switch--light .nrd-theme-switch__thumb {
  transform: translateX(100%);
}

.nrd-theme-switch__opt {
  position: relative;
  z-index: 1;
  min-width: 56px;
  padding: 7px 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.2s;
}

.nrd-theme-switch__opt.is-active {
  color: #fff;
}

.nrd-theme-switch__opt:not(.is-active):hover {
  color: #cbd5e1;
}

.nrd-theme-switch__opt:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

.nrd-tab {
  padding: 18px 28px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #718096;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
  letter-spacing: 0.01em;
}

.nrd-tab:hover {
  color: #e2e8f0;
}

.nrd-tab--active {
  color: #fff;
  border-bottom-color: #a855f7;
  font-weight: 600;
}

.nrd-tab-panel {
  min-height: calc(100vh - 57px);
}

#tab-people {
  background: linear-gradient(135deg, #0F0F12 0%, #11141D 100%);
}

#tab-people .intro-header {
  /* Scroll with page — same behaviour as Your Brand intro header */
  margin-bottom: 40px;
}

#tab-people .logo-section {
  gap: 12px;
}

#tab-people .diamond-logo h1 {
  font-size: 2.5rem;
  color: #fff;
}

#tab-people .logo-subtext {
  margin: 0;
}

/* ── WORKFORCE ROOT ──────────────────────────────────────────── */

#workforce-root {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

/* ── CHAT WORKSPACE ──────────────────────────────────────────── */

.wf-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 24px;
  align-items: start;
  width: 100%;
}

.wf-chat-col {
  min-width: 0;
}

.wf-chat-panel {
  display: flex;
  flex-direction: column;
  background: #16161D;
  border: 1px solid #292F41;
  border-radius: 12px;
  min-height: 560px;
  height: min(640px, calc(100vh - 320px));
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.wf-chat-messages {
  flex: 1 1 auto;
  min-height: 280px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wf-chat-empty {
  text-align: center;
  color: #718096;
  padding: 40px 16px;
  font-size: 14px;
  line-height: 1.6;
}

.wf-chat-empty__hint {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.85;
}

.wf-msg {
  display: flex;
  flex-direction: column;
  max-width: 92%;
}

.wf-msg--user {
  align-self: flex-end;
  align-items: flex-end;
}

.wf-msg--assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.wf-msg__bubble {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
}

.wf-msg--user .wf-msg__bubble {
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  border-bottom-right-radius: 4px;
}

.wf-msg__bubble--assistant {
  background: #1E1E28;
  border: 1px solid #292F41;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.wf-msg__bubble--assistant p {
  margin: 0 0 0.5em;
}

.wf-msg__bubble--assistant p:last-child {
  margin-bottom: 0;
}

.wf-msg__bubble--assistant strong {
  color: #fff;
  font-weight: 600;
}

.wf-msg__badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 4px;
}

.wf-msg__badge--task {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.wf-msg__badge--follow {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.wf-chat-typing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 12px;
  font-size: 13px;
  color: #718096;
}

.wf-chat-composer {
  display: flex;
  flex-shrink: 0;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid #292F41;
  background: #0F0F12;
  align-items: flex-end;
}

.wf-chat-composer .wf-query-input {
  flex: 1;
  width: 100%;
  min-height: 72px;
  max-height: 140px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.5;
}

.wf-chat-composer .wf-query-submit {
  flex-shrink: 0;
  align-self: flex-end;
  min-height: 48px;
  padding: 12px 24px;
}

.wf-panel-col {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.wf-panel-empty {
  background: #16161D;
  border: 1px dashed #292F41;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  color: #718096;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.wf-panel-empty__title {
  color: #e2e8f0;
  font-weight: 600;
  margin-bottom: 8px;
}

.wf-panel-head {
  margin-bottom: 14px;
}

.wf-panel-head__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a855f7;
  margin: 0 0 6px;
}

.wf-panel-head__query {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.4;
}

.wf-panel-head__summary {
  font-size: 12px;
  color: #718096;
  margin: 0;
  line-height: 1.4;
}

.wf-cards--panel {
  margin-bottom: 12px;
}

.wf-cards--panel .wf-card {
  padding: 14px 16px;
  gap: 12px;
}

.wf-cards--panel .wf-card__rank {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.wf-cards--panel .wf-card__score-value {
  font-size: 20px;
}

.wf-cards--loading {
  opacity: 0.5;
  pointer-events: none;
}

.wf-employee-section--compact {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #292F41;
}

.wf-employee-table--compact {
  font-size: 13px;
}

.wf-employee-table--compact th,
.wf-employee-table--compact td {
  padding: 8px 10px;
}

.wf-header {
  margin-bottom: 40px;
  text-align: center;
}

.wf-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.wf-header h1 span {
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wf-header p {
  font-size: 1.1rem;
  color: #e2e8f0;
  opacity: 0.85;
  margin: 0 auto;
  max-width: 560px;
  line-height: 1.6;
  font-weight: 300;
}

/* ── EMPTY STATE ─────────────────────────────────────────────── */

.wf-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.wf-entry-card {
  background: #16161D;
  border: 1px solid #292F41;
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.wf-entry-card:hover {
  border-color: #a855f7;
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(168,85,247,0.15);
}

.wf-entry-card__icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.wf-entry-card__title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 10px;
}

.wf-entry-card__desc {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.6;
  margin: 0 0 16px;
  opacity: 0.8;
}

.wf-entry-card__format {
  text-align: left;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid #292F41;
  border-radius: 10px;
}

.wf-entry-card__format-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a855f7;
}

.wf-entry-card__format-cols {
  display: block;
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #cbd5e1;
  word-break: break-word;
}

.wf-entry-card__format-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #94a3b8;
}

.wf-entry-card__format-note strong {
  color: #e2e8f0;
  font-weight: 600;
}

.wf-entry-card__format-note a {
  color: #a855f7;
  text-decoration: none;
}

.wf-entry-card__format-note a:hover {
  text-decoration: underline;
}

.wf-entry-card__cta {
  display: inline-block;
  padding: 11px 24px;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  color: #ffffff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.wf-entry-card__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(168,85,247,0.4);
}

.wf-entry-card--secondary .wf-entry-card__cta {
  background: transparent;
  border: 2px solid #a855f7;
  color: #a855f7;
}

.wf-entry-card--secondary .wf-entry-card__cta:hover {
  background: rgba(168,85,247,0.1);
  box-shadow: none;
}

.wf-survey-link {
  text-align: center;
  margin-top: 24px;
  color: #718096;
  font-size: 0.9rem;
}

.wf-survey-link a {
  color: #8ebdff;
  text-decoration: underline;
  transition: color 0.2s;
}

.wf-survey-link a:hover {
  color: #fff;
}

/* ── STATUS BAR ──────────────────────────────────────────────── */

.wf-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1E1E28;
  border: 1px solid #292F41;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 28px;
}

.wf-status-bar__info {
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wf-status-bar__info strong {
  color: #a855f7;
}

.wf-sample-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(59,130,246,0.15));
  border: 1px solid rgba(168,85,247,0.3);
  color: #a855f7;
  font-weight: 500;
}

.wf-status-bar__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */

.wf-btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.wf-btn--primary {
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  color: #ffffff;
}

.wf-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(168,85,247,0.35);
}

.wf-btn--ghost {
  background: #1E1E28;
  color: #e2e8f0;
  border: 1px solid #292F41;
}

.wf-btn--ghost:hover {
  border-color: #a855f7;
  color: #a855f7;
}

.wf-btn--danger {
  background: transparent;
  color: #718096;
  border: 1px solid #2A2A38;
}

.wf-btn--danger:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* ── QUERY BOX ───────────────────────────────────────────────── */

.wf-query-section {
  margin-bottom: 32px;
}

.wf-query-section label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.wf-query-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.wf-query-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  border: 1px solid #292F41;
  border-radius: 10px;
  resize: none;
  min-height: 54px;
  line-height: 1.5;
  color: #fff;
  background: #16161D;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.wf-query-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
}

.wf-query-input::placeholder {
  color: #4a5568;
}

.wf-query-submit {
  padding: 14px 28px;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 90px;
}

.wf-query-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(168,85,247,0.4);
}

.wf-query-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── LOADING ─────────────────────────────────────────────────── */

.wf-loading {
  text-align: center;
  padding: 48px 0;
}

.wf-loading__dots {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 16px;
}

.wf-loading__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  animation: wfPulse 1.4s ease-in-out infinite;
}

.wf-loading__dot:nth-child(2) { animation-delay: 0.2s; }
.wf-loading__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes wfPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

.wf-loading__text {
  font-size: 14px;
  color: #718096;
}

/* ── RESULTS ─────────────────────────────────────────────────── */

.wf-results__query-echo {
  font-size: 13px;
  color: #718096;
  margin-bottom: 20px;
  font-style: italic;
}

.wf-results__query-echo strong {
  color: #e2e8f0;
  font-style: normal;
}

/* Narrative */
.wf-narrative {
  background: #16161D;
  border: 1px solid #292F41;
  border-left: 4px solid #a855f7;
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.7;
  color: #e2e8f0;
}

.wf-narrative p {
  margin: 0 0 0.75em;
}

.wf-narrative p:last-child {
  margin-bottom: 0;
}

.wf-narrative strong {
  color: #fff;
  font-weight: 700;
}

/* Cards */
.wf-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.wf-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: #16161D;
  border: 1px solid #292F41;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.wf-card:hover {
  border-color: #2A2A38;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

.wf-card--top {
  border-color: rgba(168,85,247,0.4);
  background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(59,130,246,0.06));
}

.wf-card--top:hover {
  border-color: rgba(168,85,247,0.7);
  box-shadow: 0 8px 20px rgba(168,85,247,0.15);
}

.wf-card__rank {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  background: #2A2A38;
  color: #718096;
}

.wf-card--top .wf-card__rank {
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  color: #ffffff;
}

.wf-card__info {
  flex: 1;
  min-width: 0;
}

.wf-card__name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 2px;
}

.wf-card__role {
  font-size: 13px;
  color: #718096;
  margin: 0 0 10px;
}

.wf-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wf-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.25);
  color: #c084fc;
}

.wf-card__score {
  text-align: right;
  flex-shrink: 0;
}

.wf-card__score-value {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.wf-card--top .wf-card__score-value {
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wf-card__score-label {
  font-size: 11px;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Show more */
.wf-show-more {
  text-align: center;
  margin-top: 4px;
}

.wf-show-more button {
  background: none;
  border: none;
  color: #a855f7;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 20px;
  border-radius: 8px;
  transition: background 0.2s;
}

.wf-show-more button:hover {
  background: rgba(168,85,247,0.1);
}

/* ── EMPLOYEE TABLE ──────────────────────────────────────────── */

.wf-employee-section {
  margin-top: 40px;
  border-top: 1px solid #292F41;
  padding-top: 28px;
}

.wf-employee-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.wf-employee-section__title {
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.wf-employee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #16161D;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #292F41;
}

.wf-employee-table th {
  text-align: left;
  padding: 10px 14px;
  color: #718096;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #1E1E28;
  border-bottom: 1px solid #292F41;
}

.wf-employee-table td {
  padding: 11px 14px;
  color: #e2e8f0;
  border-bottom: 1px solid #1E1E28;
}

.wf-employee-table tr:last-child td {
  border-bottom: none;
}

.wf-employee-table tr:hover td {
  background: rgba(168,85,247,0.04);
}

.wf-employee-table__del {
  background: none;
  border: none;
  color: #2A2A38;
  cursor: pointer;
  font-size: 18px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s;
  line-height: 1;
}

.wf-employee-table__del:hover {
  color: #ef4444;
}

/* ── HISTORY ─────────────────────────────────────────────────── */

.wf-history {
  margin-top: 36px;
  border-top: 1px solid #292F41;
  padding-top: 20px;
}

.wf-history__toggle {
  background: none;
  border: none;
  font-size: 13px;
  color: #718096;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.wf-history__toggle:hover {
  color: #e2e8f0;
}

.wf-history__list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-history__item {
  padding: 14px 18px;
  background: #16161D;
  border: 1px solid #292F41;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.wf-history__item:hover {
  border-color: rgba(168,85,247,0.3);
  background: rgba(168,85,247,0.05);
}

.wf-history__item-query {
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 500;
  margin: 0 0 4px;
}

.wf-history__item-time {
  font-size: 12px;
  color: #4a5568;
}

/* ── TOAST ───────────────────────────────────────────────────── */

.wf-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}

.wf-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.wf-toast--success {
  background: rgba(16, 185, 129, 0.9);
}

.wf-toast--error {
  background: rgba(239, 68, 68, 0.9);
}

.wf-toast--info {
  background: rgba(168, 85, 247, 0.9);
}

/* ── DIVIDER / EMPTY ─────────────────────────────────────────── */

.wf-empty-msg {
  text-align: center;
  padding: 32px;
  color: #4a5568;
  font-size: 14px;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */

@media (max-width: 720px) {
  .wf-workspace {
    grid-template-columns: 1fr;
  }

  .wf-panel-col {
    position: static;
    max-height: none;
  }

  .wf-chat-panel {
    height: auto;
    min-height: 480px;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .wf-entry-grid {
    grid-template-columns: 1fr;
  }

  .wf-query-box,
  .wf-chat-composer {
    flex-direction: column;
  }

  .wf-query-submit {
    width: 100%;
  }

  .nrd-tab {
    padding: 16px 18px;
    font-size: 14px;
  }

  #workforce-root {
    padding: 28px 16px 60px;
  }

  .wf-card {
    flex-wrap: wrap;
  }

  .wf-msg {
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE — simple light screen (toggle: html[data-theme="light"])
═══════════════════════════════════════════════════════════════ */

html[data-theme="light"] body {
  background: #f1f5f9;
  color: #1e293b;
}

html[data-theme="light"] .nrd-tab-bar {
  background: #ffffff;
  border-bottom-color: #e2e8f0;
}

html[data-theme="light"] .nrd-tab {
  color: #64748b;
}

html[data-theme="light"] .nrd-tab:hover {
  color: #334155;
}

html[data-theme="light"] .nrd-tab--active {
  color: #0f172a;
}

html[data-theme="light"] .nrd-theme-switch {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html[data-theme="light"] .nrd-theme-switch__opt {
  color: #64748b;
}

html[data-theme="light"] .nrd-theme-switch__opt.is-active {
  color: #fff;
}

html[data-theme="light"] .nrd-theme-switch__opt:not(.is-active):hover {
  color: #334155;
}

html[data-theme="light"] #tab-people {
  background: #f1f5f9;
}


html[data-theme="light"] #tab-people .diamond-logo h1,
html[data-theme="light"] .intro-header .diamond-logo h1 {
  color: #0f172a;
  text-shadow: none;
}

html[data-theme="light"] .logo-subtext {
  color: #64748b;
}

html[data-theme="light"] .tagline {
  color: #475569;
}

html[data-theme="light"] .intro-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .intro-card h2,
html[data-theme="light"] .explanation-section h3,
html[data-theme="light"] .dimension-item h4,
html[data-theme="light"] .demo-limitations h3 {
  color: #0f172a;
}

html[data-theme="light"] .explanation-section p,
html[data-theme="light"] .benefits-list li,
html[data-theme="light"] .limitations-intro,
html[data-theme="light"] .unavailable-questions li,
html[data-theme="light"] .time-estimate {
  color: #475569;
}

html[data-theme="light"] .dimension-item {
  background: #f8fafc;
  border-left-color: #a855f7;
}

html[data-theme="light"] .dimension-item p {
  color: #64748b;
}

html[data-theme="light"] .demo-limitations {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .start-section {
  border-top-color: #e2e8f0;
}

html[data-theme="light"] .wf-header h1 {
  color: #0f172a;
  text-shadow: none;
}

html[data-theme="light"] .wf-header p {
  color: #475569;
}

html[data-theme="light"] .wf-entry-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .wf-entry-card:hover {
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.12);
}

html[data-theme="light"] .wf-entry-card__title {
  color: #0f172a;
}

html[data-theme="light"] .wf-entry-card__desc,
html[data-theme="light"] .wf-survey-link {
  color: #64748b;
}

html[data-theme="light"] .wf-entry-card__format {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .wf-entry-card__format-cols {
  color: #334155;
}

html[data-theme="light"] .wf-entry-card__format-note {
  color: #64748b;
}

html[data-theme="light"] .wf-entry-card__format-note strong {
  color: #0f172a;
}

html[data-theme="light"] .wf-entry-card__format-note a {
  color: #7c3aed;
}

html[data-theme="light"] .wf-status-bar {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .wf-status-bar__info {
  color: #334155;
}

html[data-theme="light"] .wf-btn--ghost {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

html[data-theme="light"] .wf-btn--danger {
  color: #94a3b8;
  border-color: #e2e8f0;
}

html[data-theme="light"] .wf-query-section label {
  color: #64748b;
}

html[data-theme="light"] .wf-query-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html[data-theme="light"] .wf-query-input::placeholder {
  color: #94a3b8;
}

html[data-theme="light"] .wf-loading__text {
  color: #64748b;
}

html[data-theme="light"] .wf-results__query-echo {
  color: #64748b;
}

html[data-theme="light"] .wf-results__query-echo strong {
  color: #334155;
}

html[data-theme="light"] .wf-narrative {
  background: #ffffff;
  border-color: #e2e8f0;
  border-left-color: #a855f7;
  color: #334155;
}

html[data-theme="light"] .wf-narrative strong {
  color: #0f172a;
}

html[data-theme="light"] .wf-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .wf-card--top {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(59, 130, 246, 0.06));
  border-color: rgba(168, 85, 247, 0.35);
}

html[data-theme="light"] .wf-card__rank {
  background: #e2e8f0;
  color: #64748b;
}

html[data-theme="light"] .wf-card__name {
  color: #0f172a;
}

html[data-theme="light"] .wf-card__role,
html[data-theme="light"] .wf-card__score-label {
  color: #64748b;
}

html[data-theme="light"] .wf-card__score-value {
  color: #0f172a;
}

html[data-theme="light"] .wf-tag {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
  color: #7c3aed;
}

html[data-theme="light"] .wf-employee-section {
  border-top-color: #e2e8f0;
}

html[data-theme="light"] .wf-employee-table {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .wf-employee-table th {
  background: #f8fafc;
  color: #64748b;
  border-bottom-color: #e2e8f0;
}

html[data-theme="light"] .wf-employee-table td {
  color: #334155;
  border-bottom-color: #f1f5f9;
}

html[data-theme="light"] .wf-employee-table tr:hover td {
  background: rgba(168, 85, 247, 0.04);
}

html[data-theme="light"] .wf-history {
  border-top-color: #e2e8f0;
}

html[data-theme="light"] .wf-history__toggle {
  color: #64748b;
}

html[data-theme="light"] .wf-history__toggle:hover {
  color: #334155;
}

html[data-theme="light"] .wf-history__item {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .wf-history__item-query {
  color: #334155;
}

html[data-theme="light"] .wf-empty-msg {
  color: #94a3b8;
}

html[data-theme="light"] .wf-chat-panel {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .wf-chat-composer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

html[data-theme="light"] .wf-msg__bubble--assistant {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

html[data-theme="light"] .wf-msg__bubble--assistant strong {
  color: #0f172a;
}

html[data-theme="light"] .wf-panel-empty {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
}

html[data-theme="light"] .wf-panel-empty__title,
html[data-theme="light"] .wf-panel-head__query {
  color: #0f172a;
}

html[data-theme="light"] .wf-panel-head__summary {
  color: #64748b;
}

/* ── Employee OCEAN profile modal ── */
.wf-card--clickable {
  cursor: pointer;
}

.wf-card--clickable:hover {
  border-color: rgba(139, 92, 246, 0.45);
}

.wf-employee-table__row--clickable {
  cursor: pointer;
}

.wf-employee-table__row--clickable:hover td {
  background: rgba(139, 92, 246, 0.08);
}

.wf-profile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9000;
}

.wf-profile-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9001;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #16161d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px 24px 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.wf-profile-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.wf-profile-modal__close:hover {
  color: #e2e8f0;
}

.wf-profile-modal__name {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
}

.wf-profile-modal__role {
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.wf-profile-modal__intro {
  margin: 0 0 16px;
  font-size: 0.78rem;
  color: #64748b;
}

.wf-ocean-row {
  margin-bottom: 14px;
}

.wf-ocean-row__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.wf-ocean-row__label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #cbd5e1;
}

.wf-ocean-row__score {
  font-size: 0.82rem;
  color: #a78bfa;
  font-weight: 600;
}

.wf-ocean-row__track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.wf-ocean-row__fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  border-radius: 3px;
}

.wf-ocean-row__hint {
  display: block;
  margin-top: 3px;
  font-size: 0.7rem;
  color: #64748b;
}

html[data-theme="light"] .wf-profile-modal {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .wf-profile-modal__name {
  color: #0f172a;
}

html[data-theme="light"] .wf-profile-modal__role,
html[data-theme="light"] .wf-profile-modal__intro,
html[data-theme="light"] .wf-ocean-row__hint {
  color: #64748b;
}

html[data-theme="light"] .wf-ocean-row__label {
  color: #334155;
}

html[data-theme="light"] .wf-ocean-row__track {
  background: #e2e8f0;
}

/* Upload panel — shown inline when user clicks Upload Excel */
.wf-upload-panel {
  background: #16161D;
  border: 2px dashed #292F41;
  border-radius: 12px;
  padding: 40px 32px;
  text-align: center;
  margin-top: 24px;
  transition: border-color 0.2s;
}

.wf-upload-panel.drag-over {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.05);
}

.wf-upload-panel__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.wf-upload-panel__title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
}

.wf-upload-panel__sub {
  font-size: 13px;
  color: #718096;
  line-height: 1.6;
  margin: 0 0 20px;
}

html[data-theme="light"] .wf-upload-panel {
  background: #ffffff;
  border-color: #cbd5e1;
}

html[data-theme="light"] .wf-upload-panel__title {
  color: #0f172a;
}

html[data-theme="light"] .wf-upload-panel__sub {
  color: #64748b;
}
