/* Nexus Design System — binding stylesheet
   Light theme (default). Matches Reference/NEXUS-DESIGN-SYSTEM.md §1–§6.
   Every token is mandatory; deviation = design defect. */

:root {
  /* §1.1 Colour tokens — light (default theme) */
  --nexus-bg-app: #F4F6F9;
  --nexus-bg-raised: #FFFFFF;
  --nexus-surface-1: #FFFFFF;
  --nexus-surface-2: #EEF1F6;
  --nexus-surface-3: #E3E8F0;
  --nexus-line-1: #D5DBE5;
  --nexus-line-2: #B9C2D0;
  --nexus-text-1: #1A202B;
  --nexus-text-2: #4E5A6B;
  --nexus-text-3: #7C8798;
  --nexus-accent: #1D5FD6;
  --nexus-accent-fill-text: #FFFFFF;

  /* Semantic palette */
  --nexus-sem-success: #1F7A45;
  --nexus-sem-danger: #B3262E;
  --nexus-sem-warning: #9A6A12;
  --nexus-sem-info: #1D5FD6;

  /* §1.2 Typography scale */
  --nexus-font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --nexus-font-family-mono: "SF Mono", "Cascadia Mono", Consolas, monospace;

  /* §1.3 Spacing scale */
  --nexus-sp-1: 4px;
  --nexus-sp-2: 8px;
  --nexus-sp-3: 12px;
  --nexus-sp-4: 16px;
  --nexus-sp-5: 24px;
  --nexus-sp-6: 32px;
  --nexus-sp-7: 48px;

  /* §1.4 Radius scale */
  --nexus-rad-1: 4px;
  --nexus-rad-2: 8px;
  --nexus-rad-3: 12px;
  --nexus-rad-full: 999px;

  /* §1.6 Motion */
  --nexus-mo-hover: 120ms ease-out;
  --nexus-mo-enter: 180ms cubic-bezier(0.2, 0, 0, 1);
  --nexus-mo-exit: 140ms ease-in;
}

/* Reset and base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  background: var(--nexus-bg-app);
  color: var(--nexus-text-1);
  font-family: var(--nexus-font-family);
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
}

/* §6.1 Header + tab nav — 56px fixed, bg-raised, bottom border line-1 */
.nexus-header {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 var(--nexus-sp-5);
  background: var(--nexus-bg-raised);
  border-bottom: 1px solid var(--nexus-line-1);
  gap: var(--nexus-sp-6);
}

/* Wordmark: "Nexus" + environment tag */
.nexus-wordmark {
  display: flex;
  align-items: baseline;
  gap: var(--nexus-sp-2);
}

.nexus-wordmark-title {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  color: var(--nexus-text-1);
}

.nexus-wordmark-env {
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.06em;
  color: var(--nexus-text-3);
  text-transform: uppercase;
}

/* Navigation tabs */
.nexus-nav {
  display: flex;
  align-items: stretch;
  gap: var(--nexus-sp-5);
  height: 56px;
}

.nexus-nav a {
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: var(--nexus-text-2);
  text-decoration: none;
  padding: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--nexus-mo-hover);
}

.nexus-nav a:hover {
  color: var(--nexus-text-1);
}

.nexus-nav a.active {
  color: var(--nexus-text-1);
  border-bottom-color: var(--nexus-accent);
}

/* Header right controls */
.nexus-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--nexus-sp-4);
}

/* Language toggle — 32px control, active weight 600, inactive text-3 */
.nexus-lang-toggle {
  display: inline-flex;
  align-items: center;
  height: 32px;
  font-size: 13px;
  line-height: 18px;
  gap: var(--nexus-sp-1);
  cursor: pointer;
  user-select: none;
}

.nexus-lang-toggle span {
  color: var(--nexus-text-3);
  transition: color var(--nexus-mo-hover);
}

.nexus-lang-toggle span.active {
  color: var(--nexus-text-1);
  font-weight: 600;
}

.nexus-lang-toggle .separator {
  color: var(--nexus-line-2);
}

