:root {
  --bg-0: #0d0f12;
  --bg-1: #14171c;
  --bg-2: #1a1e24;
  --surface-1: rgba(27, 31, 37, 0.996);
  --surface-2: rgba(31, 35, 42, 0.996);
  --surface-3: rgba(36, 41, 49, 0.997);
  --surface-4: rgba(43, 49, 58, 0.998);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f5;
  --text-soft: #c0c8d2;
  --text-dim: #8993a2;
  --accent: #7b8796;
  --accent-strong: #d5dde6;
  --accent-soft: rgba(123, 135, 150, 0.14);
  --danger: #d17a84;
  --warning: #d6b67a;
  --success: #8caf9a;
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --radius-lg: 4px;
  --radius-md: 3px;
  --radius-sm: 2px;
  --left-rail-width: 388px;
  --right-rail-width: 360px;
  --menu-shell-height: 28px;
  --crm-action-bar-height: 44px;
  --app-chrome-height: calc(var(--menu-shell-height) + var(--crm-action-bar-height));
  --slash-command-offset: 0px;
  --grid-columns: 48px 124px 174px 176px 168px 178px 178px 150px 188px 144px 118px 148px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #0a0c0f, #0f1217 32%, #13171d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 14%),
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.012) 50%, transparent 100%);
  opacity: 0.4;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(111, 130, 149, 0.55) rgba(11, 15, 20, 0.88);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(11, 15, 20, 0.88);
}

*::-webkit-scrollbar-thumb {
  background: rgba(111, 130, 149, 0.55);
  border: 2px solid rgba(11, 15, 20, 0.88);
  border-radius: 2px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  color: inherit;
  text-align: left;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(21, 24, 29, 0.985);
  color: var(--text);
  padding: 9px 11px;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

textarea:focus,
input:focus,
select:focus,
.ghost-btn:focus-visible,
.primary-btn:focus-visible,
.type-tab:focus-visible,
.menu-root-btn:focus-visible,
.menu-utility-btn:focus-visible,
.menu-command-btn:focus-visible,
.app-rail-btn:focus-visible,
.app-rail-brand:focus-visible,
.rail-handle:focus-visible,
.tree-row:focus-visible,
.grid-row:focus-visible {
  outline: none;
  border-color: rgba(123, 135, 150, 0.46);
  box-shadow: 0 0 0 3px rgba(123, 135, 150, 0.1);
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  --slash-command-offset: 0px;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.app-shell > .crm-action-bar {
  grid-row: 2;
}

.app-shell > .workspace-shell,
.app-shell > .settings-window {
  grid-row: 3;
  align-self: stretch;
  min-height: 0;
}

.app-shell.is-grid-fullscreen {
  padding: 0;
  gap: 0;
}

.app-shell.is-grid-fullscreen .menu-shell {
  display: none;
}

.login-shell {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(10, 12, 15, 0.94), rgba(15, 18, 23, 0.98)),
    radial-gradient(circle at top, rgba(123, 135, 150, 0.16), transparent 42%);
}

.login-panel {
  width: min(100%, 420px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  padding: 28px;
}

.login-panel-wide {
  width: min(100%, 560px);
}

.login-brand {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-panel h1 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.1;
}

.login-copy,
.login-alert,
.login-error {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.login-alert,
.login-error {
  border: 1px solid rgba(214, 182, 122, 0.28);
  border-radius: var(--radius-md);
  background: rgba(214, 182, 122, 0.1);
  padding: 12px;
}

.login-error {
  border-color: rgba(209, 122, 132, 0.35);
  background: rgba(209, 122, 132, 0.1);
  color: #f0c6cb;
}

.login-alert code {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.login-form .primary-btn {
  justify-content: center;
  margin-top: 4px;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-actions .primary-btn,
.login-actions .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.menu-shell {
  position: relative;
  z-index: 40;
  min-height: var(--menu-shell-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 21, 27, 0.998);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.menu-shell-left,
.menu-shell-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.menu-shell-left {
  flex: 0 1 auto;
}

.crm-action-bar {
  position: relative;
  z-index: 39;
  min-height: var(--crm-action-bar-height);
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.085);
  background:
    linear-gradient(180deg, rgba(20, 24, 30, 0.998), rgba(14, 17, 22, 0.998)),
    rgba(14, 17, 22, 0.998);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.034),
    0 1px 0 rgba(0, 0, 0, 0.22);
}

.menu-fast-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 0;
  flex-wrap: nowrap;
}

.menu-fast-groups {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.menu-fast-empty {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  text-transform: uppercase;
}

.menu-fast-label {
  flex: 0 0 auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(123, 135, 150, 0.12);
  border-radius: 2px;
  color: var(--text-dim);
  background: rgba(8, 11, 15, 0.36);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-fast-group {
  flex: 0 0 auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-left: 10px;
  border-left: 1px solid rgba(123, 135, 150, 0.18);
}

.menu-fast-group-primary {
  flex: 0 1 auto;
  min-width: 0;
}

.menu-fast-label + .menu-fast-group {
  padding-left: 0;
  border-left: 0;
}

.menu-fast-label + .menu-fast-groups .menu-fast-group:first-child {
  padding-left: 0;
  border-left: 0;
}

.menu-fast-group-label {
  flex: 0 0 auto;
  padding: 0 2px 0 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.47rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-fast-btn {
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(123, 135, 150, 0.12);
  border-radius: 2px;
  color: var(--text-soft);
  background: rgba(22, 26, 33, 0.82);
  font-size: 0.6rem;
  font-weight: 600;
  white-space: nowrap;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.menu-fast-btn:hover,
.menu-fast-btn:focus-visible,
.menu-fast-btn.is-active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(54, 63, 76, 0.76);
}

.menu-fast-btn.danger-fast-btn {
  color: #f4b4b4;
  border-color: rgba(251, 113, 133, 0.16);
  background: rgba(69, 25, 31, 0.55);
}

.menu-fast-btn.danger-fast-btn:hover,
.menu-fast-btn.danger-fast-btn:focus-visible {
  color: #ffe1e1;
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(127, 29, 29, 0.36);
}

.menu-fast-btn.is-unavailable,
.menu-fast-btn.is-unavailable:hover,
.menu-fast-btn.is-unavailable:focus-visible {
  cursor: not-allowed;
  color: rgba(137, 147, 162, 0.62);
  border-color: rgba(123, 135, 150, 0.075);
  background: rgba(12, 15, 19, 0.58);
  box-shadow: none;
}

.menu-fast-btn.danger-fast-btn.is-unavailable,
.menu-fast-btn.danger-fast-btn.is-unavailable:hover,
.menu-fast-btn.danger-fast-btn.is-unavailable:focus-visible {
  color: rgba(209, 122, 132, 0.56);
  border-color: rgba(251, 113, 133, 0.08);
  background: rgba(32, 16, 20, 0.5);
}

.crm-action-target {
  flex: 0 1 320px;
  min-width: 160px;
  max-width: 360px;
  min-height: 28px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(123, 135, 150, 0.11);
  border-radius: 2px;
  color: var(--text-soft);
  background: rgba(9, 12, 17, 0.58);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-action-target.is-empty {
  color: var(--text-dim);
}

.crm-selection-summary {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 6px 0 9px;
  border: 1px solid rgba(123, 135, 150, 0.12);
  border-radius: 2px;
  color: var(--text-soft);
  background: rgba(12, 15, 20, 0.66);
  white-space: nowrap;
}

.crm-selection-summary.is-empty {
  color: var(--text-dim);
  background: rgba(8, 11, 15, 0.42);
}

.crm-selection-label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-selection-summary strong {
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.crm-selection-chip-btn {
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(123, 135, 150, 0.16);
  border-radius: 2px;
  color: var(--text-soft);
  background: rgba(31, 37, 47, 0.78);
  font-size: 0.53rem;
  font-weight: 700;
}

.crm-selection-chip-btn:hover,
.crm-selection-chip-btn:focus-visible {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(55, 65, 81, 0.82);
}

.crm-selection-chip-btn.is-unavailable,
.crm-selection-chip-btn:disabled {
  cursor: not-allowed;
  color: rgba(137, 147, 162, 0.58);
  border-color: rgba(123, 135, 150, 0.08);
  background: rgba(12, 15, 19, 0.48);
}

.crm-selection-clear-btn[hidden] {
  display: none;
}

.crm-action-tooltip {
  position: absolute;
  left: var(--crm-action-tooltip-left, 8px);
  top: calc(100% + 6px);
  z-index: 85;
  max-width: min(360px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 3px;
  color: var(--text);
  background: rgba(12, 15, 20, 0.97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.35;
  pointer-events: none;
}

.crm-action-tooltip[hidden] {
  display: none;
}

@media (max-width: 1400px) {
  .menu-fast-label,
  .crm-action-target {
    display: none;
  }

  .menu-fast-label + .menu-fast-group {
    padding-left: 0;
    border-left: 0;
  }
}

.menu-shell-right {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.menu-brand {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-right: 8px;
  margin-right: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #f6f8fb;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.menu-bar {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: nowrap;
}

.menu-root {
  position: relative;
}

.menu-root-btn,
.menu-utility-btn,
.menu-command-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 2px;
  color: var(--text-soft);
  font-size: 0.68rem;
  border: 1px solid transparent;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.menu-root-btn {
  font-weight: 500;
}

.menu-root-btn:hover,
.menu-root-btn.is-open,
.menu-utility-btn:hover,
.menu-utility-btn.is-active,
.menu-command-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(49, 57, 68, 0.78);
}

.menu-command-btn {
  font-family: var(--font-mono);
  letter-spacing: 0.015em;
  background: rgba(38, 45, 55, 0.82);
  border-color: rgba(123, 135, 150, 0.16);
}

.menu-utility-btn-hidden {
  display: none;
}

.menu-status-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.menu-filter-summary {
  min-width: 180px;
  max-width: min(520px, 38vw);
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  background: rgba(14, 17, 22, 0.92);
}

.menu-filter-summary.has-filters {
  border-color: rgba(139, 153, 167, 0.2);
  background: rgba(22, 27, 34, 0.98);
}

.menu-filter-summary strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-filter-clear-btn {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin-top: 2px;
  padding: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.47rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.menu-filter-clear-btn:hover {
  color: var(--text);
}

.menu-pagination {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  background: rgba(20, 24, 30, 0.96);
}

.menu-pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-height: 18px;
  border-radius: 2px;
  border: 1px solid transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease,
    opacity 120ms ease;
}

.menu-pagination-btn:hover:not(:disabled),
.menu-pagination-btn:focus-visible:not(:disabled) {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(60, 68, 79, 0.8);
}

.menu-pagination-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.menu-pagination-label {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-pagination-jump-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.menu-pagination-jump-wrap span {
  color: var(--text-soft);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.49rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-pagination-jump-input {
  width: 58px;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  color: var(--text);
  background: rgba(13, 17, 22, 0.94);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.menu-pagination-jump-input:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.menu-pagination-jump-btn {
  width: auto;
  padding: 0 6px;
  text-transform: uppercase;
}

.menu-pagination-size-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.menu-pagination-size-wrap span {
  color: var(--text-soft);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.49rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-pagination-size-select {
  min-height: 18px;
  padding: 0 16px 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  color: var(--text);
  background: rgba(13, 17, 22, 0.94);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-pagination-size-select:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.menu-status-chip {
  min-width: 84px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  background: rgba(14, 17, 22, 0.92);
}

.menu-status-label {
  display: block;
  margin-bottom: 2px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.47rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-status-chip strong {
  display: block;
  color: var(--text);
  font-size: 0.61rem;
  font-weight: 600;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 264px;
  padding: 3px;
  display: grid;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 6px 6px;
  background: rgba(15, 18, 23, 0.998);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.menu-panel-group {
  position: relative;
}

.menu-panel-item {
  position: relative;
  min-height: 32px;
  padding: 4px 7px 4px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 2px;
  color: var(--text-soft);
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.68rem;
}

.menu-panel-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 2px;
}

.menu-panel-item.is-checked::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 700;
}

.menu-panel-item:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(53, 61, 74, 0.7);
}

.menu-panel-item.is-open {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(46, 54, 64, 0.76);
}

.menu-panel-item span {
  white-space: nowrap;
}

.menu-panel-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.menu-panel-copy span {
  white-space: normal;
}

.menu-panel-title {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-panel-desc {
  max-width: 220px;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 0.52rem;
  font-weight: 500;
  line-height: 1.18;
  text-overflow: ellipsis;
}

.menu-panel .menu-panel-item kbd,
.menu-subpanel .menu-panel-item kbd {
  min-width: 18px;
  min-height: 16px;
  padding: 0 4px;
  font-size: 0.54rem;
}

.menu-panel-item-has-children {
  padding-right: 6px;
}

.menu-submenu-affordance {
  margin-left: auto;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1;
}

.menu-subpanel {
  position: absolute;
  top: -1px;
  left: calc(100% + 1px);
  min-width: 278px;
  padding: 3px;
  display: grid;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(13, 16, 21, 0.998);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.menu-divider {
  height: 1px;
  margin: 4px 2px;
  background: rgba(255, 255, 255, 0.08);
}

.danger-item {
  color: var(--danger);
}

.workspace-shell {
  --left-width: var(--left-rail-width);
  --right-width: var(--right-rail-width);
  position: relative;
  height: 100%;
  padding-top: var(--slash-command-offset);
  display: grid;
  grid-template-columns: var(--left-width) minmax(0, 1fr) var(--right-width);
  overflow: hidden;
  background: rgba(18, 21, 27, 0.997);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: padding-top 150ms ease;
}

.workspace-shell.is-left-collapsed {
  --left-width: 0px;
}

.workspace-shell.is-right-collapsed {
  --right-width: 0px;
}

.workspace-shell.is-zen {
  --left-width: 0px;
  --right-width: 0px;
}

.workspace-shell.is-grid-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 30;
  height: 100dvh;
  grid-template-columns: 0px minmax(0, 1fr) 0px;
  border-radius: 0;
}

.workspace-shell.is-resizing-columns,
.workspace-shell.is-resizing-columns * {
  cursor: col-resize !important;
  user-select: none;
}

.workspace-shell:not(.is-left-collapsed) #toggleLeftRailBtn,
.workspace-shell:not(.is-right-collapsed) #toggleRightRailBtn,
.workspace-shell.is-zen #toggleZenModeBtn {
  background: rgba(31, 37, 44, 0.994);
  color: #e1e7ee;
  border-color: rgba(123, 135, 150, 0.28);
}

.left-rail,
.right-rail {
  min-width: 0;
  overflow: hidden;
  display: grid;
  background: var(--surface-2);
}

.left-rail {
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(28, 33, 40, 0.94), rgba(22, 26, 32, 0.92));
}

.right-rail {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(20, 24, 30, 0.996);
}

.workspace-shell.is-left-collapsed .left-rail,
.workspace-shell.is-right-collapsed .right-rail,
.workspace-shell.is-zen .left-rail,
.workspace-shell.is-zen .right-rail,
.workspace-shell.is-grid-fullscreen .left-rail,
.workspace-shell.is-grid-fullscreen .right-rail,
.workspace-shell.is-grid-fullscreen .rail-handle {
  visibility: hidden;
}

.workspace-shell.is-grid-fullscreen .top-bar,
.workspace-shell.is-grid-fullscreen .metric-strip,
.workspace-shell.is-grid-fullscreen .grid-toolbar {
  display: none;
}

.workspace-shell.is-grid-fullscreen .workspace-main {
  grid-template-rows: minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(21, 24, 29, 1), rgba(18, 21, 26, 1)),
    rgba(18, 21, 26, 1);
}

.workspace-shell.is-grid-fullscreen .grid-frame {
  height: 100dvh;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(33, 38, 46, 0.54), rgba(27, 31, 37, 0.16));
}

.rail-header-right {
  background: rgba(24, 28, 34, 0.996);
}

.rail-header h1,
.rail-header h2,
.panel-header h2,
.panel-header h3,
.top-bar h2,
.empty-state h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.eyebrow {
  margin: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(14, 17, 22, 0.98);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(27, 31, 37, 0.995);
}

.compact-btn {
  min-width: 70px;
}

.left-panel,
.right-panel {
  min-height: 0;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.right-panel-fill {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.intake-actions-panel,
.composer-panel,
.tree-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
}

.tree-panel {
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.intake-actions-panel {
  overflow: hidden;
}

.composer-panel {
  overflow: auto;
  padding-bottom: 20px;
}

.feed-tree {
  overflow: auto;
  padding-right: 4px;
  padding-top: 2px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--text-soft);
  font-size: 0.79rem;
  letter-spacing: 0.01em;
}

.field-grid,
.automation-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.type-tab,
.ghost-btn,
.primary-btn {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: rgba(16, 19, 24, 0.985);
  color: var(--text-soft);
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.type-tab:hover,
.ghost-btn:hover,
.primary-btn:hover {
  border-color: rgba(123, 135, 150, 0.2);
  color: var(--text);
  background: rgba(25, 30, 37, 0.985);
  box-shadow: none;
}

.type-tab.is-active {
  background: rgba(27, 34, 43, 0.992);
  border-color: rgba(123, 135, 150, 0.24);
  color: var(--text);
}

.primary-btn {
  background: rgba(56, 65, 76, 0.96);
  color: #f3f7fc;
  border-color: rgba(132, 142, 154, 0.26);
}

.danger-btn {
  color: var(--danger);
}

.toggle-stack {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(14, 17, 22, 0.88);
}

.toggle-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.toggle-row input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-row > * {
  flex: 1 1 0;
}

.action-row.secondary > * {
  flex-basis: calc(33.333% - 8px);
}

.preview-card,
.summary-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(18, 21, 27, 0.94);
  overflow: hidden;
}

.legacy-rail-cache {
  display: none !important;
}

.filters-toolbar-panel,
.filters-overview-panel,
.filters-builder-panel {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
}

.filters-builder-panel {
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}

.filters-query-card {
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.028);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.018);
}

.filters-query-card span {
  color: rgba(192, 201, 212, 0.82);
  font-size: 0.68rem;
  font-weight: 600;
}

.filters-rail-header {
  align-items: flex-start;
}

.filters-rail-title {
  display: grid;
  gap: 1px;
}

.filters-rail-title h1 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #dee4ec;
}

.filters-rail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rail-close-btn,
.filters-add-btn {
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.filters-rail-actions .ghost-btn {
  border-color: rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.018);
  color: var(--text-soft);
}

.filters-rail-actions .ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.filters-toolbar-panel .field,
.filters-builder-panel .field {
  gap: 4px;
}

.filters-toolbar-panel .field span,
.filters-builder-panel .field span {
  color: rgba(192, 201, 212, 0.82);
  font-size: 0.68rem;
}

.filters-toolbar-panel input,
.filters-toolbar-panel select,
.filters-builder-panel input,
.filters-builder-panel select {
  min-height: 28px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.04);
  color: #e0e6ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.012);
}

.filters-builder-panel input:hover,
.filters-builder-panel select:hover {
  background: rgba(255, 255, 255, 0.038);
  border-color: rgba(255, 255, 255, 0.055);
}

.filters-results-line {
  display: flex;
  justify-content: flex-start;
}

.filters-card-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 4px;
  padding-right: 6px;
  align-content: start;
  grid-auto-rows: max-content;
}

.filter-card {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.028);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.008);
}

.filters-empty-state {
  display: grid;
  gap: 4px;
  padding: 4px 0;
  background: transparent;
  border: 0;
}

.filter-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.filter-card-title {
  color: rgba(192, 201, 212, 0.74);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.filter-card-remove,
.filter-show-more-btn {
  min-height: 20px;
  padding: 0 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(137, 147, 162, 0.9);
  text-align: right;
  font-size: 0.68rem;
}

.filter-card-remove:hover,
.filter-show-more-btn:hover {
  color: var(--text);
  background: transparent;
}

.filter-logic-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  min-height: 14px;
  padding: 0 2px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: rgba(137, 147, 162, 0.76);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-logic-chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.filter-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.filters-empty-state strong {
  font-size: 0.82rem;
  font-weight: 600;
}

.filters-empty-state p,
.filter-empty-inline {
  margin: 0;
  color: rgba(192, 201, 212, 0.74);
  font-size: 0.74rem;
  line-height: 1.45;
}

.filter-option-note {
  margin: 0;
  color: rgba(137, 147, 162, 0.82);
  font-size: 0.66rem;
  line-height: 1.35;
}

.filter-option-list {
  display: grid;
  gap: 4px;
  max-height: 116px;
  overflow: auto;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.028);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.015);
}

.filter-option-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  color: rgba(214, 221, 230, 0.88);
  font-size: 0.73rem;
  min-height: 24px;
}

.filter-option-row + .filter-option-row {
  border-top: 1px solid rgba(255, 255, 255, 0.018);
}

.filter-option-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #8b99a7;
}

.filter-option-row.is-selected {
  color: var(--text);
  font-weight: 600;
}

.filter-manual-value-field {
  margin-top: 2px;
}

.filter-number-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.filters-builder-panel .field {
  gap: 2px;
}

.filters-builder-panel .field span {
  font-size: 0.67rem;
}

.filter-show-more-btn {
  justify-self: end;
}

.filters-clear-btn {
  min-height: 22px;
  padding: 0 6px;
  color: rgba(137, 147, 162, 0.9);
  font-size: 0.7rem;
  border: 0;
  background: transparent;
}

.filters-clear-btn:hover {
  color: var(--text);
}

.filters-footer-panel {
  display: grid;
  gap: 8px;
  align-content: start;
  border-top: 1px solid rgba(255, 255, 255, 0.035);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(17, 20, 25, 0.22) 42%, rgba(17, 20, 25, 0.48));
}

.filters-footer-actions {
  display: grid;
  gap: 8px;
}

.filters-footer-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.filters-footer-actions .ghost-btn,
.filters-footer-actions .primary-btn {
  width: 100%;
  min-height: 34px;
  justify-content: center;
  text-align: center;
}

.filters-footer-actions .ghost-btn {
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.028);
  color: #d4dce6;
}