/* Sign out button — secondary 32px compact */
.nexus-signout-btn {
  height: 32px;
  padding: 0 var(--nexus-sp-3);
  border: 1px solid var(--nexus-line-2);
  border-radius: var(--nexus-rad-1);
  background: transparent;
  color: var(--nexus-text-2);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  font-family: var(--nexus-font-family);
  cursor: pointer;
  transition: background-color var(--nexus-mo-hover), color var(--nexus-mo-hover);
}

.nexus-signout-btn:hover {
  background: var(--nexus-surface-2);
  color: var(--nexus-text-1);
}

.nexus-signout-btn:focus-visible {
  outline: 2px solid var(--nexus-accent);
  outline-offset: 2px;
}

/* User name display */
.nexus-user-name {
  font-size: 13px;
  line-height: 18px;
  color: var(--nexus-text-2);
}

/* Typography utilities */
.type-page-title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
}

.type-section {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
}

.type-body {
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
}

.type-body-strong {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
}

.type-label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.type-caption {
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

.type-mono {
  font-family: var(--nexus-font-family-mono);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

/* Page container */
.nexus-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--nexus-sp-6);
}

/* Accessibility: focus ring on all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--nexus-accent);
  outline-offset: 2px;
}

/* Report form styles */

/* System button — 40px height, rad-2, with 10x10 system color square */
.system-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: var(--nexus-rad-2);
  border: 1px solid var(--nexus-line-2);
  background: var(--nexus-surface-1);
  color: var(--nexus-text-1);
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
  font-family: var(--nexus-font-family);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--nexus-sp-2);
  transition: background-color var(--nexus-mo-hover), border-color var(--nexus-mo-hover);
}

.system-btn:hover {
  background: var(--nexus-surface-2);
  border-color: var(--nexus-accent);
}

.system-btn.active {
  background: var(--nexus-surface-3);
  border-color: var(--nexus-accent);
  font-weight: 600;
}

.system-indicator {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Platform segmented control — 40px, 3 segments */
.platform-control {
  display: flex;
  height: 40px;
  border: 1px solid var(--nexus-line-2);
  border-radius: var(--nexus-rad-1);
  overflow: hidden;
  align-self: flex-start;
  background: var(--nexus-surface-1);
}

.platform-option {
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  color: var(--nexus-text-2);
  background: transparent;
  border: none;
  border-left: 1px solid var(--nexus-line-2);
  cursor: pointer;
  font-family: var(--nexus-font-family);
  transition: background-color var(--nexus-mo-hover), color var(--nexus-mo-hover);
}

.platform-option:first-child {
  border-left: none;
}

.platform-option:hover:not(.active) {
  background: var(--nexus-surface-2);
  color: var(--nexus-text-1);
}

.platform-option.active {
  background: var(--nexus-surface-3);
  color: var(--nexus-text-1);
  font-weight: 600;
}

/* Form inputs — 40px height, surface-2 fill, line-2 border */
.nexus-input {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--nexus-rad-1);
  border: 1px solid var(--nexus-line-2);
  background: var(--nexus-surface-2);
  color: var(--nexus-text-1);
  font-size: 14px;
  line-height: 22px;
  font-family: var(--nexus-font-family);
  box-sizing: border-box;
  width: 100%;
  transition: border-color var(--nexus-mo-hover);
}

.nexus-input:hover {
  border-color: var(--nexus-accent);
}

.nexus-input:focus {
  border-color: var(--nexus-accent);
}

.nexus-input.error {
  border-color: var(--nexus-sem-danger);
}

.nexus-textarea {
  min-height: 110px;
  padding: 10px 12px;
  border-radius: var(--nexus-rad-1);
  border: 1px solid var(--nexus-line-2);
  background: var(--nexus-surface-2);
  color: var(--nexus-text-1);
  font-size: 14px;
  line-height: 22px;
  font-family: var(--nexus-font-family);
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
  transition: border-color var(--nexus-mo-hover);
}

.nexus-textarea:hover {
  border-color: var(--nexus-accent);
}

.nexus-textarea:focus {
  border-color: var(--nexus-accent);
}

.nexus-textarea.error {
  border-color: var(--nexus-sem-danger);
}

/* Screenshot dropzone */
.screenshot-dropzone {
  border: 1px dashed var(--nexus-line-2);
  border-radius: var(--nexus-rad-2);
  padding: 20px;
  background: var(--nexus-surface-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--nexus-sp-2);
  color: var(--nexus-text-2);
  cursor: pointer;
  transition: border-color var(--nexus-mo-hover);
}

.screenshot-dropzone:hover {
  border-color: var(--nexus-accent);
}

.screenshot-dropzone a {
  color: var(--nexus-accent);
  text-decoration: none;
}

.screenshot-dropzone a:hover {
  text-decoration: underline;
}

/* File list item */
.file-item {
  display: flex;
  align-items: center;
  gap: var(--nexus-sp-2);
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--nexus-line-1);
  border-radius: var(--nexus-rad-1);
  background: var(--nexus-surface-1);
  font-size: 13px;
  line-height: 18px;
}

/* PII warning — sem-warning translucent fill, 10% opacity on light */
.pii-warning {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--nexus-rad-2);
  background: rgba(154, 106, 18, 0.1);
  border: 1px solid var(--nexus-sem-warning);
  color: var(--nexus-text-1);
}

/* Primary button — accent fill, 40px */
.nexus-btn-primary {
  height: 40px;
  padding: 0 20px;
  min-width: 88px;
  border-radius: var(--nexus-rad-2);
  border: none;
  background: var(--nexus-accent);
  color: var(--nexus-accent-fill-text);
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  font-family: var(--nexus-font-family);
  cursor: pointer;
  transition: opacity var(--nexus-mo-hover);
}

.nexus-btn-primary:hover {
  opacity: 0.9;
}

.nexus-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Secondary button — line-2 border, 40px */
.nexus-btn-secondary {
  height: 40px;
  padding: 0 16px;
  min-width: 88px;
  border-radius: var(--nexus-rad-2);
  border: 1px solid var(--nexus-line-2);
  background: transparent;
  color: var(--nexus-text-1);
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  font-family: var(--nexus-font-family);
  cursor: pointer;
  transition: background-color var(--nexus-mo-hover);
}

.nexus-btn-secondary:hover {
  background: var(--nexus-surface-2);
}

/* Incidents page styles */

/* Filter controls bar */
.incidents-filters {
  display: flex;
  gap: var(--nexus-sp-2);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--nexus-sp-4);
}

/* Mine/All toggle */
.filter-toggle {
  display: flex;
  height: 32px;
  border: 1px solid var(--nexus-line-2);
  border-radius: var(--nexus-rad-1);
  overflow: hidden;
  background: var(--nexus-surface-1);
}

.filter-toggle-option {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--nexus-text-2);
  background: transparent;
  border: none;
  border-left: 1px solid var(--nexus-line-2);
  cursor: pointer;
  font-family: var(--nexus-font-family);
  transition: background-color var(--nexus-mo-hover), color var(--nexus-mo-hover);
}

.filter-toggle-option:first-child {
  border-left: none;
}

.filter-toggle-option.active {
  background: var(--nexus-surface-3);
  color: var(--nexus-text-1);
  font-weight: 600;
}

.filter-toggle-option:hover:not(.active) {
  background: var(--nexus-surface-2);
  color: var(--nexus-text-1);
}

/* Filter dropdowns */
.filter-dropdown {
  position: relative;
}

.filter-dropdown-btn {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: var(--nexus-sp-2);
  padding: 0 var(--nexus-sp-3);
  border: 1px solid var(--nexus-line-2);
  border-radius: var(--nexus-rad-1);
  background: var(--nexus-surface-1);
  color: var(--nexus-text-2);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  font-family: var(--nexus-font-family);
  cursor: pointer;
  transition: background-color var(--nexus-mo-hover), color var(--nexus-mo-hover);
}

.filter-dropdown-btn:hover {
  background: var(--nexus-surface-2);
  color: var(--nexus-text-1);
}