.filters-footer-actions .ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  color: #eef3f8;
}

.filters-save-btn {
  gap: 7px;
}

.save-report-icon {
  position: relative;
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1px solid currentColor;
  border-radius: 1px;
  color: rgba(218, 226, 236, 0.82);
  flex: 0 0 auto;
}

.save-report-icon::before,
.save-report-icon::after {
  position: absolute;
  content: "";
  left: 2px;
  right: 2px;
  border-radius: 1px;
  background: currentColor;
}

.save-report-icon::before {
  top: 2px;
  height: 3px;
}

.save-report-icon::after {
  bottom: 1px;
  height: 1px;
}

.filters-execute-btn {
  background: rgba(86, 112, 142, 0.9);
  border-color: rgba(132, 158, 188, 0.26);
  color: #f3f7fc;
}

.filters-execute-btn:hover {
  background: rgba(95, 123, 155, 0.96);
  border-color: rgba(145, 170, 198, 0.3);
}

.filters-results-summary {
  display: grid;
  gap: 1px;
}

.filters-results-summary strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: #dde4ec;
}

.filters-results-summary span {
  color: rgba(137, 147, 162, 0.88);
  font-size: 0.68rem;
}

.compact-card {
  min-height: 128px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(24, 28, 34, 0.94);
  color: var(--text-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.preview-body {
  min-height: 108px;
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.workspace-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  background: rgba(16, 19, 24, 0.996);
}

.top-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 12px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(24, 28, 34, 0.996);
}

.top-bar-copy,
.top-bar-actions {
  display: grid;
  gap: 12px;
}

.top-bar-actions {
  justify-items: end;
}

.breadcrumb-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: var(--text-dim);
  font-size: 0.74rem;
}

.crumb.is-current {
  color: var(--text);
}

.title-line h2 {
  font-size: 1.12rem;
  font-weight: 600;
}

.connector-cluster {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.connector-pill {
  min-width: 110px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(14, 17, 22, 0.98);
}

.pill-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(27, 30, 36, 0.994);
}

.metric-card {
  min-width: 0;
  padding: 11px 13px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  background: rgba(22, 26, 32, 0.98);
}

.metric-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.34rem;
  line-height: 1;
}

.metric-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.77rem;
  line-height: 1.5;
}

.grid-toolbar {
  display: grid;
  gap: 8px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(22, 25, 31, 0.994);
}

.grid-toolbar-row {
  display: grid;
  align-items: center;
  gap: 12px;
}

.grid-toolbar-row-primary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.grid-toolbar-row-secondary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.toolbar-search,
.toolbar-action-cluster,
.toolbar-shortcuts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-search {
  min-width: 0;
}

.toolbar-search input {
  min-width: 280px;
  flex: 1;
}

.toolbar-search select {
  width: auto;
  min-width: 146px;
}

.toolbar-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.toolbar-tag-cluster {
  justify-content: flex-end;
}

.toolbar-section-label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tagging-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(18, 21, 27, 0.92);
}

.tagging-controls input {
  width: 180px;
  min-height: 34px;
  padding: 8px 10px;
}

.tagging-controls .ghost-btn {
  min-height: 34px;
  white-space: nowrap;
}

kbd {
  min-width: 22px;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(18, 21, 26, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.grid-frame {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(13, 16, 21, 0.98);
}

.grid-viewport {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.grid-header {
  position: sticky;
  top: 0;
  z-index: 3;
  overflow: visible;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(33, 38, 45, 0.996);
  color: #b7c0cc;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  will-change: transform;
}

.grid-body {
  min-height: 0;
  overflow: visible;
  background: rgba(13, 16, 21, 0.99);
}

.fields-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 34;
  width: min(340px, calc(100vw - 48px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  background: rgba(19, 23, 29, 0.985);
  box-shadow:
    -12px 0 34px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  color: var(--text);
  overflow: hidden;
  contain: layout paint;
}

.fields-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fields-panel-header h3 {
  margin: 2px 0 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.fields-panel-copy {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.73rem;
  line-height: 1.55;
}

.fields-panel-search {
  min-height: 30px;
  padding: 6px 9px;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(12, 15, 20, 0.84);
  font-size: 0.76rem;
}

.fields-panel-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 3px;
  align-content: start;
  padding-right: 4px;
}

.fields-panel-row {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--text-soft);
  cursor: pointer;
}

.fields-panel-row:hover {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.fields-panel-row.is-hidden {
  color: var(--text-dim);
  opacity: 0.76;
}

.fields-panel-row input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.fields-panel-row-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.fields-panel-row-copy strong,
.fields-panel-row-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fields-panel-row-copy strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
}

.fields-panel-row-copy small {
  color: var(--text-dim);
  font-size: 0.66rem;
}

.fields-panel-row em {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fields-panel-empty {
  padding: 10px 8px;
  color: var(--text-dim);
  font-size: 0.74rem;
}

.fields-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-size: 0.7rem;
}

.fields-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fields-panel-actions .ghost-btn,
.fields-panel-header .ghost-btn {
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.7rem;
}

.row-grid {
  display: grid;
  grid-template-columns: var(--grid-columns);
  align-items: stretch;
  min-width: max-content;
}

.grid-header .cell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 9px 10px 8px;
  padding-right: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  cursor: grab;
  user-select: none;
}

.grid-header .cell.is-active-column {
  background: rgba(39, 45, 53, 0.98);
  color: #eef2f7;
  box-shadow: inset 0 -1px 0 rgba(123, 135, 150, 0.28);
}

.grid-header .cell.is-dragging {
  opacity: 0.46;
  background: rgba(39, 45, 53, 0.78);
  cursor: grabbing;
}

.grid-header .cell.is-drop-before::after,
.grid-header .cell.is-drop-after::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(198, 206, 217, 0.82);
  box-shadow: 0 0 0 1px rgba(198, 206, 217, 0.12);
  pointer-events: none;
}

.grid-header .cell.is-drop-before::after {
  left: -1px;
}

.grid-header .cell.is-drop-after::after {
  right: -1px;
}

.grid-header-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.grid-col-resize-handle {
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 10px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: col-resize;
}

.grid-col-resize-handle::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 4px;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 120ms ease, box-shadow 120ms ease;
}

.grid-header .cell:hover .grid-col-resize-handle::before,
.grid-col-resize-handle:hover::before,
.workspace-shell.is-resizing-columns .grid-col-resize-handle::before {
  background: rgba(123, 135, 150, 0.66);
  box-shadow: 0 0 0 1px rgba(123, 135, 150, 0.16);
}

.grid-row {
  position: relative;
  min-width: max-content;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: #c8d0da;
  background: transparent;
  cursor: pointer;
}

.grid-row:hover {
  background: rgba(29, 35, 42, 0.72);
}

.grid-row.is-account,
.grid-row.is-company {
  background: rgba(24, 29, 35, 0.94);
  color: #eef1f5;
}

.grid-row.is-account:hover,
.grid-row.is-company:hover {
  background: rgba(31, 37, 44, 0.96);
}

.grid-row.is-contact {
  background: rgba(16, 20, 25, 0.88);
}

.grid-row.is-contact.is-routed {
  background:
    linear-gradient(90deg, rgba(126, 190, 140, 0.16), rgba(126, 190, 140, 0.06) 30%, transparent 62%),
    rgba(17, 25, 19, 0.94);
  box-shadow: inset 2px 0 0 rgba(126, 190, 140, 0.58);
}

.grid-row.is-contact.is-routed:hover {
  background:
    linear-gradient(90deg, rgba(126, 190, 140, 0.2), rgba(126, 190, 140, 0.075) 30%, transparent 62%),
    rgba(22, 31, 24, 0.97);
}

.grid-row.is-email {
  background: rgba(12, 15, 20, 0.9);
}

.grid-row.is-selected {
  box-shadow: inset 2px 0 0 rgba(123, 135, 150, 0.52);
  background: rgba(27, 35, 44, 0.9);
}

.grid-row.is-range-selected {
  box-shadow: inset 2px 0 0 rgba(196, 168, 92, 0.62);
  background:
    linear-gradient(90deg, rgba(196, 168, 92, 0.14), rgba(196, 168, 92, 0.045) 26%, transparent 58%),
    rgba(31, 33, 25, 0.92);
}

.grid-row.is-range-selected:hover {
  background:
    linear-gradient(90deg, rgba(196, 168, 92, 0.17), rgba(196, 168, 92, 0.058) 26%, transparent 58%),
    rgba(35, 38, 28, 0.95);
}

.grid-row.is-focused {
  background:
    linear-gradient(90deg, rgba(123, 135, 150, 0.14), rgba(123, 135, 150, 0.035) 18%, transparent 42%),
    rgba(23, 29, 36, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(123, 135, 150, 0.12),
    inset 0 -1px 0 rgba(123, 135, 150, 0.12);
  z-index: 2;
}

.grid-row.is-contact.is-routed.is-focused {
  background:
    linear-gradient(90deg, rgba(126, 190, 140, 0.21), rgba(126, 190, 140, 0.08) 20%, transparent 44%),
    rgba(24, 34, 27, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(126, 190, 140, 0.16),
    inset 0 -1px 0 rgba(126, 190, 140, 0.16);
}

.grid-row.is-range-selected.is-focused {
  background:
    linear-gradient(90deg, rgba(196, 168, 92, 0.18), rgba(196, 168, 92, 0.07) 18%, transparent 42%),
    rgba(36, 38, 30, 0.97);
  box-shadow:
    inset 0 1px 0 rgba(196, 168, 92, 0.14),
    inset 0 -1px 0 rgba(196, 168, 92, 0.14);
}

.grid-row.is-focused::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: rgba(123, 135, 150, 0.46);
}

.grid-row.is-contact.is-routed.is-focused::before {
  background: rgba(144, 208, 157, 0.7);
}

.grid-row.is-range-selected.is-focused::before {
  background: rgba(214, 188, 112, 0.72);
}

.grid-row .cell {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  line-height: 1.45;
  transition:
    background 120ms ease,
    box-shadow 120ms ease,
    color 120ms ease;
}

.grid-row .cell.is-focused-cell {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(36, 43, 51, 0.98), rgba(29, 35, 42, 0.98));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.grid-row.is-selected .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(39, 48, 58, 0.98), rgba(31, 39, 47, 0.98));
}

.grid-row.is-range-selected .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(49, 46, 36, 0.98), rgba(39, 37, 29, 0.98));
  box-shadow: inset 0 1px 0 rgba(225, 204, 143, 0.06);
}

.grid-row.is-contact.is-routed .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(33, 44, 35, 0.98), rgba(26, 37, 29, 0.98));
  box-shadow: inset 0 1px 0 rgba(176, 224, 186, 0.07);
}

.grid-row.is-contact.is-routed.is-selected .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(38, 50, 40, 0.98), rgba(29, 40, 31, 0.98));
}

.grid-row.is-range-selected.is-contact.is-routed .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(50, 49, 38, 0.98), rgba(38, 39, 30, 0.98));
  box-shadow: inset 0 1px 0 rgba(227, 208, 146, 0.06);
}

.grid-row .cell.is-focused-cell::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 2px;
  background: rgba(123, 135, 150, 0.5);
}

.grid-row.is-contact.is-routed .cell.is-focused-cell::after {
  background: rgba(144, 208, 157, 0.68);
}

.grid-row.is-range-selected .cell.is-focused-cell::after {
  background: rgba(214, 188, 112, 0.7);
}

.tag-chip-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tag-chip-row.is-muted-row {
  opacity: 0.72;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(123, 135, 150, 0.12);
  border-radius: 2px;
  background: rgba(24, 31, 39, 0.92);
  color: #d5dde6;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
}

.tag-chip.muted-chip {
  color: var(--text-dim);
  border-color: rgba(140, 154, 169, 0.12);
  background: rgba(11, 14, 19, 0.84);
}

.editable-tags-cell {
  cursor: text;
}

.editable-tags-cell:hover {
  background: rgba(121, 153, 187, 0.08);
}

.grid-row .cell.tag-editor-cell {
  overflow: visible;
  white-space: normal;
}

.tag-editor {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.tag-editor-chips {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.tag-editor-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  max-width: 108px;
  padding: 0 4px 0 7px;
  border: 1px solid rgba(123, 135, 150, 0.18);
  border-radius: 2px;
  background: rgba(28, 36, 46, 0.98);
  color: #dce4ed;
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.tag-editor-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-editor-chip button,
.tag-editor-actions button {
  border: 1px solid rgba(140, 154, 169, 0.16);
  border-radius: 2px;
  background: rgba(9, 12, 16, 0.72);
  color: var(--text-dim);
  cursor: pointer;
}

.tag-editor-chip button {
  width: 18px;
  height: 18px;
  padding: 0;
  font-family: var(--font-mono);
  line-height: 1;
}

.tag-editor-input {
  flex: 1 1 72px;
  min-width: 64px;
  max-width: 148px;
  height: 24px;
  padding: 3px 6px;
  border: 1px solid rgba(142, 172, 206, 0.28);
  border-radius: 2px;
  background: rgba(7, 10, 14, 0.94);
  color: var(--text-main);
  font: inherit;
}

.tag-editor-input:focus {
  outline: 1px solid rgba(148, 181, 219, 0.55);
  outline-offset: 1px;
}

.tag-editor-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.tag-editor-actions button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 0.62rem;
}

.tag-editor-chip button:hover,
.tag-editor-actions button:hover {
  color: var(--text-main);
  border-color: rgba(164, 191, 224, 0.32);
}

.tag-editor-empty {
  white-space: nowrap;
}

.ai-score-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(123, 135, 150, 0.13);
  border-radius: 2px;
  background: rgba(24, 31, 39, 0.94);
  color: #d5dde6;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
}

.ai-score-chip.is-simulated {
  color: var(--text-soft);
  border-color: rgba(140, 154, 169, 0.14);
  background: rgba(10, 13, 18, 0.82);
}

.ai-inherited {
  color: var(--text-dim);
}

.grid-row.is-contact .cell {
  min-height: 34px;
}

.grid-row.is-email .cell {
  min-height: 30px;
  color: var(--text-dim);
}

.cell.select-cell {
  justify-content: center;
}

.cell.select-cell.is-blank-cell {
  cursor: default;
}

.cell.entity-cell {
  gap: 8px;
  font-weight: 500;
  overflow: visible;
}

.cell.person-cell {
  overflow: visible;
}

.cell.reply-sequence-cell {
  align-items: flex-start;
  padding-top: 4px;
  padding-right: 8px;
  padding-bottom: 4px;
  overflow: visible;
}

.cell.email-grid-cell {
  white-space: normal;
}

.email-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-width: 0;
  line-height: 1.2;
}

.email-field-primary {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
}

.email-field.is-empty .email-field-primary {
  display: none;
}

.email-field-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.email-field-meta.is-loading {
  color: #cfd8e3;
}

.email-field-meta.is-error {
  color: #d3a6ab;
}

.email-field-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  animation: email-field-pulse 1s ease-in-out infinite;
  flex: 0 0 auto;
}