.filter-dropdown-menu {
  position: absolute;
  top: 36px;
  left: 0;
  min-width: 200px;
  background: var(--nexus-surface-1);
  border: 1px solid var(--nexus-line-1);
  border-radius: var(--nexus-rad-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: var(--nexus-sp-2);
  z-index: 100;
}

.filter-dropdown-menu label {
  display: flex;
  align-items: center;
  gap: var(--nexus-sp-2);
  padding: var(--nexus-sp-2);
  font-size: 13px;
  line-height: 18px;
  color: var(--nexus-text-1);
  cursor: pointer;
  border-radius: var(--nexus-rad-1);
  transition: background-color var(--nexus-mo-hover);
}

.filter-dropdown-menu label:hover {
  background: var(--nexus-surface-2);
}

.filter-dropdown-menu input[type="checkbox"] {
  cursor: pointer;
}

/* Search input */
.incidents-search {
  height: 32px;
  min-width: 240px;
  padding: 0 var(--nexus-sp-3);
  border: 1px solid var(--nexus-line-2);
  border-radius: var(--nexus-rad-1);
  background: var(--nexus-surface-1);
  display: flex;
  align-items: center;
  gap: var(--nexus-sp-2);
  box-sizing: border-box;
}

.incidents-search svg {
  flex-shrink: 0;
  color: var(--nexus-text-3);
}

.incidents-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  line-height: 18px;
  color: var(--nexus-text-1);
  font-family: var(--nexus-font-family);
  outline: none;
}

.incidents-search input::placeholder {
  color: var(--nexus-text-3);
}

/* Incidents table */
.incidents-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--nexus-surface-1);
  border: 1px solid var(--nexus-line-1);
  border-radius: var(--nexus-rad-2);
  margin-bottom: var(--nexus-sp-4);
}

.incidents-table thead tr {
  height: 40px;
  border-bottom: 1px solid var(--nexus-line-1);
}

.incidents-table th {
  text-align: left;
  padding: 0 var(--nexus-sp-3);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nexus-text-2);
}

.incidents-table tbody tr {
  height: 44px;
  border-bottom: 1px solid var(--nexus-line-1);
  transition: background-color var(--nexus-mo-hover);
}

.incidents-table tbody tr:last-child {
  border-bottom: none;
}

.incidents-table tbody tr:hover {
  background: var(--nexus-surface-2);
}

.incidents-table td {
  padding: 0 var(--nexus-sp-3);
}

/* Stage badge */
.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  white-space: nowrap;
}

/* Priority marker */
.priority-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

/* Incidents footer */
.incidents-footer {
  font-size: 12px;
  line-height: 16px;
  color: var(--nexus-text-3);
  text-align: center;
  padding: var(--nexus-sp-5) 0;
}

/* Incident Detail Page Styles */

.top-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 var(--nexus-sp-5);
  background: var(--nexus-bg-raised);
  border-bottom: 1px solid var(--nexus-line-1);
  gap: var(--nexus-sp-6);
}

.top-bar-brand {
  display: flex;
  align-items: baseline;
  gap: var(--nexus-sp-2);
}

.brand-name {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  color: var(--nexus-text-1);
}

.brand-subtitle {
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.06em;
  color: var(--nexus-text-3);
  text-transform: uppercase;
}

.top-bar-nav {
  display: flex;
  align-items: stretch;
  gap: var(--nexus-sp-5);
  height: 56px;
}

.nav-link {
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: var(--nexus-text-2);
  text-decoration: none;
  padding: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--nexus-mo-hover);
}

.nav-link:hover {
  color: var(--nexus-text-1);
}

.nav-link-active {
  color: var(--nexus-text-1);
  border-bottom-color: var(--nexus-accent);
}

.top-bar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--nexus-sp-4);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 18px;
  gap: var(--nexus-sp-1);
  cursor: pointer;
  user-select: none;
}

.lang-option {
  color: var(--nexus-text-3);
  cursor: pointer;
  transition: color var(--nexus-mo-hover);
}

.lang-option:hover {
  color: var(--nexus-text-1);
}

.lang-active {
  color: var(--nexus-text-1);
  font-weight: 600;
}

.lang-divider {
  color: var(--nexus-line-2);
}

.user-info {
  font-size: 13px;
  line-height: 18px;
  color: var(--nexus-text-2);
}