@keyframes email-field-pulse {
  0%,
  100% {
    opacity: 0.32;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

.reply-sequence-dropdown {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  position: relative;
  width: 100%;
  min-width: 0;
}

.reply-sequence-toggle {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 0 28px 0 8px;
  border: 1px solid rgba(123, 135, 150, 0.14);
  border-radius: 2px;
  background: rgba(20, 25, 31, 0.96);
  color: #d4dbe4;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.reply-sequence-toggle:hover {
  border-color: rgba(123, 135, 150, 0.26);
  background-color: rgba(23, 29, 36, 0.98);
}

.reply-sequence-toggle:focus {
  outline: none;
  border-color: rgba(162, 172, 184, 0.38);
  background-color: rgba(28, 35, 42, 0.98);
  box-shadow: inset 0 0 0 1px rgba(162, 172, 184, 0.12);
}

.reply-sequence-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.reply-sequence-toggle-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reply-sequence-toggle-label.is-placeholder {
  color: var(--text-dim);
}

.reply-sequence-toggle-caret {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 1px solid rgba(186, 195, 205, 0.84);
  border-bottom: 1px solid rgba(186, 195, 205, 0.84);
  transform: rotate(45deg) translateY(-2px);
}

.reply-sequence-dropdown.is-open .reply-sequence-toggle-caret {
  transform: rotate(225deg) translateY(-1px);
}

.reply-sequence-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(123, 135, 150, 0.12);
  border-radius: 2px;
  background: rgba(16, 20, 25, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.reply-sequence-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 0 6px;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: #d4dbe4;
  font-family: var(--font-sans);
  font-size: 0.71rem;
  text-align: left;
  cursor: pointer;
}

.reply-sequence-option:hover,
.reply-sequence-option:focus {
  outline: none;
  background: rgba(31, 38, 45, 0.96);
}

.reply-sequence-option.is-selected {
  background: rgba(37, 44, 52, 0.98);
}

.reply-sequence-option.is-active {
  background: rgba(45, 53, 62, 0.98);
  box-shadow: inset 0 0 0 1px rgba(162, 172, 184, 0.16);
}

.reply-sequence-option-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reply-sequence-option-meta {
  flex: 0 0 auto;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.company-node {
  min-width: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.company-node.is-static {
  cursor: default;
}

.company-node-icon {
  display: inline-block;
  width: 15px;
  height: 12px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(246, 212, 129, 0.98), rgba(186, 145, 70, 0.98));
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.4));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cpath fill='black' d='M8 8a4 4 0 0 1 4-4h16l6 7h18a4 4 0 0 1 4 4v23a6 6 0 0 1-6 6H14a6 6 0 0 1-6-6V8z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cpath fill='black' d='M8 8a4 4 0 0 1 4-4h16l6 7h18a4 4 0 0 1 4 4v23a6 6 0 0 1-6 6H14a6 6 0 0 1-6-6V8z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.company-node-copy {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.company-node-title,
.nested-child-label,
.nested-parent-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.company-node-meta {
  flex-shrink: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.people-search-loading {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #cfd8e3;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.people-search-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  animation: email-field-pulse 1s ease-in-out infinite;
  flex: 0 0 auto;
}

.nested-company-tree {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.nested-guide-stack {
  position: relative;
  width: 18px;
  height: 28px;
}

.nested-guide-top,
.nested-guide-bottom {
  position: absolute;
  left: 8px;
  width: 1px;
  background-image: linear-gradient(
    to bottom,
    rgba(149, 164, 181, 0.76) 0 34%,
    transparent 34% 66%,
    rgba(149, 164, 181, 0.76) 66% 100%
  );
  background-size: 1px 6px;
  background-repeat: repeat-y;
}

.nested-guide-top {
  top: 0;
  bottom: 50%;
}

.nested-guide-bottom {
  top: 50%;
  bottom: 0;
}

.nested-guide-branch {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 10px;
  height: 1px;
  transform: translateY(-50%);
  background-image: linear-gradient(
    to right,
    rgba(149, 164, 181, 0.76) 0 34%,
    transparent 34% 66%,
    rgba(149, 164, 181, 0.76) 66% 100%
  );
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

.nested-company-tree.is-last .nested-guide-bottom {
  display: none;
}

.nested-parent-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 3px;
  background: rgba(18, 22, 28, 0.62);
  color: var(--text-dim);
}

.nested-parent-icon {
  display: inline-block;
  width: 13px;
  height: 11px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(234, 204, 133, 0.96), rgba(175, 140, 72, 0.96));
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.4));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cpath fill='black' d='M8 8a4 4 0 0 1 4-4h16l6 7h18a4 4 0 0 1 4 4v23a6 6 0 0 1-6 6H14a6 6 0 0 1-6-6V8z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cpath fill='black' d='M8 8a4 4 0 0 1 4-4h16l6 7h18a4 4 0 0 1 4 4v23a6 6 0 0 1-6 6H14a6 6 0 0 1-6-6V8z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.nested-parent-label {
  font-size: 0.78rem;
}

.nested-child-pill {
  position: relative;
  min-width: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 3px 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
}

.nested-child-pill.is-expandable {
  cursor: pointer;
}

.row-quick-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(3px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.grid-row:hover .row-quick-actions,
.grid-row.is-focused .row-quick-actions,
.row-quick-actions:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.row-quick-action {
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(149, 164, 181, 0.18);
  border-radius: 3px;
  background: rgba(10, 13, 18, 0.78);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.row-quick-action:hover,
.row-quick-action:focus-visible {
  border-color: rgba(190, 202, 216, 0.32);
  background: rgba(24, 30, 38, 0.96);
  color: var(--text);
  outline: none;
}

.nested-child-branch {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 1px;
  transform: translateY(-50%);
  background-image: linear-gradient(
    to right,
    rgba(149, 164, 181, 0.76) 0 34%,
    transparent 34% 66%,
    rgba(149, 164, 181, 0.76) 66% 100%
  );
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

.nested-child-icon {
  display: inline-block;
  width: 14px;
  height: 18px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(243, 247, 252, 0.98), rgba(198, 209, 223, 0.96));
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.38));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 64'%3E%3Ccircle cx='24' cy='9' r='7' fill='black'/%3E%3Crect x='16' y='18' width='16' height='20' rx='8' fill='black'/%3E%3Crect x='10' y='20' width='6' height='22' rx='3' fill='black'/%3E%3Crect x='32' y='20' width='6' height='22' rx='3' fill='black'/%3E%3Crect x='17' y='36' width='6' height='24' rx='3' fill='black'/%3E%3Crect x='25' y='36' width='6' height='24' rx='3' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 64'%3E%3Ccircle cx='24' cy='9' r='7' fill='black'/%3E%3Crect x='16' y='18' width='16' height='20' rx='8' fill='black'/%3E%3Crect x='10' y='20' width='6' height='22' rx='3' fill='black'/%3E%3Crect x='32' y='20' width='6' height='22' rx='3' fill='black'/%3E%3Crect x='17' y='36' width='6' height='24' rx='3' fill='black'/%3E%3Crect x='25' y='36' width='6' height='24' rx='3' fill='black'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.nested-child-copy {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.nested-child-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}

.nested-child-meta {
  flex-shrink: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nested-child-expander {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.64rem;
  flex-shrink: 0;
  background: rgba(11, 14, 18, 0.62);
}

.nested-child-expander.is-static {
  color: rgba(180, 190, 201, 0.7);
}

.nested-email-tree {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.nested-email-stack {
  position: relative;
  width: 34px;
  height: 28px;
}

.nested-email-company-line,
.nested-email-contact-line-top,
.nested-email-contact-line-bottom {
  position: absolute;
  width: 1px;
  background-image: linear-gradient(
    to bottom,
    rgba(149, 164, 181, 0.76) 0 34%,
    transparent 34% 66%,
    rgba(149, 164, 181, 0.76) 66% 100%
  );
  background-size: 1px 6px;
  background-repeat: repeat-y;
}

.nested-email-company-line {
  top: 0;
  bottom: 0;
  left: 8px;
}

.nested-email-contact-line-top,
.nested-email-contact-line-bottom {
  left: 20px;
}

.nested-email-contact-line-top {
  top: 0;
  bottom: 50%;
}

.nested-email-contact-line-bottom {
  top: 50%;
  bottom: 0;
}

.nested-email-branch {
  position: absolute;
  top: 50%;
  left: 20px;
  width: 12px;
  height: 1px;
  transform: translateY(-50%);
  background-image: linear-gradient(
    to right,
    rgba(149, 164, 181, 0.76) 0 34%,
    transparent 34% 66%,
    rgba(149, 164, 181, 0.76) 66% 100%
  );
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

.nested-email-tree.is-last-contact .nested-email-company-line {
  bottom: 50%;
}

.nested-email-tree.is-last-email .nested-email-contact-line-bottom {
  display: none;
}

.nested-email-pill {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 3px 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--text-soft);
}

.nested-email-expander {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.64rem;
  flex-shrink: 0;
  background: rgba(11, 14, 18, 0.48);
}

.grid-row.is-focused .nested-parent-chip,
.grid-row.is-focused .nested-child-pill,
.grid-row.is-focused .nested-email-pill {
  background: transparent;
  border-color: transparent;
}

.grid-row.is-focused .nested-child-expander,
.grid-row.is-focused .nested-email-expander,
.grid-row.is-focused .company-expander {
  background: rgba(9, 12, 16, 0.36);
  border-color: rgba(255, 255, 255, 0.05);
}

.nested-email-icon {
  display: inline-block;
  width: 13px;
  height: 10px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(219, 229, 242, 0.98), rgba(171, 186, 204, 0.96));
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.38));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cpath fill='black' d='M6 10a6 6 0 0 1 6-6h40a6 6 0 0 1 6 6v28a6 6 0 0 1-6 6H12a6 6 0 0 1-6-6V10zm6 0v2l20 14L52 12v-2H12zm40 28V18L34.9 30a5 5 0 0 1-5.8 0L12 18v20h40z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cpath fill='black' d='M6 10a6 6 0 0 1 6-6h40a6 6 0 0 1 6 6v28a6 6 0 0 1-6 6H12a6 6 0 0 1-6-6V10zm6 0v2l20 14L52 12v-2H12zm40 28V18L34.9 30a5 5 0 0 1-5.8 0L12 18v20h40z'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.nested-email-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.nested-email-subject,
.nested-email-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nested-email-subject {
  color: var(--text);
  font-size: 0.79rem;
  line-height: 1.35;
}

.nested-email-meta {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.grid-row.is-email-detail {
  background: rgba(12, 15, 20, 0.82);
}

.grid-row.is-email-detail:hover {
  background: rgba(15, 18, 23, 0.9);
}

.grid-row.is-email-detail .cell {
  min-height: auto;
  padding-top: 6px;
  padding-bottom: 8px;
  align-items: flex-start;
  white-space: normal;
  overflow: visible;
}

.grid-row.is-email-detail .cell.detail-blank-cell {
  background: transparent;
}

.grid-row.is-email-detail .cell.email-detail-cell {
  overflow: visible;
}

.nested-email-detail-tree {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.nested-email-detail-stack {
  position: relative;
  width: 46px;
  align-self: stretch;
  min-height: 100%;
}

.nested-email-detail-company-line,
.nested-email-detail-contact-line,
.nested-email-detail-email-line {
  position: absolute;
  width: 1px;
  background-image: linear-gradient(
    to bottom,
    rgba(149, 164, 181, 0.7) 0 34%,
    transparent 34% 66%,
    rgba(149, 164, 181, 0.7) 66% 100%
  );
  background-size: 1px 6px;
  background-repeat: repeat-y;
}

.nested-email-detail-company-line {
  top: 0;
  bottom: 0;
  left: 8px;
}

.nested-email-detail-contact-line {
  top: 0;
  bottom: 0;
  left: 20px;
}

.nested-email-detail-email-line {
  top: 0;
  bottom: 50%;
  left: 32px;
}

.nested-email-detail-branch {
  position: absolute;
  top: 50%;
  left: 32px;
  width: 12px;
  height: 1px;
  transform: translateY(-50%);
  background-image: linear-gradient(
    to right,
    rgba(149, 164, 181, 0.7) 0 34%,
    transparent 34% 66%,
    rgba(149, 164, 181, 0.7) 66% 100%
  );
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

.nested-email-detail-tree.is-last-contact .nested-email-detail-company-line {
  bottom: 50%;
}

.nested-email-detail-tree.is-last-email .nested-email-detail-contact-line {
  bottom: 50%;
}

.nested-email-detail-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding-top: 2px;
  align-self: start;
}

.nested-email-detail-meta {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.6;
}

.nested-email-detail-body {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.72;
  white-space: normal;
  max-width: 760px;
}

.company-expander {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.68rem;
  flex-shrink: 0;
  background: rgba(15, 18, 23, 0.94);
}

.company-expander.is-static {
  color: var(--text-dim);
  background: transparent;
  border-color: transparent;
}

.checkbox-dot {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(9, 12, 16, 0.96);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkbox-dot.is-selected {
  background: rgba(19, 23, 29, 0.98);
  border-color: rgba(164, 174, 186, 0.42);
}

.checkbox-dot.is-selected::before {
  content: "x";
  color: rgba(232, 237, 242, 0.96);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  background: rgba(18, 22, 27, 0.94);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill.is-ready,
.status-pill.is-routed {
  color: var(--accent-strong);
}

.status-pill.is-received,
.status-pill.is-reviewed {
  color: var(--text-soft);
}

.status-pill.is-needs-reply {
  color: rgba(255, 204, 122, 0.98);
}

.status-pill.is-error {
  color: var(--danger);
}

.muted {
  color: var(--text-dim);
}

.empty-state {
  position: absolute;
  inset: 64px 18px 18px;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(10, 13, 18, 0.9);
  text-align: center;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
}

.summary-list,
.inspector-body,
.activity-feed {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.summary-item,
.inspector-card,
.activity-item {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(17, 21, 27, 0.94);
}

.activity-item-live {
  border-color: rgba(125, 162, 218, 0.36);
  background: rgba(30, 41, 59, 0.78);
}

.activity-item-live time {
  color: #9dbcf2;
}

.summary-item strong,
.inspector-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.83rem;
}

.inspector-card-body {
  display: grid;
  gap: 10px;
}

.summary-item p,
.inspector-card-body,
.inspector-card p,
.activity-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}

.trace-summary,
.trace-error {
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.5;
}

.trace-error {
  color: rgba(255, 171, 171, 0.96);
}

.trace-details {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  background: rgba(11, 14, 19, 0.9);
  overflow: hidden;
}

.trace-details summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  list-style: none;
}

.trace-details summary::-webkit-details-marker {
  display: none;
}

.trace-pre {
  margin: 0;
  padding: 0 10px 10px;
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
}

.activity-item time {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.tree-root {
  display: grid;
  gap: 10px;
}

.tree-workspace-label {
  padding: 0 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tree-section {
  display: grid;
  gap: 4px;
}

.tree-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tree-section + .tree-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tree-section-label {
  padding: 6px 8px 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tree-add-btn {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(14, 18, 23, 0.9);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tree-add-btn:hover {
  border-color: rgba(123, 135, 150, 0.22);
  color: var(--accent-strong);
}

.tree-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.tree-row:hover,
.tree-row.is-active {
  border-color: rgba(123, 135, 150, 0.16);
  background: rgba(25, 31, 38, 0.8);
  color: var(--text);
}

.feed-tree [data-tree-action="source"] {
  background: rgba(15, 18, 23, 0.86);
  border-color: rgba(255, 255, 255, 0.06);
}

.feed-tree [data-tree-action="source"].is-active {
  background: rgba(25, 34, 45, 0.92);
  border-color: rgba(123, 135, 150, 0.2);
}

.tree-row.is-muted {
  opacity: 0.72;
}

.tree-row.is-hidden-feed {
  opacity: 0.8;
}

.tree-row.is-level-1 {
  padding-left: 22px;
}

.tree-row.is-level-2 {
  padding-left: 38px;
}

.tree-row.is-level-3 {
  padding-left: 54px;
}

.tree-toggle {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.68rem;
}

.tree-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.tree-icon.folder::before,
.tree-icon.folder::after,
.tree-icon.doc::before,
.tree-icon.doc::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(140, 154, 169, 0.82);
}

.tree-icon.folder::before {
  inset: 4px 0 0;
  border-radius: 2px;
}

.tree-icon.folder::after {
  top: 1px;
  left: 1px;
  width: 6px;
  height: 4px;
  border-bottom: none;
  border-radius: 2px 2px 0 0;
}

.tree-icon.doc::before {
  inset: 1px 1px 0 1px;
  border-radius: 2px;
}

.tree-icon.doc::after {
  top: 1px;
  right: 1px;
  width: 4px;
  height: 4px;
  border-left: none;
  border-bottom: none;
  transform: skew(-12deg);
}

.tree-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  align-content: start;
}

.tree-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.83rem;
}

.tree-subtitle {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-dim);
  font-size: 0.74rem;
}

.tree-meta {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.tree-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feed-visibility-btn {
  position: relative;
  width: 24px;
  height: 16px;
  padding: 0;
  flex-shrink: 0;
  color: var(--accent-strong);
  opacity: 0.92;
}

.feed-visibility-btn::before,
.feed-visibility-btn::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.feed-visibility-btn::before {
  inset: 2px 1px;
  border: 1px solid currentColor;
  border-radius: 999px / 74%;
}

.feed-visibility-btn::after {
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.feed-visibility-btn.is-hidden {
  color: var(--text-dim);
  opacity: 0.76;
  background: linear-gradient(135deg, transparent 44%, currentColor 46%, currentColor 54%, transparent 56%);
}

.feed-visibility-btn.is-hidden::before {
  opacity: 0.5;
}

.feed-visibility-btn.is-hidden::after {
  display: none;
}

.feed-visibility-btn::before,
.feed-visibility-btn::after {
  transition:
    opacity 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.summary-card {
  padding: 12px;
}

.summary-card p {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.58;
}

.summary-card p:last-child {
  margin-bottom: 0;
}

.rail-handle {
  display: none;
}

.rail-handle-left {
  left: calc(var(--left-width) - 22px);
}

.rail-handle-right {
  right: calc(var(--right-width) - 22px);
}

.workspace-shell.is-left-collapsed .rail-handle-left,
.workspace-shell.is-zen .rail-handle-left {
  left: -22px;
}

.workspace-shell.is-right-collapsed .rail-handle-right,
.workspace-shell.is-zen .rail-handle-right {
  right: -22px;
}

.help-modal,
.ai-trace-modal {
  border: none;
  padding: 0;
  background: transparent;
}

.help-modal::backdrop,
.ai-trace-modal::backdrop {
  background: rgba(4, 7, 11, 0.68);
}

.help-sheet,
.ai-trace-sheet {
  width: min(760px, calc(100vw - 40px));
  max-height: min(82vh, 860px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(16, 20, 25, 0.995);
  padding: 18px;
}

.ai-trace-sheet {
  width: min(1040px, calc(100vw - 40px));
  max-height: min(82vh, 900px);
}

.ai-trace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.ai-trace-chip {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1;
  padding: 7px 8px;
}

.ai-trace-body {
  display: grid;
  gap: 12px;
}

.source-trace-cell {
  cursor: help;
}

.source-trace-cell:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.help-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.help-map article {
  min-height: 116px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(11, 14, 19, 0.86);
}

.help-map span,
.help-section-label {
  display: block;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.help-map strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 0.95rem;
}

.help-map p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.help-section-label {
  margin: 18px 0 0;
}

.help-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.help-grid article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(11, 14, 19, 0.9);
  color: var(--text-soft);
}

.command-palette-modal {
  border: none;
  padding: 0;
  background: transparent;
}

.command-palette-modal::backdrop {
  background: rgba(4, 7, 11, 0.52);
  backdrop-filter: blur(10px);
}

.command-palette-sheet {
  width: min(780px, calc(100vw - 40px));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(17, 20, 25, 0.997);
  box-shadow:
    0 26px 56px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}

.command-palette-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.command-palette-mark {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 1rem;
}

.command-palette-input {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
}

.command-palette-input:focus {
  border: none;
  box-shadow: none;
}

.command-palette-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.74rem;
}

.command-palette-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.command-palette-results {
  display: grid;
  max-height: min(56vh, 520px);
  overflow: auto;
}

.command-palette-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--text-soft);
}

.command-palette-item:first-child {
  border-top: none;
}

.command-palette-item:hover,
.command-palette-item.is-active {
  background: rgba(28, 34, 41, 0.96);
  color: var(--text);
}

.command-palette-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.command-palette-copy strong,
.command-palette-copy span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.command-palette-copy strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.command-palette-copy span {
  color: var(--text-dim);
  font-size: 0.79rem;
  line-height: 1.45;
}

.command-palette-item:hover .command-palette-copy span,
.command-palette-item.is-active .command-palette-copy span {
  color: var(--text-soft);
}

.command-palette-example {
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(123, 135, 150, 0.12);
  border-radius: 2px;
  background: rgba(21, 27, 34, 0.92);
  color: #d5dde6;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 18px;
  text-transform: none;
}

.command-palette-empty {
  padding: 18px;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.5;
}

.command-palette-empty code {
  color: var(--accent-strong);
  font-family: var(--font-mono);
}

.slash-command-bar {
  position: absolute;
  top: var(--app-chrome-height);
  left: 0;
  right: 0;
  z-index: 55;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(18, 22, 28, 0.996), rgba(15, 18, 24, 0.994)),
    rgba(15, 18, 24, 0.996);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.slash-command-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.slash-command-mark {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
}

.slash-command-input {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
}

.slash-command-input:focus {
  border: none;
  box-shadow: none;
}

.slash-command-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.74rem;
}

.slash-command-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.slash-command-results {
  display: grid;
  max-height: min(42vh, 360px);
  overflow: auto;
}

.slash-command-results .command-palette-item {
  gap: 12px;
  min-height: 34px;
  padding: 6px 14px;
  border-top-color: rgba(255, 255, 255, 0.045);
}

.slash-command-results .command-palette-item:hover,
.slash-command-results .command-palette-item.is-active {
  background: rgba(33, 39, 47, 0.94);
}

.slash-command-results .command-palette-copy {
  gap: 1px;
}

.slash-command-results .command-palette-copy strong {
  font-size: 0.77rem;
  line-height: 1.2;
  font-weight: 600;
}

.slash-command-results .command-palette-copy span {
  font-size: 0.65rem;
  line-height: 1.2;
}

.slash-command-results .command-palette-example {
  min-height: 16px;
  padding: 0 6px;
  font-size: 0.53rem;
  line-height: 14px;
}

.slash-command-results .command-palette-empty {
  padding: 12px 14px 14px;
  font-size: 0.74rem;
}

.sequence-studio-modal {
  border: none;
  padding: 0;
  background: transparent;
}

.sequence-studio-modal::backdrop {
  background: rgba(3, 5, 8, 0.82);
  backdrop-filter: blur(8px);
}

.sequence-studio-sheet {
  width: min(calc(100vw - 32px), 1580px);
  height: min(calc(100vh - 32px), 980px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(13, 16, 21, 0.995);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.44);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.sequence-studio-topbar,
.sequence-studio-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(17, 20, 25, 0.98);
}

.sequence-studio-titleblock {
  min-width: 0;
}

.sequence-studio-titleblock h3 {
  margin: 2px 0 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.sequence-studio-lead {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.sequence-studio-meta,
.sequence-studio-actions,
.sequence-studio-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sequence-studio-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  background: rgba(17, 21, 26, 0.92);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sequence-studio-sequence-picker {
  min-width: 280px;
  display: grid;
  gap: 4px;
}

.sequence-studio-sequence-picker span {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sequence-studio-sequence-picker select {
  min-height: 30px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 0.78rem;
}

.sequence-studio-grid {
  min-height: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  overflow: auto;
  align-content: stretch;
}

.sequence-step-tile {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  background: rgba(18, 21, 27, 0.9);
}

.sequence-step-header {
  display: grid;
  gap: 10px;
}

.sequence-step-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sequence-step-index {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.sequence-step-origin {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sequence-step-origin.is-customized {
  color: var(--accent-strong);
}

.sequence-step-arrowline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  background: rgba(12, 15, 19, 0.86);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sequence-step-arrowline::after {
  content: "↓";
  margin-left: auto;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.sequence-step-delay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sequence-step-delay input {
  width: 74px;
  min-height: 24px;
  padding: 3px 6px;
  border-radius: 2px;
  text-align: center;
  font-family: var(--font-mono);
}

.sequence-step-subject {
  min-height: 38px;
  font-size: 0.88rem;
}

.sequence-step-body {
  min-height: 100%;
  height: 100%;
  resize: none;
  font-size: 0.84rem;
  line-height: 1.65;
}

.sequence-studio-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: none;
}

.sequence-studio-footer-copy {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.sequence-studio-inline-status {
  width: fit-content;
  max-width: min(760px, 100%);
  padding: 6px 9px;
  border: 1px solid rgba(123, 135, 150, 0.22);
  border-radius: 2px;
  background: rgba(15, 18, 23, 0.88);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.sequence-studio-inline-status.is-info {
  border-color: rgba(133, 148, 166, 0.28);
  color: var(--text);
}

.sequence-studio-inline-status.is-success {
  border-color: rgba(90, 150, 112, 0.42);
  background: rgba(22, 47, 32, 0.58);
  color: #bfe5c7;
}

.sequence-studio-inline-status.is-warning {
  border-color: rgba(190, 150, 82, 0.46);
  background: rgba(64, 45, 20, 0.58);
  color: #f4d5a0;
}

.sequence-studio-inline-status.is-error {
  border-color: rgba(207, 96, 96, 0.5);
  background: rgba(70, 24, 28, 0.62);
  color: #ffd1d1;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  min-width: 240px;
  max-width: 420px;
  padding: 12px 14px;
  border: 1px solid rgba(123, 135, 150, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(14, 19, 25, 0.98);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  color: var(--accent-strong);
}

.feed-modal {
  border: none;
  padding: 0;
  background: transparent;
}

.feed-modal::backdrop {
  background: rgba(4, 7, 11, 0.76);
}

.feed-sheet,
.settings-sheet {
  width: min(960px, calc(100vw - 40px));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(18, 22, 27, 0.997);
  padding: 18px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.4);
}

.settings-sheet {
  width: min(1120px, calc(100vw - 40px));
}

.contact-sheet {
  width: min(520px, calc(100vw - 32px));
}

.contact-modal-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.contact-modal .field em {
  color: var(--text-dim);
  font-style: normal;
}

.modal-help-text {
  margin: 10px 0 16px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.feed-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
  margin-top: 16px;
}

.feed-modal-section {
  display: grid;
  gap: 14px;
  align-content: start;
}

.feed-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.feed-modal-actions .ghost-btn,
.feed-modal-actions .primary-btn {
  min-width: 130px;
}

.modal-status {
  margin-top: 16px;
  padding: 11px 12px;
  border: 1px solid rgba(140, 154, 169, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(11, 14, 19, 0.9);
  color: var(--text-soft);
  font-size: 0.79rem;
  line-height: 1.5;
}

.modal-status.is-error {
  border-color: rgba(203, 122, 129, 0.34);
  color: #f0c6cb;
  background: rgba(42, 18, 22, 0.8);
}

.modal-status.is-success {
  border-color: rgba(140, 175, 154, 0.34);
  color: #d4ead9;
  background: rgba(18, 34, 24, 0.8);
}

.modal-status.is-loading {
  border-color: rgba(123, 135, 150, 0.18);
  color: var(--accent-strong);
}

.settings-modal {
  border: none;
  padding: 0;
  background: transparent;
}

.settings-modal::backdrop {
  background: rgba(4, 7, 11, 0.76);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 18px;
  margin-top: 16px;
}

.settings-section {
  display: grid;
  gap: 14px;
  align-content: start;
}

.settings-window {
  display: grid;
  position: absolute;
  inset: var(--app-chrome-height) 0 0 0;
  z-index: 20;
  grid-row: 2;
  height: auto;
  min-height: 0;
  background: rgba(16, 19, 24, 0.996);
  align-self: stretch;
}

.settings-window-shell {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: none;
  border-radius: 0;
  background: rgba(16, 19, 24, 0.996);
  padding: 0;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.settings-window-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 13px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 30, 0.996);
}

.settings-window-titleblock {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.settings-window-titleblock h2 {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 600;
}

.settings-window-subtitle {
  margin: 0;
  max-width: 900px;
  color: var(--text-dim);
  font-size: 0.74rem;
  line-height: 1.45;
}

.settings-window-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.settings-window-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
}

.settings-window-sidebar {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(16, 19, 24, 0.995);
  display: grid;
  gap: 10px;
  align-content: start;
}

.settings-window-note,
.settings-inline-note,
.settings-empty-row {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(140, 154, 169, 0.1);
  background: rgba(9, 13, 18, 0.48);
  color: var(--text-dim);
}

.settings-window-note strong,
.settings-inline-note strong,
.settings-empty-row strong {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.settings-window-note span,
.settings-inline-note span,
.settings-empty-row span {
  color: var(--text-dim);
  font-size: 0.66rem;
  line-height: 1.35;
}

.settings-window-nav {
  display: grid;
  gap: 1px;
}

.settings-window-nav-item {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.72rem;
  transition:
    color 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.settings-window-nav-item:hover,
.settings-window-nav-item:focus-visible {
  color: var(--text);
  background: rgba(43, 49, 58, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
  outline: none;
}

.settings-window-content {
  min-height: 0;
  overflow: auto;
  padding: 10px 14px 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.settings-overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  min-width: 0;
  border: 1px solid rgba(140, 154, 169, 0.1);
  background: rgba(140, 154, 169, 0.1);
}

.settings-overview-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  background: rgba(10, 14, 19, 0.74);
}

.settings-overview-item span {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-overview-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-window .settings-grid {
  margin-top: 0;
  grid-template-columns: minmax(280px, 0.76fr) minmax(420px, 1.24fr);
  gap: 10px;
}

.settings-window .settings-section-full {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: 12px;
}

.settings-window .panel-header {
  min-height: 0;
}

.settings-window .panel-header h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.25;
}

.settings-window .field {
  gap: 5px;
}

.settings-window .field > span,
.settings-window .field-label {
  color: var(--text-dim);
  font-size: 0.64rem;
}

.settings-window input,
.settings-window select {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.76rem;
  line-height: 1.25;
}

.settings-window textarea {
  min-height: 70px;
  padding: 7px 8px;
  font-size: 0.76rem;
  line-height: 1.42;
}

.settings-identity-grid {
  gap: 8px;
}

.settings-integration-grid,
.settings-service-list {
  display: grid;
  gap: 12px;
}

.settings-service-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.settings-service-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) auto minmax(260px, 1fr) minmax(170px, 0.62fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(140, 154, 169, 0.09);
  border-left: 2px solid rgba(137, 167, 207, 0.18);
  background: rgba(9, 13, 18, 0.55);
}

.settings-service-row h4 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
}

.settings-service-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  align-self: center;
}

.settings-service-status {
  display: flex;
  gap: 5px 8px;
  flex-wrap: wrap;
  min-width: 0;
  color: var(--text-dim);
  font-size: 0.64rem;
  line-height: 1.25;
}

.settings-service-status p {
  margin: 0;
}

.settings-service-key,
.settings-service-model {
  margin: 0;
}

.settings-fast-actions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(140, 154, 169, 0.09);
  background: rgba(9, 13, 18, 0.48);
}

.settings-fast-actions-list {
  display: grid;
  gap: 3px;
}

.settings-fast-action-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.44fr) minmax(180px, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid rgba(140, 154, 169, 0.09);
  background: rgba(9, 13, 18, 0.48);
}

.settings-fast-action-row.is-disabled {
  opacity: 0.68;
}

.settings-fast-action-toggle {
  min-width: 0;
}

.settings-fast-action-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.settings-fast-action-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-fast-action-copy span {
  display: inline-flex;
  justify-self: end;
  min-height: 18px;
  align-items: center;
  padding: 0 6px;
  border: 1px solid rgba(140, 154, 169, 0.1);
  background: rgba(140, 154, 169, 0.06);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.settings-fast-action-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.settings-fast-action-controls .compact-btn {
  min-height: 24px;
  padding: 0 7px;
  font-size: 0.62rem;
}

.settings-fast-actions-available {
  margin-top: 4px;
  border: 1px solid rgba(140, 154, 169, 0.09);
  background: rgba(9, 13, 18, 0.32);
}

.settings-fast-actions-available summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 0 9px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.68rem;
  list-style: none;
}

.settings-fast-actions-available summary::-webkit-details-marker {
  display: none;
}

.settings-fast-actions-available summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 18px;
  border: 1px solid rgba(140, 154, 169, 0.11);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.settings-fast-actions-available-list {
  display: grid;
  gap: 3px;
  padding: 0 6px 6px;
}

.settings-integration-card,
.ai-people-finder-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(140, 154, 169, 0.1);
  border-left: 2px solid rgba(137, 167, 207, 0.18);
  background: rgba(9, 13, 18, 0.52);
}

.settings-integration-card h4,
.ai-people-finder-card h4 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.ai-people-finder-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.function-manager-toolbar,
.function-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.function-manager-toolbar {
  justify-content: flex-start;
}

.function-card-actions {
  justify-content: flex-end;
}

.settings-function-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.settings-function-summary > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-function-summary h4,
.settings-function-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-function-summary span {
  color: var(--text-dim);
  font-size: 0.66rem;
}

.settings-function-details {
  border-top: 1px solid rgba(140, 154, 169, 0.09);
  padding-top: 7px;
}

.settings-function-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 0.66rem;
  list-style: none;
}

.settings-function-details summary::-webkit-details-marker {
  display: none;
}

.settings-function-details summary::before {
  content: "+";
  margin-right: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.settings-function-details[open] summary::before {
  content: "-";
}

.settings-function-editor {
  display: grid;
  gap: 8px;
  padding-top: 7px;
}

.settings-subsection-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 3px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(140, 154, 169, 0.08);
}

.settings-subsection-header h4 {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
}

.danger-ghost-btn {
  border-color: rgba(220, 82, 82, 0.3);
  color: #ff9d9d;
}

.danger-ghost-btn:hover,
.danger-ghost-btn:focus-visible {
  border-color: rgba(220, 82, 82, 0.5);
  background: rgba(220, 82, 82, 0.12);
}

.compact-toggle {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.settings-window-footer {
  margin-top: 0;
  justify-content: flex-start;
}

.list-management-window-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.field-management-window-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.pipeline-window .settings-window-shell {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.pipeline-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(150px, 0.7fr)) repeat(4, minmax(120px, 0.52fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(16, 19, 24, 0.996);
}

.pipeline-search-field,
.pipeline-stage-field,
.pipeline-amount-field,
.pipeline-date-field {
  margin: 0;
}

.pipeline-clear-filters-btn {
  min-height: 38px;
  align-self: end;
  white-space: nowrap;
}

.pipeline-sync-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(140, 154, 169, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(11, 14, 19, 0.92);
  grid-column: 1 / -1;
}

.pipeline-sync-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-sync-card span:last-child {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.pipeline-table-shell {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px 20px 0;
}

.pipeline-table-head,
.pipeline-table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, 0.8fr) minmax(110px, 0.55fr) minmax(140px, 0.7fr) minmax(120px, 0.65fr) minmax(110px, 0.55fr) minmax(120px, 0.65fr);
  gap: 12px;
  align-items: center;
}

.pipeline-table-head {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(140, 154, 169, 0.12);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(26, 30, 36, 0.94);
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pipeline-table-body {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(140, 154, 169, 0.12);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(9, 12, 17, 0.84);
}

.pipeline-table-row {
  width: 100%;
  min-height: 54px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid rgba(140, 154, 169, 0.08);
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  text-align: left;
}

.pipeline-table-row:hover,
.pipeline-table-row:focus-visible {
  background: rgba(50, 59, 71, 0.38);
  color: var(--text);
  outline: none;
}

.pipeline-table-row.is-focused {
  background: rgba(78, 92, 112, 0.42);
  color: var(--text);
  box-shadow: inset 2px 0 0 rgba(137, 167, 207, 0.82);
}

.pipeline-table-row.is-selected {
  background: rgba(63, 100, 152, 0.28);
  box-shadow: inset 2px 0 0 rgba(90, 146, 224, 0.9);
}

.pipeline-table-row.is-focused.is-selected {
  background: rgba(69, 110, 168, 0.38);
}

.pipeline-deal-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.pipeline-deal-title-line {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pipeline-expand-btn {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(140, 154, 169, 0.22);
  border-radius: 4px;
  background: rgba(16, 21, 29, 0.92);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.pipeline-expand-btn:hover,
.pipeline-expand-btn:focus-visible {
  border-color: rgba(137, 167, 207, 0.7);
  color: var(--text);
  outline: none;
}

.pipeline-deal-name strong,
.pipeline-deal-name small,
.pipeline-table-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-deal-name strong {
  color: var(--text);
  font-size: 0.86rem;
}

.pipeline-deal-name small {
  color: var(--text-dim);
  font-size: 0.66rem;
}

.pipeline-detail-row {
  padding: 9px 14px 11px 44px;
  border-bottom: 1px solid rgba(140, 154, 169, 0.12);
  background: linear-gradient(90deg, rgba(17, 22, 30, 0.86), rgba(10, 14, 19, 0.94));
}

.pipeline-detail-row.is-error {
  background: rgba(63, 24, 29, 0.62);
}

.pipeline-detail-loading,
.pipeline-detail-warning {
  min-height: 36px;
  display: grid;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.pipeline-detail-warning {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 181, 181, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(88, 38, 46, 0.42);
  color: #ffd2d2;
}

.pipeline-detail-console {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 14px;
  max-width: 1180px;
}

.pipeline-detail-console::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 11px;
  width: 1px;
  background: rgba(137, 167, 207, 0.24);
}

.pipeline-detail-rail {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 3px 0 0 24px;
}

.pipeline-detail-rail::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 5px;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(137, 167, 207, 0.45);
  border-radius: 50%;
  background: rgba(9, 13, 19, 0.96);
  box-shadow: inset 0 0 0 3px rgba(137, 167, 207, 0.42);
}

.pipeline-detail-rail > strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-detail-rail > p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.66rem;
  line-height: 1.35;
}

.pipeline-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.pipeline-detail-metric {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 5px 6px;
  border: 1px solid rgba(140, 154, 169, 0.1);
  background: rgba(8, 12, 18, 0.38);
}

.pipeline-detail-metric small,
.pipeline-detail-section header span,
.pipeline-detail-section header em,
.pipeline-detail-field-matrix dt,
.pipeline-detail-compact-list span,
.pipeline-detail-empty {
  color: var(--text-dim);
  font-size: 0.61rem;
}

.pipeline-detail-metric small,
.pipeline-detail-section header span,
.pipeline-detail-section header em {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pipeline-detail-metric strong {
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-detail-sections {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 8px;
}

.pipeline-detail-section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid rgba(140, 154, 169, 0.1);
  background: rgba(8, 12, 18, 0.34);
}

.pipeline-detail-section.is-fields {
  grid-column: 1 / -1;
}

.pipeline-detail-section header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(140, 154, 169, 0.08);
}

.pipeline-detail-section header em {
  font-style: normal;
  color: var(--text-muted);
}

.pipeline-detail-field-matrix {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  gap: 7px 12px;
  margin: 0;
}

.pipeline-detail-field-matrix div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pipeline-detail-field-matrix dd {
  min-width: 0;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-detail-compact-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline-detail-compact-list li {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding-left: 8px;
  border-left: 2px solid rgba(137, 167, 207, 0.16);
}

.pipeline-detail-compact-list strong {
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-detail-compact-list a {
  justify-self: start;
  color: var(--accent);
  font-size: 0.64rem;
  text-decoration: none;
}

.pipeline-detail-empty {
  margin: 0;
}

.pipeline-detail-properties {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pipeline-detail-properties span {
  max-width: 320px;
  padding: 5px 7px;
  border: 1px solid rgba(140, 154, 169, 0.12);
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 0.66rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-detail-properties strong {
  color: var(--text-muted);
  margin-right: 4px;
}

@media (max-width: 1180px) {
  .pipeline-detail-sections {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .pipeline-detail-field-matrix {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 760px) {
  .pipeline-detail-row {
    padding-left: 16px;
  }

  .pipeline-detail-console {
    grid-template-columns: 1fr;
  }

  .pipeline-detail-console::before {
    display: none;
  }

  .pipeline-detail-rail {
    padding-left: 0;
  }

  .pipeline-detail-rail::before {
    display: none;
  }

  .pipeline-detail-sections,
  .pipeline-detail-field-matrix {
    grid-template-columns: 1fr;
  }
}

.pipeline-empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 22px;
  color: var(--text-dim);
  font-weight: 600;
  text-align: center;
}

.pipeline-empty-state.is-error {
  color: #ffb5b5;
}

.pipeline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-dim);
  font-size: 0.74rem;
}

.pipeline-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pipeline-page-jump,
.pipeline-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pipeline-page-jump input {
  width: 84px;
}

.pipeline-page-size select {
  width: 78px;
}

.list-management-body {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 220px 360px minmax(0, 1fr);
  overflow: hidden;
  contain: layout paint;
}

.field-management-body {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 184px 312px minmax(0, 1fr);
  overflow: hidden;
  contain: layout paint;
}

.field-management-window-shell .settings-window-header {
  padding: 12px 16px 11px;
  gap: 12px;
}

.field-management-window-shell .settings-window-subtitle {
  max-width: 700px;
  font-size: 0.74rem;
  line-height: 1.5;
}

.list-management-sidebar,
.list-management-records,
.list-management-detail {
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

.field-management-sidebar,
.field-management-records,
.field-management-detail {
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

.field-management-window-shell .settings-window-titleblock {
  gap: 4px;
}

.field-management-window-shell .settings-window-titleblock h2 {
  font-size: 1.04rem;
}

.field-management-window-shell .settings-window-header-actions .ghost-btn,
.field-management-window .compact-btn,
.field-management-window .ghost-btn,
.field-management-window .primary-btn {
  min-height: 29px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.field-management-window .compact-card {
  min-height: 0;
}

.field-management-sidebar .summary-card,
.field-management-detail .summary-card,
.field-management-records .summary-card {
  background: rgba(24, 28, 34, 0.88);
  border-color: rgba(255, 255, 255, 0.05);
}

.field-management-records {
  gap: 8px;
  padding: 12px 0 12px 12px;
  background: rgba(17, 20, 25, 0.985);
}

.field-management-list-toolbar {
  padding-right: 12px;
}

.field-management-list-header {
  padding-right: 12px;
  align-items: center;
}

.field-management-list-titleblock {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.field-management-list-meta {
  padding-right: 0;
  font-size: 0.7rem;
}

.field-management-new-btn {
  flex-shrink: 0;
}

.field-management-sidebar {
  padding: 12px;
  gap: 10px;
}

.field-management-sidebar-card {
  padding: 10px 11px;
}

.field-management-sidebar-card p {
  margin: 0;
  font-size: 0.73rem;
  line-height: 1.55;
}

.field-management-sidebar-card p + p {
  margin-top: 4px;
  color: var(--text-dim);
}

.field-management-search-input {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  background: rgba(22, 26, 32, 0.82);
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  transition:
    border-color 120ms ease,
    background 120ms ease;
}

.field-management-search-input::placeholder {
  color: var(--text-dim);
}

.field-management-search-input:focus {
  outline: none;
  border-color: rgba(176, 188, 204, 0.16);
  background: rgba(24, 29, 36, 0.96);
}

.list-management-sidebar {
  padding: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(19, 22, 27, 0.995);
  display: grid;
  gap: 14px;
  align-content: start;
}

.list-management-nav {
  display: grid;
  gap: 4px;
}

.list-management-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.78rem;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.list-management-nav-item strong {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.list-management-nav-item:hover,
.list-management-nav-item.is-active {
  color: var(--text);
  background: rgba(43, 49, 58, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
}

.list-management-records {
  padding: 18px 0 18px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(17, 20, 25, 0.992);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.list-management-list-header {
  padding-right: 18px;
}

.list-management-list-meta {
  padding-right: 18px;
  color: var(--text-dim);
  font-size: 0.74rem;
}

.list-management-record-list {
  min-height: 0;
  overflow: auto;
  padding-right: 12px;
  display: grid;
  gap: 2px;
  align-content: start;
}

.list-management-record-item {
  display: grid;
  gap: 5px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.list-management-record-item:hover,
.list-management-record-item.is-active {
  background: rgba(44, 52, 62, 0.62);
  border-color: rgba(255, 255, 255, 0.08);
}

.list-management-record-title {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
}

.list-management-record-meta {
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.5;
}

.list-management-record-empty,
.list-management-empty-state {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  background: rgba(22, 25, 31, 0.96);
}

.list-management-record-empty strong,
.list-management-empty-state h3 {
  margin: 0;
  font-size: 0.96rem;
}

.list-management-record-empty p,
.list-management-empty-state p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.77rem;
  line-height: 1.6;
}

.list-management-detail {
  max-width: 100%;
  padding: 18px 20px 20px;
  background: rgba(16, 19, 24, 0.996);
  overflow: auto;
  overflow-x: hidden;
}

.list-management-detail-panel {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 16px;
  align-content: start;
  contain: layout paint;
}

.list-management-upload-row {
  min-width: 0;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}

.list-management-upload-btn {
  display: inline-flex;
  align-items: center;
}

.list-management-upload-btn.is-disabled {
  opacity: 0.52;
  pointer-events: auto;
  cursor: not-allowed;
}

.list-management-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.list-management-upload-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
  font-size: 0.73rem;
}

.list-management-source-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.list-management-source-panel[hidden] {
  display: none;
}

.list-management-checkbox-field {
  align-content: start;
}

.list-management-checkbox-field .checkbox-row {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(19, 22, 27, 0.72);
}

.list-management-schedule-panel {
  min-width: 0;
}

.list-management-schedule-panel[hidden] {
  display: none;
}

.list-management-timezone-pill {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(19, 22, 27, 0.64);
  color: var(--text-dim);
  font-size: 0.78rem;
}

.list-management-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.list-management-day-grid label,
.list-management-specific-date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(19, 22, 27, 0.68);
  color: var(--text);
  font-size: 0.72rem;
  white-space: nowrap;
}

.list-management-day-grid input {
  width: 12px;
  height: 12px;
}

.list-management-specific-date-editor {
  align-items: end;
}

.list-management-specific-date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
}

.list-management-specific-date-pill button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.list-management-specific-date-empty {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--text-muted);
  font-size: 0.73rem;
}

.list-management-preview-meta {
  display: grid;
  gap: 2px;
}

.list-management-preview-meta strong {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.list-management-preview-meta span {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.list-management-preview-body {
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  background: rgba(19, 22, 27, 0.96);
}

.crm-import-progress {
  display: grid;
  gap: 10px;
}

.crm-import-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-import-progress-head p {
  margin: 0;
}

.crm-import-progress-head span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.crm-import-progress-bar {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.crm-import-progress-bar span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #86a8d9, #7fbf9b);
  transition: width 180ms ease;
}

.crm-import-progress-stats {
  color: var(--text-dim);
  font-size: 0.76rem;
}

.list-management-detail-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.list-management-history {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 2px;
}

.compact-header {
  min-height: 0;
  padding: 0;
}

.compact-header h4 {
  margin: 0;
  font-size: 0.9rem;
}

.list-management-history-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.list-management-history-empty,
.list-management-history-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  background: rgba(20, 24, 30, 0.92);
}

.list-management-history-item {
  border-left: 3px solid rgba(134, 152, 176, 0.52);
}

.list-management-history-item.is-success {
  border-left-color: rgba(96, 186, 132, 0.78);
}

.list-management-history-item.is-error {
  border-left-color: rgba(239, 98, 98, 0.8);
}

.list-management-history-item.is-running {
  border-left-color: rgba(126, 161, 224, 0.82);
}

.list-management-history-item > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.list-management-history-empty strong,
.list-management-history-item strong {
  color: var(--text);
  font-size: 0.78rem;
}

.list-management-history-empty span,
.list-management-history-item span,
.list-management-history-item small {
  color: var(--text-dim);
  font-size: 0.68rem;
}

.list-management-history-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.55;
}

.list-management-report-filters {
  display: grid;
  gap: 8px;
}

.list-management-report-rule {
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  background: rgba(18, 21, 26, 0.9);
  color: var(--text-soft);
  font-size: 0.75rem;
  line-height: 1.55;
}

.field-management-config-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-management-record-item {
  gap: 3px;
  min-height: 0;
  padding: 10px 12px;
  align-content: start;
  grid-auto-rows: min-content;
}

.field-management-record-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.field-management-record-top > span:first-child {
  min-width: 0;
}

.field-management-record-badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  background: rgba(17, 20, 25, 0.7);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.field-management-record-badge.is-custom {
  color: rgba(227, 235, 245, 0.95);
}

.field-management-record-badge.is-ai {
  color: rgba(205, 221, 238, 0.92);
}

.field-management-record-badge.is-system {
  color: var(--text-dim);
}

.field-management-record-summary {
  display: block;
  color: rgba(196, 204, 214, 0.78);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.field-management-record-item .list-management-record-title {
  min-width: 0;
  font-size: 0.79rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.field-management-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
}

.field-management-metric {
  display: grid;
  gap: 3px;
  align-content: start;
  min-height: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  background: rgba(22, 25, 31, 0.76);
}

.field-management-metric-label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field-management-metric strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.field-management-readonly-stack,
.field-management-editor-stack {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field-management-readonly-stack .summary-card,
.field-management-editor-stack .summary-card,
.field-management-editor-stack .toggle-stack {
  padding: 10px 11px;
}

.field-management-detail {
  max-width: 100%;
  padding: 10px 12px 12px;
  background: rgba(16, 19, 24, 0.992);
  overflow: auto;
  overflow-x: hidden;
}

.field-management-detail-panel {
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  contain: layout paint;
}

.field-management-detail-panel .panel-header {
  align-items: center;
}

.field-management-detail-panel .panel-header > div {
  min-width: 0;
}

.field-management-detail-panel .panel-header h3 {
  overflow-wrap: anywhere;
}

.field-management-detail-panel .panel-badge {
  min-width: 60px;
  min-height: 22px;
  padding: 0 8px;
  font-size: 0.63rem;
}

.field-management-detail-panel .summary-card p {
  margin: 0;
}

.field-management-detail-panel .summary-card p + p {
  margin-top: 3px;
}

.field-management-readonly-actions,
.field-management-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.field-management-window .field {
  gap: 4px;
}

.field-management-window .field span {
  font-size: 0.69rem;
  color: rgba(198, 206, 216, 0.9);
}

.field-management-window .field-grid {
  gap: 8px;
}

.field-management-window .field input,
.field-management-window .field select,
.field-management-window .field textarea {
  min-width: 0;
  max-width: 100%;
  min-height: 30px;
  padding: 7px 9px;
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(21, 24, 30, 0.82);
  font-size: 0.74rem;
}

.field-management-window .field textarea {
  min-height: 84px;
}

.field-management-window .field textarea#fieldManagementFieldOptionsInput {
  min-height: 72px;
}

.field-management-toggle-stack {
  gap: 6px;
  padding: 10px 11px;
}

.field-management-toggle-stack .toggle-row {
  gap: 8px;
  font-size: 0.76rem;
}

.field-management-match-section {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  gap: 10px;
  contain: layout paint;
}

.field-management-match-association-section {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.field-management-match-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.field-management-match-titleblock {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.field-management-match-titleblock p {
  margin: 0;
}

.field-management-match-titleblock p + p {
  color: var(--text-dim);
  font-size: 0.71rem;
  line-height: 1.5;
}

.field-management-match-config-grid {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-management-match-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-management-match-label {
  color: rgba(198, 206, 216, 0.9);
  font-size: 0.69rem;
}

.field-management-match-checklist {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 4px;
  max-height: 148px;
  min-height: 38px;
  overflow: auto;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  background: rgba(18, 22, 27, 0.82);
}

.field-management-match-option {
  min-width: 0;
  align-items: flex-start;
  min-height: 0;
  padding: 4px 2px;
  overflow: hidden;
}

.field-management-match-option span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.field-management-match-option strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
}

.field-management-match-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
  font-size: 0.66rem;
  line-height: 1.4;
}

.field-management-match-empty {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.7rem;
  line-height: 1.5;
}

.field-management-match-upload-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-management-match-file-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.field-management-match-domain-list {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 7px;
  min-height: 42px;
  max-height: 150px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  background: rgba(18, 22, 27, 0.82);
}

.field-management-match-domain-summary {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.field-management-match-reference-list {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.field-management-match-reference-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
}

.field-management-match-reference-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.field-management-match-reference-copy strong,
.field-management-match-reference-copy span,
.field-management-match-reference-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-management-match-reference-copy strong {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
}

.field-management-match-reference-copy span {
  color: var(--text-soft);
  font-size: 0.68rem;
}

.field-management-match-reference-copy small {
  color: var(--text-dim);
  font-size: 0.64rem;
}

.field-management-match-domain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.field-management-match-domain-chips span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.68rem;
}

.matched-on-links {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matched-on-links a {
  color: var(--accent);
  text-decoration: none;
}

.matched-on-links a:hover {
  text-decoration: underline;
}

.matched-on-separator {
  color: var(--text-dim);
}

.field-management-match-run-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-management-match-status {
  display: grid;
  gap: 3px;
  padding-top: 1px;
}

.field-management-match-status p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.45;
}

.field-management-operators {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.field-management-operator-chip {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  background: rgba(16, 19, 24, 0.72);
  color: var(--text-soft);
  font-size: 0.66rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.field-management-usage {
  display: grid;
  gap: 4px;
}

.field-management-usage p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.4;
}

.field-management-usage strong {
  color: var(--text);
  margin-right: 5px;
}

.field-management-lifecycle {
  gap: 4px;
}

.field-management-lifecycle p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1.4;
}

.field-management-lifecycle strong {
  color: var(--text);
  margin-right: 5px;
}

.field-management-definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 14px;
}

.field-management-definition-item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.field-management-definition-label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-management-definition-value {
  color: var(--text);
  font-size: 0.73rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.field-management-readonly-values {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.field-management-readonly-value {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  background: rgba(21, 25, 31, 0.72);
  color: var(--text-soft);
  font-size: 0.65rem;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-management-window .list-management-body {
  grid-template-columns: 188px 384px minmax(0, 1fr);
}

.field-management-window .list-management-sidebar {
  padding: 12px;
  gap: 10px;
}

.field-management-window .list-management-nav-item {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.75rem;
}

.field-management-window .list-management-records {
  padding: 12px 0 12px 12px;
  gap: 8px;
}

.field-management-window .list-management-list-header {
  padding-right: 12px;
}

.field-management-window .list-management-record-list {
  padding-right: 12px;
  gap: 4px;
}

.field-management-window .list-management-record-item {
  min-height: 0;
  padding: 10px 12px;
  border-radius: 2px;
}

.field-management-window .list-management-record-title {
  font-size: 0.8rem;
}

.field-management-window .field-management-record-item {
  gap: 4px;
  grid-auto-rows: min-content;
  align-content: start;
}

.field-management-window .field-management-record-top {
  align-items: center;
}

.field-management-window .field-management-record-summary {
  color: rgba(182, 191, 202, 0.88);
  font-size: 0.68rem;
  line-height: 1.35;
  white-space: normal;
}

.field-management-window .field-management-detail {
  padding: 12px 14px 14px;
}

.field-management-window .list-management-detail-panel {
  gap: 10px;
}

.field-management-window .field-management-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.field-management-window .field-management-readonly-stack {
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.9fr);
  align-items: start;
}

.field-management-window .field-management-readonly-stack > * {
  min-width: 0;
}

.field-management-window #fieldManagementReadonlyValuesCard {
  grid-column: 1 / -1;
}

.field-management-window .field-management-definition-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-management-window .field-management-definition-value {
  max-width: 100%;
}

.field-management-window .field-management-operators {
  gap: 6px;
}

.field-management-window .field-management-operator-chip {
  max-width: 100%;
}

.field-management-window .list-management-empty-state,
.field-management-window .list-management-record-empty {
  padding: 14px;
}

.field-management-window .list-management-nav-item {
  min-height: 29px;
  padding: 0 9px;
  font-size: 0.74rem;
}

@media (max-width: 1280px) {
  .field-management-match-config-grid,
  .field-management-match-run-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.custom-field-inherited {
  color: var(--text-dim);
}

.settings-section-full {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(140, 154, 169, 0.1);
}

.settings-section .summary-card p strong {
  color: var(--text);
}

.settings-section code {
  color: var(--accent-strong);
  font-family: var(--font-mono);
}

.ai-column-list {
  display: grid;
  gap: 7px;
}

.ai-column-card {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(140, 154, 169, 0.1);
  border-left: 2px solid rgba(137, 167, 207, 0.18);
  background: rgba(9, 13, 18, 0.52);
}

.ai-column-card.is-disabled {
  opacity: 0.78;
}

.ai-column-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ai-column-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ai-column-card-copy strong {
  color: var(--text);
  font-size: 0.76rem;
}

.ai-column-card-copy span {
  color: var(--text-dim);
  font-size: 0.64rem;
}

.ai-column-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ai-column-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(123, 135, 150, 0.12);
  border-radius: 2px;
  background: rgba(20, 26, 32, 0.92);
  color: #d5dde6;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ai-column-prompt {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

.ai-column-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1680px) {
  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  :root {
    --left-rail-width: 360px;
    --right-rail-width: 320px;
  }

  .workspace-shell {
    border-radius: 0;
    height: 100%;
  }

  .app-shell {
    padding: 0;
  }

  .menu-shell {
    border-radius: 0;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  :root {
    --menu-shell-height: 68px;
    --crm-action-bar-height: 72px;
  }

  .menu-shell {
    flex-wrap: wrap;
    align-content: center;
    min-height: 68px;
    padding: 8px 12px;
  }

  .crm-action-bar {
    min-height: var(--crm-action-bar-height);
    align-items: flex-start;
    padding: 8px 12px;
  }

  .menu-fast-actions {
    flex-wrap: wrap;
  }

  .menu-fast-groups {
    flex: 1 1 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

  .menu-fast-group {
    flex-wrap: wrap;
  }

  .help-map {
    grid-template-columns: 1fr;
  }

  .crm-action-target {
    flex: 1 1 260px;
    max-width: none;
    margin-left: 0;
  }

  .menu-fast-btn.danger-fast-btn {
    margin-left: 0;
  }

  .menu-shell-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .menu-status-cluster {
    flex-wrap: wrap;
  }

  .workspace-shell {
    --right-width: 0px;
  }

  .right-rail {
    visibility: hidden;
  }

  .top-bar,
  .grid-toolbar-row-primary,
  .grid-toolbar-row-secondary {
    grid-template-columns: minmax(0, 1fr);
  }

  .top-bar-actions {
    justify-items: stretch;
  }

  .connector-cluster,
  .command-actions,
  .toolbar-action-cluster,
  .toolbar-shortcuts {
    justify-content: flex-start;
  }

  .field-grid,
  .automation-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feed-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-window-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-window-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .settings-integration-grid,
  .settings-service-list,
  .ai-people-finder-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-fast-actions-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-fast-action-row,
  .settings-service-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .settings-fast-action-copy {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-fast-action-copy span {
    justify-self: flex-start;
  }

  .settings-fast-action-controls {
    justify-content: flex-start;
  }

  .sequence-studio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sequence-studio-topbar,
  .sequence-studio-footer {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .ai-column-card-head {
    flex-direction: column;
  }

  .ai-column-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  :root {
    --left-rail-width: 320px;
  }

  .workspace-shell {
    --left-width: 0px;
  }

  .left-rail {
    visibility: hidden;
  }

  .metric-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-window-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-window-header-actions {
    justify-content: flex-start;
  }

  .toolbar-search {
    width: 100%;
  }

  .toolbar-search input,
  .toolbar-search select {
    min-width: 0;
    width: 100%;
  }

  .tagging-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .sequence-studio-sheet {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
  }

  .sequence-studio-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
}

/* Immersive grid-first shell */

.app-shell.is-grid-fullscreen .menu-shell {
  display: flex;
}

.menu-shell {
  position: relative;
  z-index: 60;
  min-height: var(--menu-shell-height);
  gap: 8px;
  padding: 0 6px;
  background: rgba(16, 19, 24, 0.985);
  backdrop-filter: blur(16px);
}

.workspace-shell,
.workspace-shell.is-grid-fullscreen {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.028), transparent 28%),
    rgba(11, 14, 19, 0.998);
}

.workspace-main,
.workspace-shell.is-grid-fullscreen .workspace-main {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background: transparent;
}

.top-bar,
.metric-strip,
.grid-toolbar,
.workspace-shell.is-grid-fullscreen .top-bar,
.workspace-shell.is-grid-fullscreen .metric-strip,
.workspace-shell.is-grid-fullscreen .grid-toolbar {
  display: none !important;
}

.grid-frame,
.workspace-shell.is-grid-fullscreen .grid-frame {
  height: 100%;
  border-top: none;
  background:
    linear-gradient(180deg, rgba(14, 18, 23, 0.985), rgba(10, 13, 18, 0.995)),
    rgba(10, 13, 18, 0.995);
}

.grid-header {
  background: rgba(31, 36, 43, 0.988);
}

.grid-body {
  background:
    linear-gradient(180deg, rgba(13, 16, 21, 0.995), rgba(10, 13, 18, 0.998)),
    rgba(10, 13, 18, 0.998);
}

.empty-state {
  inset: 18px;
}

.left-rail,
.right-rail,
.workspace-shell.is-grid-fullscreen .left-rail,
.workspace-shell.is-grid-fullscreen .right-rail {
  position: absolute;
  top: 12px;
  bottom: 12px;
  min-width: 0;
  overflow: hidden;
  visibility: visible;
  display: grid;
  z-index: 24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  box-shadow:
    0 26px 48px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  backdrop-filter: blur(16px);
  transition:
    opacity 140ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.left-rail,
.workspace-shell.is-grid-fullscreen .left-rail {
  left: 12px;
  width: min(404px, calc(100% - 24px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(32, 37, 44, 0.92), rgba(23, 27, 33, 0.9));
}

.right-rail,
.workspace-shell.is-grid-fullscreen .right-rail {
  right: 12px;
  width: min(368px, calc(100% - 24px));
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(22, 26, 32, 0.985), rgba(17, 21, 27, 0.972));
}

.workspace-shell.is-left-collapsed .left-rail,
.workspace-shell.is-zen .left-rail {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-18px);
}

.workspace-shell.is-right-collapsed .right-rail,
.workspace-shell.is-zen .right-rail {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(18px);
}

.workspace-shell:not(.is-left-collapsed):not(.is-zen) .left-rail,
.workspace-shell:not(.is-right-collapsed):not(.is-zen) .right-rail {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.workspace-shell.is-grid-fullscreen .rail-handle,
.rail-handle {
  display: none !important;
}

.rail-header,
.rail-header-right {
  background: rgba(27, 32, 39, 0.96);
}

.left-panel,
.right-panel {
  background: transparent;
}

.menu-utility-btn-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .left-rail,
  .workspace-shell.is-grid-fullscreen .left-rail {
    width: min(392px, calc(100% - 24px));
  }

  .right-rail,
  .workspace-shell.is-grid-fullscreen .right-rail {
    width: min(340px, calc(100% - 24px));
  }
}

@media (max-width: 960px) {
  .menu-status-cluster {
    display: none;
  }

  .menu-pagination {
    display: none;
  }

  .left-rail,
  .right-rail,
  .workspace-shell.is-grid-fullscreen .left-rail,
  .workspace-shell.is-grid-fullscreen .right-rail {
    top: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
  }

  .left-rail,
  .workspace-shell.is-grid-fullscreen .left-rail {
    left: 10px;
  }

  .right-rail,
  .workspace-shell.is-grid-fullscreen .right-rail {
    right: 10px;
  }
}

body[data-theme="light"] {
  --bg-0: #f4f7fb;
  --bg-1: #f8fafc;
  --bg-2: #eef3f8;
  --surface-1: rgba(255, 255, 255, 0.98);
  --surface-2: rgba(251, 253, 255, 0.985);
  --surface-3: rgba(245, 248, 252, 0.99);
  --surface-4: rgba(236, 242, 249, 0.995);
  --line: rgba(62, 83, 107, 0.1);
  --line-strong: rgba(62, 83, 107, 0.18);
  --text: #16202e;
  --text-soft: #4f6076;
  --text-dim: #7a8ba1;
  --accent: #6c86a7;
  --accent-strong: #295e99;
  --accent-soft: rgba(70, 118, 173, 0.12);
  --danger: #c45f63;
  --warning: #bf9443;
  --success: #5f9b72;
  color: var(--text);
  background:
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 36%, #edf2f7 100%);
}

body[data-theme="light"]::before {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.18));
  opacity: 1;
}

body[data-theme="light"] * {
  scrollbar-color: rgba(152, 169, 191, 0.95) rgba(225, 232, 241, 0.88);
}

body[data-theme="light"] *::-webkit-scrollbar-track {
  background: rgba(225, 232, 241, 0.88);
}

body[data-theme="light"] *::-webkit-scrollbar-thumb {
  background: rgba(152, 169, 191, 0.95);
  border-color: rgba(225, 232, 241, 0.88);
}

body[data-theme="light"] textarea,
body[data-theme="light"] input,
body[data-theme="light"] select {
  border-color: rgba(81, 102, 126, 0.14);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] textarea::placeholder,
body[data-theme="light"] input::placeholder {
  color: rgba(112, 129, 149, 0.86);
}

body[data-theme="light"] .list-management-checkbox-field .checkbox-row,
body[data-theme="light"] .list-management-timezone-pill,
body[data-theme="light"] .list-management-day-grid label,
body[data-theme="light"] .list-management-specific-date-pill {
  border-color: rgba(81, 102, 126, 0.14);
  background: rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] textarea:focus,
body[data-theme="light"] input:focus,
body[data-theme="light"] select:focus,
body[data-theme="light"] .ghost-btn:focus-visible,
body[data-theme="light"] .primary-btn:focus-visible,
body[data-theme="light"] .type-tab:focus-visible,
body[data-theme="light"] .menu-root-btn:focus-visible,
body[data-theme="light"] .menu-utility-btn:focus-visible,
body[data-theme="light"] .menu-command-btn:focus-visible,
body[data-theme="light"] .tree-row:focus-visible,
body[data-theme="light"] .grid-row:focus-visible {
  border-color: rgba(65, 112, 169, 0.32);
  box-shadow: 0 0 0 3px rgba(65, 112, 169, 0.12);
}

body[data-theme="light"] .app-shell,
body[data-theme="light"] .workspace-shell,
body[data-theme="light"] .workspace-main,
body[data-theme="light"] .settings-window,
body[data-theme="light"] .settings-window-shell {
  background: transparent;
}

body[data-theme="light"] .menu-shell {
  border-bottom-color: rgba(78, 101, 128, 0.12);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 0 rgba(133, 149, 169, 0.08);
}

body[data-theme="light"] .crm-action-bar {
  border-top-color: rgba(78, 101, 128, 0.08);
  border-bottom-color: rgba(78, 101, 128, 0.11);
  background:
    linear-gradient(180deg, rgba(248, 251, 254, 0.98), rgba(240, 245, 250, 0.98)),
    rgba(248, 251, 254, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 0 rgba(133, 149, 169, 0.06);
}

body[data-theme="light"] .menu-brand {
  border-right-color: rgba(78, 101, 128, 0.12);
  color: #172131;
}

body[data-theme="light"] .menu-root-btn,
body[data-theme="light"] .menu-utility-btn,
body[data-theme="light"] .menu-command-btn {
  color: #495b73;
}

body[data-theme="light"] .menu-root-btn:hover,
body[data-theme="light"] .menu-root-btn.is-open,
body[data-theme="light"] .menu-utility-btn:hover,
body[data-theme="light"] .menu-utility-btn.is-active,
body[data-theme="light"] .menu-command-btn:hover {
  color: #172131;
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(236, 242, 249, 0.98);
}

body[data-theme="light"] .menu-command-btn {
  background: rgba(244, 248, 252, 0.98);
  border-color: rgba(85, 109, 136, 0.14);
}

body[data-theme="light"] .menu-fast-actions {
  background: transparent;
  box-shadow: none;
}

body[data-theme="light"] .menu-fast-label {
  color: #718097;
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

body[data-theme="light"] .menu-fast-group {
  border-left-color: rgba(85, 109, 136, 0.14);
}

body[data-theme="light"] .menu-fast-group-label {
  color: #718097;
}

body[data-theme="light"] .menu-fast-btn {
  border-color: rgba(85, 109, 136, 0.13);
  color: #44566f;
  background: rgba(255, 255, 255, 0.74);
}

body[data-theme="light"] .menu-fast-btn:hover,
body[data-theme="light"] .menu-fast-btn:focus-visible,
body[data-theme="light"] .menu-fast-btn.is-active {
  color: #172131;
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(230, 237, 246, 0.98);
}

body[data-theme="light"] .menu-fast-btn.danger-fast-btn {
  border-color: rgba(185, 28, 28, 0.16);
  color: #9f3b3b;
  background: rgba(254, 242, 242, 0.86);
}

body[data-theme="light"] .menu-fast-btn.danger-fast-btn:hover,
body[data-theme="light"] .menu-fast-btn.danger-fast-btn:focus-visible {
  color: #7f1d1d;
  border-color: rgba(185, 28, 28, 0.18);
  background: rgba(254, 226, 226, 0.98);
}

body[data-theme="light"] .menu-fast-btn.is-unavailable,
body[data-theme="light"] .menu-fast-btn.is-unavailable:hover,
body[data-theme="light"] .menu-fast-btn.is-unavailable:focus-visible {
  color: rgba(113, 128, 151, 0.66);
  border-color: rgba(85, 109, 136, 0.08);
  background: rgba(236, 241, 247, 0.66);
  box-shadow: none;
}

body[data-theme="light"] .menu-fast-btn.danger-fast-btn.is-unavailable,
body[data-theme="light"] .menu-fast-btn.danger-fast-btn.is-unavailable:hover,
body[data-theme="light"] .menu-fast-btn.danger-fast-btn.is-unavailable:focus-visible {
  color: rgba(159, 59, 59, 0.58);
  border-color: rgba(185, 28, 28, 0.09);
  background: rgba(253, 244, 244, 0.72);
}

body[data-theme="light"] .crm-action-target {
  border-color: rgba(85, 109, 136, 0.12);
  color: #44566f;
  background: rgba(241, 246, 252, 0.86);
}

body[data-theme="light"] .crm-action-target.is-empty {
  color: #718097;
}

body[data-theme="light"] .crm-selection-summary {
  border-color: rgba(85, 109, 136, 0.12);
  color: #44566f;
  background: rgba(241, 246, 252, 0.88);
}

body[data-theme="light"] .crm-selection-summary.is-empty {
  color: #718097;
  background: rgba(255, 255, 255, 0.58);
}

body[data-theme="light"] .crm-selection-label {
  color: #718097;
}

body[data-theme="light"] .crm-selection-chip-btn {
  border-color: rgba(85, 109, 136, 0.14);
  color: #44566f;
  background: rgba(255, 255, 255, 0.8);
}

body[data-theme="light"] .crm-selection-chip-btn:hover,
body[data-theme="light"] .crm-selection-chip-btn:focus-visible {
  color: #172131;
  border-color: rgba(85, 109, 136, 0.14);
  background: rgba(230, 237, 246, 0.98);
}

body[data-theme="light"] .crm-selection-chip-btn.is-unavailable,
body[data-theme="light"] .crm-selection-chip-btn:disabled {
  color: rgba(113, 128, 151, 0.62);
  border-color: rgba(85, 109, 136, 0.08);
  background: rgba(241, 246, 252, 0.68);
}

body[data-theme="light"] .crm-action-tooltip {
  border-color: rgba(85, 109, 136, 0.16);
  color: #172131;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 26px rgba(71, 85, 105, 0.16);
}

body[data-theme="light"] .menu-status-chip {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(250, 252, 255, 0.98);
}

body[data-theme="light"] .menu-filter-summary {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(250, 252, 255, 0.98);
}

body[data-theme="light"] .menu-filter-summary.has-filters {
  border-color: rgba(85, 109, 136, 0.2);
  background: rgba(245, 249, 254, 0.98);
}

body[data-theme="light"] .menu-filter-summary strong {
  color: #23344b;
}

body[data-theme="light"] .menu-filter-clear-btn {
  color: #5b6f88;
}

body[data-theme="light"] .menu-filter-clear-btn:hover {
  color: #172131;
}

body[data-theme="light"] .menu-pagination {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(250, 252, 255, 0.98);
}

body[data-theme="light"] .menu-pagination-btn {
  color: #23344b;
}

body[data-theme="light"] .menu-pagination-btn:hover:not(:disabled),
body[data-theme="light"] .menu-pagination-btn:focus-visible:not(:disabled) {
  color: #172131;
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(236, 242, 249, 0.98);
}

body[data-theme="light"] .menu-pagination-label {
  color: #23344b;
}

body[data-theme="light"] .menu-pagination-jump-wrap span {
  color: #5b6f88;
}

body[data-theme="light"] .menu-pagination-jump-input {
  border-color: rgba(85, 109, 136, 0.15);
  color: #23344b;
  background: rgba(252, 254, 255, 0.98);
}

body[data-theme="light"] .menu-pagination-jump-input:focus-visible {
  border-color: rgba(85, 109, 136, 0.25);
}

body[data-theme="light"] .menu-pagination-size-wrap span {
  color: #5b6f88;
}

body[data-theme="light"] .menu-pagination-size-select {
  border-color: rgba(85, 109, 136, 0.15);
  color: #23344b;
  background: rgba(252, 254, 255, 0.98);
}

body[data-theme="light"] .menu-pagination-size-select:focus-visible {
  border-color: rgba(85, 109, 136, 0.25);
}

body[data-theme="light"] .menu-panel,
body[data-theme="light"] .menu-subpanel {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(255, 255, 255, 0.985);
  box-shadow:
    0 18px 34px rgba(113, 131, 154, 0.14),
    0 2px 10px rgba(113, 131, 154, 0.08);
}

body[data-theme="light"] .menu-panel-item {
  color: #4e6078;
}

body[data-theme="light"] .menu-panel-item:hover,
body[data-theme="light"] .menu-panel-item.is-open {
  color: #172131;
  border-color: rgba(85, 109, 136, 0.08);
  background: rgba(241, 246, 251, 0.98);
}

body[data-theme="light"] .menu-panel-item.is-checked::before {
  color: #2f69ab;
}

body[data-theme="light"] .menu-divider {
  background: rgba(91, 111, 136, 0.1);
}

body[data-theme="light"] .left-rail,
body[data-theme="light"] .workspace-shell.is-grid-fullscreen .left-rail {
  border-right-color: rgba(78, 101, 128, 0.1);
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(244, 248, 252, 0.98));
}

body[data-theme="light"] .right-rail,
body[data-theme="light"] .workspace-shell.is-grid-fullscreen .right-rail {
  border-left-color: rgba(78, 101, 128, 0.1);
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.985), rgba(245, 249, 253, 0.985));
}

body[data-theme="light"] .rail-header,
body[data-theme="light"] .rail-header-right {
  border-bottom-color: rgba(78, 101, 128, 0.08);
  background: rgba(249, 252, 255, 0.96);
}

body[data-theme="light"] .filters-rail-title h1,
body[data-theme="light"] .rail-header h1,
body[data-theme="light"] .rail-header h2,
body[data-theme="light"] .title-line h2,
body[data-theme="light"] .settings-window-titleblock h2,
body[data-theme="light"] .sequence-studio-titleblock h3 {
  color: #1a2535;
}

body[data-theme="light"] .eyebrow,
body[data-theme="light"] .menu-status-label,
body[data-theme="light"] .pill-label,
body[data-theme="light"] .toolbar-hint,
body[data-theme="light"] .tree-section-label,
body[data-theme="light"] .filter-card-title,
body[data-theme="light"] .field-management-metric-label,
body[data-theme="light"] .field-management-definition-label {
  color: #7f90a6;
}

body[data-theme="light"] .summary-card,
body[data-theme="light"] .preview-card,
body[data-theme="light"] .summary-item,
body[data-theme="light"] .inspector-card,
body[data-theme="light"] .activity-item,
body[data-theme="light"] .field-management-sidebar .summary-card,
body[data-theme="light"] .field-management-detail .summary-card,
body[data-theme="light"] .field-management-records .summary-card {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 2px rgba(133, 149, 169, 0.04);
}

body[data-theme="light"] .activity-item-live {
  border-color: rgba(57, 105, 180, 0.24);
  background: rgba(235, 242, 255, 0.96);
}

body[data-theme="light"] .ghost-btn,
body[data-theme="light"] .type-tab,
body[data-theme="light"] .primary-btn {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(255, 255, 255, 0.98);
  color: #4d5e75;
}

body[data-theme="light"] .ghost-btn:hover,
body[data-theme="light"] .type-tab:hover,
body[data-theme="light"] .primary-btn:hover {
  border-color: rgba(85, 109, 136, 0.16);
  background: rgba(242, 247, 252, 0.98);
  color: #172131;
}

body[data-theme="light"] .type-tab.is-active,
body[data-theme="light"] .primary-btn {
  background: #2f76d2;
  border-color: rgba(36, 97, 177, 0.38);
  color: #f6fbff;
}

body[data-theme="light"] .danger-btn {
  color: #bb565b;
}

body[data-theme="light"] .toggle-stack,
body[data-theme="light"] .tagging-controls,
body[data-theme="light"] .trace-details,
body[data-theme="light"] .list-management-preview-body,
body[data-theme="light"] .list-management-report-rule {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .fields-panel {
  border-color: rgba(92, 111, 132, 0.16);
  background: rgba(255, 255, 255, 0.98);
  color: #1b2635;
  box-shadow:
    -12px 0 30px rgba(76, 96, 120, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .fields-panel-copy,
body[data-theme="light"] .fields-panel-row-copy small,
body[data-theme="light"] .fields-panel-row em,
body[data-theme="light"] .fields-panel-empty,
body[data-theme="light"] .fields-panel-footer {
  color: #68798e;
}

body[data-theme="light"] .fields-panel-search {
  border-color: rgba(92, 111, 132, 0.16);
  background: #f7f9fc;
  color: #1d2a3b;
}

body[data-theme="light"] .fields-panel-row {
  color: #34445a;
}

body[data-theme="light"] .fields-panel-row:hover {
  border-color: rgba(76, 103, 136, 0.14);
  background: #f2f5f9;
}

body[data-theme="light"] .fields-panel-row-copy strong {
  color: #172232;
}

body[data-theme="light"] .fields-panel-footer {
  border-color: rgba(92, 111, 132, 0.13);
}

body[data-theme="light"] .filters-rail-actions .ghost-btn,
body[data-theme="light"] .tree-add-btn,
body[data-theme="light"] .filter-card-remove,
body[data-theme="light"] .filter-show-more-btn {
  color: #6d7e93;
}

body[data-theme="light"] .filters-rail-actions .ghost-btn {
  border-color: rgba(85, 109, 136, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

body[data-theme="light"] .filters-rail-actions .ghost-btn:hover,
body[data-theme="light"] .tree-add-btn:hover,
body[data-theme="light"] .filter-card-remove:hover,
body[data-theme="light"] .filter-show-more-btn:hover {
  color: #1a2535;
  background: rgba(240, 245, 250, 0.9);
}

body[data-theme="light"] .filters-builder-panel .field span,
body[data-theme="light"] .filters-toolbar-panel .field span,
body[data-theme="light"] .field span,
body[data-theme="light"] .summary-card p,
body[data-theme="light"] .summary-item p,
body[data-theme="light"] .inspector-card p,
body[data-theme="light"] .activity-item p,
body[data-theme="light"] .trace-summary,
body[data-theme="light"] .sequence-studio-lead,
body[data-theme="light"] .sequence-studio-footer-copy,
body[data-theme="light"] .settings-window-subtitle,
body[data-theme="light"] .list-management-record-meta,
body[data-theme="light"] .field-management-record-summary {
  color: #5d6f86;
}

body[data-theme="light"] .filters-card-list {
  padding-right: 2px;
}

body[data-theme="light"] .filter-card,
body[data-theme="light"] .filters-query-card,
body[data-theme="light"] .list-management-record-empty,
body[data-theme="light"] .list-management-empty-state {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(133, 149, 169, 0.04);
}

body[data-theme="light"] .filter-logic-chip {
  color: #7c8ca2;
}

body[data-theme="light"] .filter-logic-chip:hover {
  background: rgba(233, 239, 247, 0.94);
  color: #223246;
}

body[data-theme="light"] .filter-option-note {
  color: #687a91;
}

body[data-theme="light"] .filter-option-list {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(250, 252, 255, 0.94);
}

body[data-theme="light"] .workspace-main,
body[data-theme="light"] .workspace-shell.is-grid-fullscreen .workspace-main {
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(243, 247, 252, 0.98));
}

body[data-theme="light"] .top-bar,
body[data-theme="light"] .metric-strip,
body[data-theme="light"] .grid-toolbar,
body[data-theme="light"] .workspace-shell.is-grid-fullscreen .top-bar,
body[data-theme="light"] .workspace-shell.is-grid-fullscreen .metric-strip,
body[data-theme="light"] .workspace-shell.is-grid-fullscreen .grid-toolbar {
  border-bottom-color: rgba(82, 104, 129, 0.08);
  background: rgba(251, 253, 255, 0.95);
}

body[data-theme="light"] .connector-pill,
body[data-theme="light"] .metric-card {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .grid-frame,
body[data-theme="light"] .workspace-shell.is-grid-fullscreen .grid-frame {
  border-top-color: rgba(82, 104, 129, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

body[data-theme="light"] .grid-header {
  border-bottom-color: rgba(82, 104, 129, 0.08);
  background: rgba(250, 252, 255, 0.985);
  color: #65778f;
}

body[data-theme="light"] .grid-header .cell {
  border-right-color: rgba(82, 104, 129, 0.08);
}

body[data-theme="light"] .grid-header .cell.is-active-column {
  background: rgba(237, 243, 249, 0.98);
  color: #1d2a3a;
  box-shadow: inset 0 -1px 0 rgba(86, 118, 155, 0.22);
}

body[data-theme="light"] .grid-header .cell.is-dragging {
  background: rgba(234, 240, 247, 0.9);
}

body[data-theme="light"] .grid-header .cell.is-drop-before::after,
body[data-theme="light"] .grid-header .cell.is-drop-after::after {
  background: rgba(47, 118, 210, 0.68);
  box-shadow: 0 0 0 1px rgba(47, 118, 210, 0.12);
}

body[data-theme="light"] .grid-col-resize-handle::before {
  background: rgba(111, 132, 156, 0.18);
}

body[data-theme="light"] .grid-header .cell:hover .grid-col-resize-handle::before,
body[data-theme="light"] .grid-col-resize-handle:hover::before,
body[data-theme="light"] .workspace-shell.is-resizing-columns .grid-col-resize-handle::before {
  background: rgba(73, 113, 158, 0.52);
  box-shadow: 0 0 0 1px rgba(73, 113, 158, 0.12);
}

body[data-theme="light"] .grid-body {
  background: rgba(255, 255, 255, 0.98);
}

body[data-theme="light"] .grid-row {
  border-bottom-color: rgba(82, 104, 129, 0.08);
  color: #35475d;
}

body[data-theme="light"] .grid-row:hover {
  background: rgba(241, 246, 251, 0.92);
}

body[data-theme="light"] .grid-row.is-account,
body[data-theme="light"] .grid-row.is-company {
  background: rgba(250, 252, 255, 0.98);
  color: #1d2b3c;
}

body[data-theme="light"] .grid-row.is-account:hover,
body[data-theme="light"] .grid-row.is-company:hover {
  background: rgba(243, 247, 252, 0.98);
}

body[data-theme="light"] .grid-row.is-contact {
  background: rgba(255, 255, 255, 0.98);
}

body[data-theme="light"] .grid-row.is-email {
  background: rgba(248, 250, 253, 0.98);
}

body[data-theme="light"] .grid-row.is-contact.is-routed {
  background:
    linear-gradient(90deg, rgba(114, 181, 128, 0.18), rgba(114, 181, 128, 0.06) 28%, transparent 56%),
    rgba(245, 252, 247, 0.98);
  box-shadow: inset 2px 0 0 rgba(114, 181, 128, 0.7);
}

body[data-theme="light"] .grid-row.is-contact.is-routed:hover {
  background:
    linear-gradient(90deg, rgba(114, 181, 128, 0.22), rgba(114, 181, 128, 0.08) 28%, transparent 56%),
    rgba(241, 250, 243, 0.99);
}

body[data-theme="light"] .grid-row.is-selected {
  box-shadow: inset 2px 0 0 rgba(83, 122, 168, 0.58);
  background: rgba(239, 245, 252, 0.95);
}

body[data-theme="light"] .grid-row.is-range-selected {
  box-shadow: inset 2px 0 0 rgba(190, 154, 80, 0.6);
  background:
    linear-gradient(90deg, rgba(216, 190, 118, 0.2), rgba(216, 190, 118, 0.06) 28%, transparent 58%),
    rgba(252, 249, 241, 0.98);
}

body[data-theme="light"] .grid-row.is-range-selected:hover {
  background:
    linear-gradient(90deg, rgba(216, 190, 118, 0.24), rgba(216, 190, 118, 0.08) 28%, transparent 58%),
    rgba(250, 247, 237, 0.99);
}

body[data-theme="light"] .grid-row.is-focused {
  background:
    linear-gradient(90deg, rgba(91, 132, 184, 0.16), rgba(91, 132, 184, 0.04) 18%, transparent 42%),
    rgba(243, 248, 253, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(91, 132, 184, 0.1),
    inset 0 -1px 0 rgba(91, 132, 184, 0.1);
}

body[data-theme="light"] .grid-row.is-contact.is-routed.is-focused {
  background:
    linear-gradient(90deg, rgba(114, 181, 128, 0.2), rgba(114, 181, 128, 0.08) 20%, transparent 42%),
    rgba(241, 249, 243, 0.99);
}

body[data-theme="light"] .grid-row.is-range-selected.is-focused {
  background:
    linear-gradient(90deg, rgba(216, 190, 118, 0.22), rgba(216, 190, 118, 0.08) 18%, transparent 42%),
    rgba(250, 247, 238, 0.99);
}

body[data-theme="light"] .grid-row.is-focused::before,
body[data-theme="light"] .grid-row .cell.is-focused-cell::after {
  background: rgba(91, 132, 184, 0.54);
}

body[data-theme="light"] .grid-row.is-contact.is-routed.is-focused::before,
body[data-theme="light"] .grid-row.is-contact.is-routed .cell.is-focused-cell::after {
  background: rgba(114, 181, 128, 0.7);
}

body[data-theme="light"] .grid-row.is-range-selected.is-focused::before,
body[data-theme="light"] .grid-row.is-range-selected .cell.is-focused-cell::after {
  background: rgba(190, 154, 80, 0.72);
}

body[data-theme="light"] .grid-row .cell {
  border-right-color: rgba(82, 104, 129, 0.08);
}

body[data-theme="light"] .grid-row .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.99), rgba(240, 245, 250, 0.99));
  color: #16202e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .grid-row.is-selected .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(243, 248, 254, 0.99), rgba(236, 242, 249, 0.99));
}

body[data-theme="light"] .grid-row.is-range-selected .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(252, 249, 240, 0.99), rgba(247, 241, 227, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body[data-theme="light"] .grid-row.is-contact.is-routed .cell.is-focused-cell {
  background:
    linear-gradient(180deg, rgba(243, 250, 245, 0.99), rgba(235, 246, 237, 0.99));
}

body[data-theme="light"] .tag-chip,
body[data-theme="light"] .ai-score-chip,
body[data-theme="light"] .status-pill,
body[data-theme="light"] .command-palette-example,
body[data-theme="light"] .sequence-studio-meta-chip {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(246, 249, 253, 0.98);
  color: #4c5f77;
}

body[data-theme="light"] .tag-chip.muted-chip,
body[data-theme="light"] .ai-score-chip.is-simulated {
  background: rgba(250, 252, 255, 0.98);
  color: #7c8ca2;
}

body[data-theme="light"] .editable-tags-cell:hover {
  background: rgba(113, 139, 170, 0.08);
}

body[data-theme="light"] .tag-editor-chip {
  border-color: rgba(85, 109, 136, 0.14);
  background: rgba(246, 249, 253, 0.98);
  color: #4c5f77;
}

body[data-theme="light"] .tag-editor-chip button,
body[data-theme="light"] .tag-editor-actions button {
  border-color: rgba(85, 109, 136, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: #607289;
}

body[data-theme="light"] .tag-editor-input {
  border-color: rgba(85, 109, 136, 0.2);
  background: rgba(255, 255, 255, 0.98);
  color: #28394d;
}

body[data-theme="light"] .reply-sequence-toggle {
  border-color: rgba(85, 109, 136, 0.14);
  background: rgba(255, 255, 255, 0.98);
  color: #2b3c50;
}

body[data-theme="light"] .reply-sequence-toggle:hover,
body[data-theme="light"] .reply-sequence-toggle:focus {
  border-color: rgba(85, 109, 136, 0.2);
  background: rgba(246, 249, 253, 0.98);
}

body[data-theme="light"] .reply-sequence-toggle-label.is-placeholder,
body[data-theme="light"] .reply-sequence-option-meta {
  color: #7c8ca2;
}

body[data-theme="light"] .email-field-primary {
  color: #243548;
}

body[data-theme="light"] .email-field-meta {
  color: #7c8ca2;
}

body[data-theme="light"] .email-field-meta.is-loading {
  color: #54749a;
}

body[data-theme="light"] .people-search-loading {
  color: #54749a;
}

body[data-theme="light"] .email-field-meta.is-error {
  color: #b86d79;
}

body[data-theme="light"] .reply-sequence-toggle-caret {
  border-color: #6d7f95;
}

body[data-theme="light"] .reply-sequence-menu {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 16px 28px rgba(113, 131, 154, 0.16);
}

body[data-theme="light"] .reply-sequence-option {
  color: #42556c;
}

body[data-theme="light"] .reply-sequence-option:hover,
body[data-theme="light"] .reply-sequence-option:focus,
body[data-theme="light"] .reply-sequence-option.is-selected,
body[data-theme="light"] .reply-sequence-option.is-active {
  background: rgba(242, 247, 252, 0.98);
  color: #1b2737;
}

body[data-theme="light"] .tree-row {
  color: #4d6077;
}

body[data-theme="light"] .tree-row:hover,
body[data-theme="light"] .tree-row.is-active {
  border-color: rgba(85, 109, 136, 0.1);
  background: rgba(241, 246, 251, 0.96);
  color: #172131;
}

body[data-theme="light"] .feed-tree [data-tree-action="source"] {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(85, 109, 136, 0.08);
}

body[data-theme="light"] .feed-tree [data-tree-action="source"].is-active {
  background: rgba(239, 245, 252, 0.98);
  border-color: rgba(85, 109, 136, 0.14);
}

body[data-theme="light"] .settings-window,
body[data-theme="light"] .settings-window-shell,
body[data-theme="light"] .list-management-detail,
body[data-theme="light"] .field-management-records,
body[data-theme="light"] .field-management-detail,
body[data-theme="light"] .settings-window-content {
  background: rgba(245, 249, 253, 0.98);
}

body[data-theme="light"] .settings-window-header {
  border-bottom-color: rgba(82, 104, 129, 0.08);
  background: rgba(251, 253, 255, 0.98);
}

body[data-theme="light"] .settings-window-sidebar,
body[data-theme="light"] .list-management-sidebar,
body[data-theme="light"] .field-management-sidebar {
  border-right-color: rgba(82, 104, 129, 0.08);
  background: rgba(250, 252, 255, 0.98);
}

body[data-theme="light"] .settings-window-nav-item,
body[data-theme="light"] .list-management-nav-item,
body[data-theme="light"] .field-management-window .list-management-nav-item {
  color: #556980;
}

body[data-theme="light"] .settings-window-nav-item:hover,
body[data-theme="light"] .settings-window-nav-item:focus-visible,
body[data-theme="light"] .list-management-nav-item:hover,
body[data-theme="light"] .list-management-nav-item.is-active,
body[data-theme="light"] .field-management-window .list-management-nav-item:hover,
body[data-theme="light"] .field-management-window .list-management-nav-item.is-active {
  color: #172131;
  background: rgba(241, 246, 251, 0.98);
  border-color: rgba(85, 109, 136, 0.1);
}

body[data-theme="light"] .list-management-record-item,
body[data-theme="light"] .field-management-record-item {
  background: transparent;
}

body[data-theme="light"] .list-management-record-item:hover,
body[data-theme="light"] .list-management-record-item.is-active,
body[data-theme="light"] .field-management-record-item:hover,
body[data-theme="light"] .field-management-record-item.is-active {
  background: rgba(238, 244, 251, 0.98);
  border-color: rgba(85, 109, 136, 0.1);
}

body[data-theme="light"] .list-management-record-title,
body[data-theme="light"] .field-management-record-item .list-management-record-title,
body[data-theme="light"] .field-management-definition-value,
body[data-theme="light"] .field-management-metric strong,
body[data-theme="light"] .list-management-preview-meta strong {
  color: #1a2535;
}

body[data-theme="light"] .field-management-record-summary,
body[data-theme="light"] .list-management-record-meta,
body[data-theme="light"] .list-management-preview-meta span,
body[data-theme="light"] .list-management-upload-label {
  color: #62748a;
}

body[data-theme="light"] .field-management-record-badge {
  border-color: rgba(85, 109, 136, 0.1);
  background: rgba(250, 252, 255, 0.98);
  color: #718298;
}

body[data-theme="light"] .field-management-metric {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .field-management-operator-chip,
body[data-theme="light"] .field-management-readonly-value {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(247, 250, 253, 0.98);
  color: #495d75;
}

body[data-theme="light"] .field-management-match-section,
body[data-theme="light"] .field-management-match-checklist,
body[data-theme="light"] .field-management-match-domain-list {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .field-management-match-option strong {
  color: #1b2737;
}

body[data-theme="light"] .field-management-match-domain-chips span {
  border-color: rgba(82, 104, 129, 0.12);
  background: rgba(247, 250, 253, 0.96);
  color: #26364a;
}

body[data-theme="light"] .field-management-match-option small,
body[data-theme="light"] .field-management-match-status p,
body[data-theme="light"] .field-management-match-file-label,
body[data-theme="light"] .field-management-match-domain-summary {
  color: #62748a;
}

body[data-theme="light"] .help-modal::backdrop,
body[data-theme="light"] .settings-modal::backdrop,
body[data-theme="light"] .feed-modal::backdrop,
body[data-theme="light"] .ai-trace-modal::backdrop,
body[data-theme="light"] .command-palette-modal::backdrop,
body[data-theme="light"] .sequence-studio-modal::backdrop {
  background: rgba(234, 240, 246, 0.72);
  backdrop-filter: blur(10px);
}

body[data-theme="light"] .help-sheet,
body[data-theme="light"] .ai-trace-sheet,
body[data-theme="light"] .feed-sheet,
body[data-theme="light"] .settings-sheet,
body[data-theme="light"] .command-palette-sheet,
body[data-theme="light"] .sequence-studio-sheet {
  border-color: rgba(82, 104, 129, 0.1);
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 28px 56px rgba(113, 131, 154, 0.18);
}

body[data-theme="light"] .help-grid article,
body[data-theme="light"] .help-map article,
body[data-theme="light"] .sequence-step-tile {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(249, 252, 255, 0.98);
  color: #4f6076;
}

body[data-theme="light"] .help-map strong {
  color: #172131;
}

body[data-theme="light"] .help-map p {
  color: #4f6076;
}

body[data-theme="light"] .command-palette-bar,
body[data-theme="light"] .command-palette-meta,
body[data-theme="light"] .sequence-studio-topbar,
body[data-theme="light"] .sequence-studio-footer {
  border-bottom-color: rgba(82, 104, 129, 0.08);
  background: rgba(250, 252, 255, 0.98);
}

body[data-theme="light"] .sequence-studio-footer {
  border-top-color: rgba(82, 104, 129, 0.08);
}

body[data-theme="light"] .command-palette-mark {
  color: #2f76d2;
}

body[data-theme="light"] .command-palette-input,
body[data-theme="light"] .command-palette-copy strong,
body[data-theme="light"] .command-palette-item:hover,
body[data-theme="light"] .command-palette-item.is-active {
  color: #182230;
}

body[data-theme="light"] .command-palette-copy span,
body[data-theme="light"] .command-palette-meta,
body[data-theme="light"] .command-palette-empty,
body[data-theme="light"] .sequence-studio-lead,
body[data-theme="light"] .toast,
body[data-theme="light"] .modal-status {
  color: #5f7188;
}

body[data-theme="light"] .sequence-studio-sequence-picker span,
body[data-theme="light"] .sequence-step-origin {
  color: #75879d;
}

body[data-theme="light"] .sequence-step-origin.is-customized {
  color: #2f76d2;
}

body[data-theme="light"] .command-palette-item {
  border-top-color: rgba(82, 104, 129, 0.08);
}

body[data-theme="light"] .command-palette-item:hover,
body[data-theme="light"] .command-palette-item.is-active {
  background: rgba(241, 246, 251, 0.98);
}

body[data-theme="light"] .slash-command-bar {
  border-bottom-color: rgba(82, 104, 129, 0.1);
  background:
    linear-gradient(180deg, rgba(247, 250, 253, 0.992), rgba(243, 247, 251, 0.988)),
    rgba(244, 248, 252, 0.99);
  box-shadow: 0 16px 30px rgba(113, 131, 154, 0.14);
}

body[data-theme="light"] .slash-command-shell,
body[data-theme="light"] .slash-command-meta {
  border-bottom-color: rgba(82, 104, 129, 0.08);
}

body[data-theme="light"] .slash-command-mark {
  color: #60738a;
}

body[data-theme="light"] .slash-command-input {
  color: #172131;
}

body[data-theme="light"] .slash-command-results .command-palette-item:hover,
body[data-theme="light"] .slash-command-results .command-palette-item.is-active {
  background: rgba(237, 243, 249, 0.98);
}

body[data-theme="light"] .sequence-step-arrowline {
  border-color: rgba(82, 104, 129, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: #6d7f95;
}

body[data-theme="light"] .toast {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 28px rgba(113, 131, 154, 0.16);
}

body[data-theme="light"] .modal-status {
  border-color: rgba(85, 109, 136, 0.1);
  background: rgba(248, 251, 255, 0.98);
}

body[data-theme="light"] .modal-status.is-error {
  border-color: rgba(196, 95, 99, 0.26);
  color: #a34649;
  background: rgba(255, 240, 241, 0.98);
}

body[data-theme="light"] .modal-status.is-success {
  border-color: rgba(95, 155, 114, 0.24);
  color: #3f7f55;
  background: rgba(241, 251, 244, 0.98);
}

body[data-theme="light"] .sequence-studio-inline-status {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(248, 251, 255, 0.98);
  color: #5f7188;
}

body[data-theme="light"] .sequence-studio-inline-status.is-info {
  border-color: rgba(85, 109, 136, 0.16);
  color: #1f2d3d;
}

body[data-theme="light"] .sequence-studio-inline-status.is-error {
  border-color: rgba(196, 95, 99, 0.26);
  color: #a34649;
  background: rgba(255, 240, 241, 0.98);
}

body[data-theme="light"] .sequence-studio-inline-status.is-warning {
  border-color: rgba(187, 134, 51, 0.28);
  color: #8b5c17;
  background: rgba(255, 249, 235, 0.98);
}

body[data-theme="light"] .sequence-studio-inline-status.is-success {
  border-color: rgba(95, 155, 114, 0.24);
  color: #3f7f55;
  background: rgba(241, 251, 244, 0.98);
}

body[data-theme="light"] kbd {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(255, 255, 255, 0.98);
  color: #5d7188;
}

body[data-theme="light"] .empty-state {
  border-color: rgba(82, 104, 129, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

body[data-theme="light"] .company-expander,
body[data-theme="light"] .nested-child-expander,
body[data-theme="light"] .nested-email-expander {
  border-color: rgba(85, 109, 136, 0.12);
  background: rgba(255, 255, 255, 0.98);
  color: #61748d;
}

body[data-theme="light"] .grid-row.is-focused .nested-child-expander,
body[data-theme="light"] .grid-row.is-focused .nested-email-expander,
body[data-theme="light"] .grid-row.is-focused .company-expander {
  background: rgba(246, 249, 253, 0.98);
  border-color: rgba(85, 109, 136, 0.12);
}

body[data-theme="light"] .nested-parent-chip {
  border-color: rgba(85, 109, 136, 0.08);
  background: rgba(248, 251, 255, 0.9);
  color: #66788f;
}

body[data-theme="light"] .nested-child-pill,
body[data-theme="light"] .nested-email-pill {
  color: #243549;
}

body[data-theme="light"] .row-quick-action {
  border-color: rgba(85, 109, 136, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: #53677f;
  box-shadow: 0 4px 14px rgba(60, 76, 96, 0.12);
}

body[data-theme="light"] .row-quick-action:hover,
body[data-theme="light"] .row-quick-action:focus-visible {
  border-color: rgba(55, 95, 150, 0.3);
  background: #f8fbff;
  color: #213149;
}

body[data-theme="light"] .nested-email-detail-body {
  color: #4f627a;
}

body[data-theme="light"] .grid-row.is-email-detail {
  background: rgba(248, 250, 253, 0.98);
}

body[data-theme="light"] .grid-row.is-email-detail:hover {
  background: rgba(243, 247, 252, 0.98);
}

body[data-theme="light"] .checkbox-dot {
  border-color: rgba(85, 109, 136, 0.14);
  background: rgba(255, 255, 255, 0.98);
}

body[data-theme="light"] .checkbox-dot.is-selected {
  background: #2f76d2;
  border-color: rgba(36, 97, 177, 0.38);
}

body[data-theme="light"] .checkbox-dot.is-selected::before {
  color: #f8fbff;
}

/* Final light-mode hardening pass: keep the workspace/studio windows from inheriting dark shell surfaces. */
body[data-theme="light"],
body[data-theme="light"] .app-shell {
  background:
    linear-gradient(180deg, #f7f6f1 0%, #f3f5f7 42%, #edf2f6 100%);
}

body[data-theme="light"] .workspace-shell,
body[data-theme="light"] .workspace-main,
body[data-theme="light"] .settings-window,
body[data-theme="light"] .settings-window-shell,
body[data-theme="light"] .settings-sheet,
body[data-theme="light"] .list-management-window,
body[data-theme="light"] .list-management-window-shell,
body[data-theme="light"] .field-management-window,
body[data-theme="light"] .field-management-window-shell,
body[data-theme="light"] .pipeline-window,
body[data-theme="light"] .pipeline-window .settings-window-shell {
  color: #1b2635;
  background: #f6f8fb;
}

body[data-theme="light"] .settings-window-header,
body[data-theme="light"] .pipeline-toolbar,
body[data-theme="light"] .pipeline-footer,
body[data-theme="light"] .list-management-header,
body[data-theme="light"] .panel-header,
body[data-theme="light"] .rail-header,
body[data-theme="light"] .rail-header-right,
body[data-theme="light"] .list-management-list-header,
body[data-theme="light"] .field-management-list-header {
  border-color: rgba(92, 111, 132, 0.14);
  background: #fbfcfe;
  color: #1b2635;
}

body[data-theme="light"] .settings-window-body,
body[data-theme="light"] .settings-window-content,
body[data-theme="light"] .settings-grid,
body[data-theme="light"] .settings-section,
body[data-theme="light"] .list-management-body,
body[data-theme="light"] .field-management-body {
  background: #f6f8fb;
}

body[data-theme="light"] .settings-window-sidebar,
body[data-theme="light"] .list-management-sidebar,
body[data-theme="light"] .field-management-sidebar {
  border-color: rgba(92, 111, 132, 0.14);
  background: #f3f6fa;
  color: #34445a;
}

body[data-theme="light"] .list-management-records,
body[data-theme="light"] .field-management-records {
  border-color: rgba(92, 111, 132, 0.14);
  background: #f8fafc;
  color: #27364a;
}

body[data-theme="light"] .list-management-detail,
body[data-theme="light"] .field-management-detail,
body[data-theme="light"] .list-management-detail-panel,
body[data-theme="light"] .field-management-detail-panel {
  background: #f7f9fc;
  color: #26364a;
}

body[data-theme="light"] .summary-card,
body[data-theme="light"] .compact-card,
body[data-theme="light"] .preview-card,
body[data-theme="light"] .summary-item,
body[data-theme="light"] .inspector-card,
body[data-theme="light"] .activity-item,
body[data-theme="light"] .ai-column-card,
body[data-theme="light"] .ai-people-finder-card,
body[data-theme="light"] .pipeline-sync-card,
body[data-theme="light"] .settings-fast-actions-toolbar,
body[data-theme="light"] .settings-fast-action-row,
body[data-theme="light"] .settings-service-row,
body[data-theme="light"] .toggle-stack,
body[data-theme="light"] .tagging-controls,
body[data-theme="light"] .trace-details,
body[data-theme="light"] .list-management-preview-body,
body[data-theme="light"] .list-management-report-rule,
body[data-theme="light"] .field-management-match-section,
body[data-theme="light"] .field-management-match-checklist,
body[data-theme="light"] .field-management-match-domain-list,
body[data-theme="light"] .field-management-metric,
body[data-theme="light"] .field-management-readonly-stack .summary-card,
body[data-theme="light"] .field-management-editor-stack .summary-card,
body[data-theme="light"] .field-management-editor-stack .toggle-stack {
  border-color: rgba(92, 111, 132, 0.13);
  background: #ffffff;
  color: #2d3d52;
  box-shadow: 0 1px 2px rgba(75, 91, 110, 0.04);
}

body[data-theme="light"] .settings-window-note,
body[data-theme="light"] .settings-inline-note,
body[data-theme="light"] .settings-empty-row,
body[data-theme="light"] .settings-overview-item,
body[data-theme="light"] .settings-fast-actions-toolbar,
body[data-theme="light"] .settings-fast-action-row,
body[data-theme="light"] .settings-fast-actions-available,
body[data-theme="light"] .settings-service-row,
body[data-theme="light"] .ai-people-finder-card,
body[data-theme="light"] .ai-column-card {
  border-color: rgba(92, 111, 132, 0.13);
  background: #ffffff;
  color: #2d3d52;
  box-shadow: 0 1px 2px rgba(75, 91, 110, 0.035);
}

body[data-theme="light"] .settings-service-row,
body[data-theme="light"] .ai-people-finder-card,
body[data-theme="light"] .ai-column-card {
  border-left-color: rgba(71, 103, 145, 0.25);
}

body[data-theme="light"] .settings-window-note strong,
body[data-theme="light"] .settings-inline-note strong,
body[data-theme="light"] .settings-empty-row strong,
body[data-theme="light"] .settings-overview-item strong,
body[data-theme="light"] .settings-fast-action-copy strong {
  color: #182435;
}

body[data-theme="light"] .settings-window-note span,
body[data-theme="light"] .settings-inline-note span,
body[data-theme="light"] .settings-empty-row span,
body[data-theme="light"] .settings-overview-item span,
body[data-theme="light"] .settings-fast-action-copy span,
body[data-theme="light"] .settings-function-summary span {
  color: #66778c;
}

body[data-theme="light"] .settings-overview-strip {
  border-color: rgba(92, 111, 132, 0.13);
  background: rgba(92, 111, 132, 0.13);
}

body[data-theme="light"] .settings-fast-action-copy span {
  border-color: rgba(92, 111, 132, 0.13);
  background: #f6f8fb;
}

body[data-theme="light"] .pipeline-expand-btn {
  border-color: rgba(100, 116, 139, 0.28);
  background: #f7f9fc;
  color: #394252;
}

body[data-theme="light"] .pipeline-detail-row {
  border-bottom-color: rgba(100, 116, 139, 0.16);
  background: linear-gradient(90deg, #f4f7fb, #ffffff);
}

body[data-theme="light"] .pipeline-detail-console::before {
  background: rgba(92, 111, 132, 0.22);
}

body[data-theme="light"] .pipeline-detail-rail::before {
  border-color: rgba(92, 111, 132, 0.34);
  background: #ffffff;
  box-shadow: inset 0 0 0 3px rgba(79, 117, 166, 0.24);
}

body[data-theme="light"] .pipeline-detail-metric,
body[data-theme="light"] .pipeline-detail-section {
  border-color: rgba(100, 116, 139, 0.16);
  background: rgba(255, 255, 255, 0.68);
}

body[data-theme="light"] .pipeline-detail-rail > strong,
body[data-theme="light"] .pipeline-detail-metric strong,
body[data-theme="light"] .pipeline-detail-compact-list strong {
  color: #192231;
}

body[data-theme="light"] .pipeline-detail-field-matrix dd {
  color: #394252;
}

body[data-theme="light"] .pipeline-detail-rail > p,
body[data-theme="light"] .pipeline-detail-metric small,
body[data-theme="light"] .pipeline-detail-section header span,
body[data-theme="light"] .pipeline-detail-section header em,
body[data-theme="light"] .pipeline-detail-field-matrix dt,
body[data-theme="light"] .pipeline-detail-compact-list span,
body[data-theme="light"] .pipeline-detail-empty,
body[data-theme="light"] .pipeline-detail-properties span {
  color: #647084;
}

body[data-theme="light"] .pipeline-detail-section header {
  border-bottom-color: rgba(100, 116, 139, 0.12);
}

body[data-theme="light"] .pipeline-detail-compact-list li {
  border-left-color: rgba(79, 117, 166, 0.2);
}

body[data-theme="light"] .pipeline-detail-properties span {
  border-color: rgba(100, 116, 139, 0.16);
  background: rgba(248, 250, 252, 0.86);
}

body[data-theme="light"] .list-management-record-item,
body[data-theme="light"] .field-management-record-item {
  border-color: transparent;
  background: transparent;
  color: #2c3d52;
}

body[data-theme="light"] .list-management-record-item:hover,
body[data-theme="light"] .list-management-record-item.is-active,
body[data-theme="light"] .field-management-record-item:hover,
body[data-theme="light"] .field-management-record-item.is-active {
  border-color: rgba(76, 103, 136, 0.14);
  background: #e9eff6;
  color: #172232;
}

body[data-theme="light"] .list-management-record-title,
body[data-theme="light"] .field-management-record-item .list-management-record-title,
body[data-theme="light"] .settings-section .summary-card p strong,
body[data-theme="light"] .field-management-usage strong,
body[data-theme="light"] .field-management-lifecycle strong,
body[data-theme="light"] .field-management-match-option strong,
body[data-theme="light"] .ai-column-card-copy strong {
  color: #182435;
}

body[data-theme="light"] .list-management-record-meta,
body[data-theme="light"] .list-management-list-meta,
body[data-theme="light"] .field-management-list-meta,
body[data-theme="light"] .field-management-record-summary,
body[data-theme="light"] .field-management-match-option small,
body[data-theme="light"] .field-management-match-status p,
body[data-theme="light"] .field-management-match-file-label,
body[data-theme="light"] .field-management-match-domain-summary,
body[data-theme="light"] .field-management-usage p,
body[data-theme="light"] .field-management-lifecycle p,
body[data-theme="light"] .ai-column-card-copy span,
body[data-theme="light"] .ai-column-prompt,
body[data-theme="light"] .settings-service-status,
body[data-theme="light"] .custom-field-inherited {
  color: #66778c;
}

body[data-theme="light"] .field-management-search-input,
body[data-theme="light"] .field-management-window .field input,
body[data-theme="light"] .field-management-window .field select,
body[data-theme="light"] .field-management-window .field textarea,
body[data-theme="light"] .settings-window input,
body[data-theme="light"] .settings-window select,
body[data-theme="light"] .settings-window textarea,
body[data-theme="light"] .list-management-window input,
body[data-theme="light"] .list-management-window select,
body[data-theme="light"] .list-management-window textarea {
  border-color: rgba(92, 111, 132, 0.16);
  background: #ffffff;
  color: #1d2a3b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .field-management-search-input:focus,
body[data-theme="light"] .field-management-window .field input:focus,
body[data-theme="light"] .field-management-window .field select:focus,
body[data-theme="light"] .field-management-window .field textarea:focus,
body[data-theme="light"] .settings-window input:focus,
body[data-theme="light"] .settings-window select:focus,
body[data-theme="light"] .settings-window textarea:focus,
body[data-theme="light"] .list-management-window input:focus,
body[data-theme="light"] .list-management-window select:focus,
body[data-theme="light"] .list-management-window textarea:focus {
  border-color: rgba(49, 112, 190, 0.34);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(49, 112, 190, 0.11);
}

body[data-theme="light"] .field-management-record-badge,
body[data-theme="light"] .panel-badge,
body[data-theme="light"] .ai-column-pill,
body[data-theme="light"] .field-management-operator-chip,
body[data-theme="light"] .field-management-readonly-value {
  border-color: rgba(92, 111, 132, 0.14);
  background: #f2f5f9;
  color: #5a6c82;
}

body[data-theme="light"] .list-management-empty-state,
body[data-theme="light"] .list-management-record-empty,
body[data-theme="light"] .empty-state,
body[data-theme="light"] .pipeline-table-body,
body[data-theme="light"] .pipeline-empty-state {
  border-color: rgba(92, 111, 132, 0.14);
  background: #ffffff;
  color: #33445a;
}

body[data-theme="light"] .pipeline-table-head {
  border-color: rgba(92, 111, 132, 0.14);
  background: #eef3f8;
  color: #66778c;
}

body[data-theme="light"] .pipeline-table-row {
  border-color: rgba(92, 111, 132, 0.1);
  color: #34445a;
}

body[data-theme="light"] .pipeline-table-row:hover,
body[data-theme="light"] .pipeline-table-row:focus-visible {
  background: #edf3fa;
  color: #182435;
}

body[data-theme="light"] .pipeline-table-row.is-focused {
  background: #e3edf8;
  color: #182435;
  box-shadow: inset 2px 0 0 rgba(49, 112, 190, 0.78);
}

body[data-theme="light"] .pipeline-table-row.is-selected {
  background: #dceafd;
  box-shadow: inset 2px 0 0 rgba(47, 118, 210, 0.9);
}

body[data-theme="light"] .pipeline-table-row.is-focused.is-selected {
  background: #d4e5fb;
}

body[data-theme="light"] .pipeline-deal-name strong,
body[data-theme="light"] .pipeline-sync-card strong {
  color: #182435;
}

body[data-theme="light"] .pipeline-deal-name small,
body[data-theme="light"] .pipeline-sync-card span:last-child,
body[data-theme="light"] .pipeline-footer {
  color: #66778c;
}

body[data-theme="light"] .field-management-window .field span,
body[data-theme="light"] .field-management-match-label,
body[data-theme="light"] .field-management-definition-label,
body[data-theme="light"] .field-management-metric-label,
body[data-theme="light"] .eyebrow,
body[data-theme="light"] .menu-status-label,
body[data-theme="light"] .pill-label,
body[data-theme="light"] .toolbar-hint,
body[data-theme="light"] .tree-section-label,
body[data-theme="light"] .filter-card-title {
  color: #75869b;
}