.sign-out-btn {
  height: 32px;
  padding: 0 var(--nexus-sp-3);
  border: 1px solid var(--nexus-line-2);
  border-radius: var(--nexus-rad-1);
  background: transparent;
  color: var(--nexus-text-2);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  font-family: var(--nexus-font-family);
  cursor: pointer;
  transition: background-color var(--nexus-mo-hover), color var(--nexus-mo-hover);
}

.sign-out-btn:hover {
  background: var(--nexus-surface-2);
  color: var(--nexus-text-1);
}

.incident-detail-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--nexus-sp-6);
}

.incident-detail-content {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-5);
}

.detail-header {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-3);
}

.back-link {
  font-size: 14px;
  line-height: 22px;
  color: var(--nexus-accent);
  text-decoration: none;
  transition: color var(--nexus-mo-hover);
}

.back-link:hover {
  color: var(--nexus-text-1);
  text-decoration: underline;
}

.page-title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  margin: 0;
}

.detail-card {
  background: var(--nexus-surface-1);
  border: 1px solid var(--nexus-line-1);
  border-radius: var(--nexus-rad-2);
  padding: var(--nexus-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-4);
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-2);
}

.detail-label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--nexus-text-2);
}

.incident-number {
  font-family: var(--nexus-font-family-mono);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--nexus-accent);
}

.incident-title {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  margin: 0;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: var(--nexus-sp-2);
  flex-wrap: wrap;
}

.system-marker {
  display: inline-flex;
  align-items: center;
  gap: var(--nexus-sp-2);
  font-size: 13px;
  line-height: 18px;
}

.system-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.incident-description {
  font-size: 14px;
  line-height: 22px;
  color: var(--nexus-text-2);
  margin: 0;
  white-space: pre-wrap;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--nexus-sp-4);
  padding-top: var(--nexus-sp-4);
  border-top: 1px solid var(--nexus-line-1);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-1);
}

.meta-label {
  font-size: 12px;
  line-height: 16px;
  color: var(--nexus-text-3);
}

.meta-value {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--nexus-text-1);
}

.section-title {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  margin: 0;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-3);
}

.history-item {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-1);
  padding: var(--nexus-sp-3);
  background: var(--nexus-surface-2);
  border-radius: var(--nexus-rad-1);
}

.history-time {
  font-size: 12px;
  line-height: 16px;
  color: var(--nexus-text-3);
}

.history-text {
  font-size: 14px;
  line-height: 22px;
  color: var(--nexus-text-1);
}

.history-empty {
  font-size: 14px;
  line-height: 22px;
  color: var(--nexus-text-3);
  text-align: center;
  padding: var(--nexus-sp-5);
}

/* Work controls (service agents and leads only) — §6.3 form controls */
.work-controls {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-4);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-1);
}

.control-label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--nexus-text-2);
}

/* Select dropdown — 40px height, surface-2 fill, line-2 border */
.nexus-select {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--nexus-rad-1);
  border: 1px solid var(--nexus-line-2);
  background: var(--nexus-surface-2);
  color: var(--nexus-text-1);
  font-size: 14px;
  line-height: 22px;
  font-family: var(--nexus-font-family);
  box-sizing: border-box;
  width: 100%;
  cursor: pointer;
  transition: border-color var(--nexus-mo-hover);
}

.nexus-select:hover {
  border-color: var(--nexus-accent);
}

.nexus-select:focus {
  border-color: var(--nexus-accent);
}

.control-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--nexus-sp-2);
}n: column;
  gap: var(--nexus-sp-4);
}

.history-entry {
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-2);
  padding: var(--nexus-sp-3);
  border-left: 2px solid var(--nexus-line-1);
}

.history-header {
  display: flex;
  align-items: center;
  gap: var(--nexus-sp-2);
}

.history-timestamp {
  font-size: 12px;
  line-height: 16px;
  color: var(--nexus-text-3);
  font-family: var(--nexus-font-family-mono);
}

.history-action {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: var(--nexus-text-1);
}

.history-notes {
  font-size: 14px;
  line-height: 22px;
  color: var(--nexus-text-2);
  white-space: pre-wrap;
}

/* Dashboard home page styles */

.nexus-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--nexus-sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-6);
}

/* Count tiles — 4 across, sem-primary background per design requirement */
.dashboard-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--nexus-sp-4);
}

.dashboard-tile {
  background: var(--nexus-surface-1);
  border: 1px solid var(--nexus-line-1);
  border-radius: var(--nexus-rad-2);
  padding: var(--nexus-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-2);
  transition: box-shadow var(--nexus-mo-hover);
}

.dashboard-tile:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tile-count {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  color: var(--nexus-accent);
}

.tile-label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--nexus-text-2);
}

/* Dashboard content — chart and table side by side */
.dashboard-content {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--nexus-sp-6);
  align-items: start;
}

.dashboard-chart-container {
  background: var(--nexus-surface-1);
  border: 1px solid var(--nexus-line-1);
  border-radius: var(--nexus-rad-2);
  padding: var(--nexus-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-4);
  align-items: center;
}

.dashboard-chart-container h2 {
  align-self: flex-start;
}

.dashboard-table-container {
  background: var(--nexus-surface-1);
  border: 1px solid var(--nexus-line-1);
  border-radius: var(--nexus-rad-2);
  padding: var(--nexus-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-4);
}

/* Dashboard table — follows enterprise density (44px rows) */
.nexus-table {
  width: 100%;
  border-collapse: collapse;
}

.nexus-table thead tr {
  height: 40px;
  border-bottom: 1px solid var(--nexus-line-1);
}

.nexus-table th {
  text-align: left;
  padding: 0 var(--nexus-sp-3);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nexus-text-2);
}

.nexus-table tbody tr {
  height: 44px;
  border-bottom: 1px solid var(--nexus-line-1);
  transition: background-color var(--nexus-mo-hover);
}

.nexus-table tbody tr:last-child {
  border-bottom: none;
}

.nexus-table tbody tr:hover {
  background: var(--nexus-surface-2);
  cursor: pointer;
}

.nexus-table td {
  padding: 0 var(--nexus-sp-3);
  font-size: 14px;
  line-height: 22px;
}

/* Responsive: stack tiles on narrow screens */
@media (max-width: 900px) {
  .dashboard-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .dashboard-tiles {
    grid-template-columns: 1fr;
  }
}n: column;
  gap: var(--nexus-sp-3);
}

/* Nexus Assist panel styles — §6.4 */
.assist-panel {
  width: 420px;
  background: var(--nexus-surface-1);
  border: 1px solid var(--nexus-line-1);
  border-radius: var(--nexus-rad-3);
  padding: var(--nexus-sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--nexus-sp-3);
  position: sticky;
  top: 88px;
}

.assist-bubble {
  background: var(--nexus-surface-2);
  border-radius: var(--nexus-rad-2);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 22px;
  max-width: 90%;
  align-self: flex-start;
}

.assist-provenance-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--nexus-rad-full);
  background: rgba(29, 95, 214, 0.1);
  border: 1px solid rgba(29, 95, 214, 0.4);
  color: var(--nexus-accent);
  font-size: 12px;
  flex-shrink: 0;
}

.assist-suggestion-chip {
  border: 1px dashed var(--nexus-line-2);
  border-radius: var(--nexus-rad-2);
  padding: var(--nexus-sp-3);
  display: flex;
  flex-direction: column;
  background: var(--nexus-surface-1);
}n: column;
}

.history-item {
  display: flex;
  gap: var(--nexus-sp-3);
  padding: var(--nexus-sp-2) 0;
  border-bottom: 1px solid var(--nexus-line-1);
}

.history-item:last-child {
  border-bottom: none;
}

.history-time {
  font-family: var(--nexus-font-family-mono);
  font-size: 13px;
  line-height: 18px;
  color: var(--nexus-text-3);
  width: 44px;
  flex-shrink: 0;
}

.history-text {
  font-size: 14px;
  line-height: 20px;
  color: var(--nexus-text-1);
}

.history-empty {
  padding: var(--nexus-sp-5) 0;
  text-align: center;
  font-size: 14px;
  color: var(--nexus-text-3);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }
}
