*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --border: #d8dee6;
  --text: #17202a;
  --muted: #647184;
  --accent: #2563eb;
  --accent-dark: #1e40af;
  --green: #15803d;
  --orange: #b45309;
  --red: #b91c1c;
  --teal: #0f766e;
  --shadow: 0 10px 30px rgba(22, 32, 42, 0.08);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: 380px;
  padding: 12px 14px;
  color: #fff;
  background: #17202a;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--red);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.brand-mark,
.brand,
.account,
.toolbar,
.auth-actions,
.upload-actions,
.progress-row,
.results-header,
.section-title,
.inline-form.horizontal {
  display: flex;
  align-items: center;
}

.brand-mark {
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark h1 {
  margin: 0;
  font-size: 23px;
}

.brand-mark p {
  margin: 4px 0 0;
  color: var(--muted);
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-actions {
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.form-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--red);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 60px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.nav-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 8px;
}

.nav-tab {
  min-width: 86px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
}

.nav-tab.active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 2px rgba(22, 32, 42, 0.08);
}

.account {
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  min-width: 0;
}

#account-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.muted {
  color: var(--muted);
  margin: 4px 0 0;
}

.panel,
.table-panel,
.filters,
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.panel {
  padding: 16px;
}

.panel-title,
.section-title {
  font-weight: 800;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 13px;
  font-weight: 800;
  white-space: nowrap;
}

.btn.small {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.btn.primary {
  color: #fff;
  background: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.secondary {
  color: var(--text);
  background: #fff;
  border-color: var(--border);
}

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

.btn.danger {
  color: #fff;
  background: var(--red);
}

.btn.danger:hover {
  background: #991b1b;
}

.btn.ghost {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-grid.compact {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.metric {
  padding: 15px;
}

.metric-value {
  font-size: 24px;
  font-weight: 850;
  line-height: 1.1;
}

.metric-label {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.rank-list,
.stack-list {
  display: grid;
  gap: 8px;
}

.rank-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row strong,
.data-table strong {
  display: block;
  line-height: 1.3;
}

.rank-row small,
.data-table small,
.stack-item small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

.rank-row:not(.static):hover {
  color: var(--accent);
}

.upload-panel {
  margin-bottom: 14px;
}

.upload-zone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fbfcfd;
}

.upload-zone.drag-over {
  border-color: var(--accent);
  background: #eff6ff;
}

.upload-symbol {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: var(--accent);
  background: #eff6ff;
  font-weight: 900;
  font-size: 12px;
}

#upload-file-name {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.upload-file-item {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  background: #eef2f7;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.upload-actions {
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.progress-row {
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.progress-track {
  height: 10px;
  margin: 12px 0;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 999px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  transition: width 0.25s ease;
}

.step-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.step-row span {
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 7px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.step-row .active {
  color: #fff;
  background: var(--accent);
}

.step-row .done {
  color: #fff;
  background: var(--green);
}

.results-header,
.section-title {
  justify-content: space-between;
  gap: 12px;
}

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

.accuracy-list {
  display: grid;
  gap: 8px;
}

.accuracy-row {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  align-items: center;
  gap: 10px;
}

.accuracy-row div {
  height: 8px;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 999px;
}

.accuracy-row i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.accuracy-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.upload-result-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.upload-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fbfcfd;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.upload-result-row strong,
.upload-result-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-result-row small {
  margin-top: 3px;
  color: var(--muted);
}

.upload-result-row.error {
  border-color: #fecaca;
  background: #fff7f7;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.task-filters {
  grid-template-columns: repeat(2, minmax(180px, 240px));
  align-items: end;
}

.task-stack {
  margin-top: 12px;
}

.task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.task-item.completed {
  opacity: 0.7;
}

.follow-up-panel .inline-form.horizontal {
  align-items: end;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.setting-card {
  min-height: 110px;
}

.setting-value {
  margin-top: 12px;
  color: var(--text);
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: 1.5fr repeat(8, minmax(110px, 1fr));
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.table-panel {
  overflow-x: auto;
  overflow-y: hidden;
}

.table-panel.spaced {
  margin: 14px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  background: #fbfcfd;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.data-table tbody tr {
  background: #fff;
}

.data-table tbody tr:hover {
  background: #f9fbff;
}

.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.sort-header:hover,
.sort-header.active {
  color: var(--blue);
}

.sort-header:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
  border-radius: 4px;
}

.sort-indicator {
  display: inline-flex;
  justify-content: center;
  min-width: 10px;
  color: var(--blue);
  font-size: 11px;
  line-height: 1;
}

.clickable-purchase-row {
  cursor: pointer;
}

.clickable-purchase-row:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: -2px;
}

.clickable-purchase-row.selected,
.clickable-purchase-row.selected:hover {
  background: #eff6ff;
}

.auction-data-table {
  min-width: 3200px;
}

.investor-data-table {
  min-width: 1280px;
}

.auction-data-table th,
.auction-data-table td {
  white-space: nowrap;
}

.check-col {
  width: 42px;
}

.check-col input {
  min-height: auto;
  width: 16px;
  height: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: var(--teal);
  background: #ccfbf1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.confidence-cell {
  display: grid;
  gap: 4px;
  max-width: 280px;
}

.confidence-cell small {
  line-height: 1.25;
}

.confidence-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  color: #334155;
  background: #e2e8f0;
}

.confidence-very-high,
.confidence-high,
.confidence-uploaded {
  color: var(--green);
  background: #dcfce7;
}

.confidence-needs-review {
  color: var(--orange);
  background: #fef3c7;
}

.confidence-low,
.confidence-provider-error,
.confidence-source-error {
  color: var(--red);
  background: #fee2e2;
}

.confidence-not-found,
.confidence-unrated {
  color: var(--muted);
  background: var(--surface-2);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  color: var(--tag, var(--accent));
  background: color-mix(in srgb, var(--tag, var(--accent)) 12%, white);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0;
}

.contact-entry-form {
  grid-template-columns: 120px minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  margin-bottom: 12px;
}

.crm-record-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(460px, 1.4fr);
  gap: 14px;
  margin: 14px 0;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-summary-grid label:last-child {
  grid-column: 1 / -1;
}

.crm-contact-form {
  display: grid;
  grid-template-columns: 110px repeat(3, minmax(130px, 1fr));
  gap: 9px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.crm-contact-form .span-2 {
  grid-column: span 2;
}

.assignment-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.assignment-control span,
.assignment-control small {
  display: block;
  color: var(--muted);
}

.assignment-control span {
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.assignment-control strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 13px;
}

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

.checkbox-label {
  align-self: end;
  display: flex;
  min-height: 38px;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-transform: none;
}

.checkbox-label input {
  width: 16px;
  min-height: 16px;
}

.crm-contact-list {
  display: grid;
  gap: 8px;
}

.crm-contact-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.crm-contact-card:last-child {
  border-bottom: 0;
}

.crm-contact-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.crm-contact-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 3px;
}

.crm-contact-heading span {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.crm-contact-heading em {
  padding: 2px 7px;
  color: var(--teal);
  background: #ccfbf1;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

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

.detail-header select {
  width: 180px;
}

.auction-detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
}

.auction-detail-backdrop {
  background: rgba(15, 23, 42, 0.38);
}

.auction-detail-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 45px rgba(15, 23, 42, 0.16);
}

.auction-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.auction-detail-header h3 {
  margin: 4px 0 4px;
  font-size: 20px;
  line-height: 1.25;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.auction-detail-content {
  overflow: auto;
  padding: 18px 20px 24px;
}

.auction-detail-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.auction-detail-section:first-child {
  padding-top: 0;
}

.auction-detail-section:last-child {
  border-bottom: 0;
}

.auction-detail-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.auction-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.auction-detail-field {
  min-width: 0;
  padding: 9px 10px;
  background: #fbfcfd;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.auction-detail-field span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.auction-detail-field strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.stack-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.stack-item:last-child {
  border-bottom: 0;
}

.stack-item p {
  margin: 0;
}

.contact-item,
.trace-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child,
.trace-item:last-child {
  border-bottom: 0;
}

.contact-item > div,
.trace-item > div {
  min-width: 0;
}

.small-title {
  margin-bottom: 8px;
  font-size: 13px;
}

.error-text {
  color: var(--red);
}

.inline-form {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.inline-form.horizontal {
  gap: 8px;
  margin-bottom: 0;
}

.inline-form.horizontal input[type="color"] {
  width: 48px;
  padding: 4px;
}

.link-button {
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

.link-button:hover strong {
  color: var(--accent);
}

.empty,
.empty-cell {
  color: var(--muted);
  padding: 14px 0;
}

.empty-cell {
  text-align: center;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 12px;
  }

  .nav-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .nav-tab {
    flex: 1;
  }

  .account {
    justify-content: flex-start;
  }

  .metric-grid,
  .dashboard-grid,
  .detail-grid,
  .crm-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-contact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 16px;
  }

  .page-header,
  .detail-header,
  .upload-zone {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auction-detail-drawer {
    grid-template-columns: 1fr;
  }

  .auction-detail-backdrop {
    display: none;
  }

  .auction-detail-panel {
    width: 100%;
  }

  .metric-grid,
  .metric-grid.compact,
  .dashboard-grid,
  .detail-grid,
  .crm-record-grid,
  .account-summary-grid,
  .crm-contact-form,
  .contact-entry-form,
  .filters,
  .step-row {
    grid-template-columns: 1fr;
  }

  .table-panel {
    overflow-x: auto;
  }

  .data-table {
    min-width: 1180px;
  }

  .auction-detail-fields {
    grid-template-columns: 1fr;
  }
}

/* Figma CRM redesign */
:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e8ecf1;
  --border-strong: #d8dee6;
  --text: #121820;
  --muted: #637285;
  --sidebar: #0e131b;
  --sidebar-panel: #17202c;
  --sidebar-muted: #b2c2d6;
  --accent: #2563eb;
  --accent-dark: #1e40af;
  --green: #16803d;
  --orange: #b45309;
  --red: #b91c1c;
  --shadow: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

.app-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  width: 244px;
  height: 100vh;
  padding: 24px 20px;
  background: var(--sidebar);
  border: 0;
}

.brand {
  color: #fff;
  font-size: 16px;
  line-height: 22px;
}

.brand-icon {
  background: var(--accent);
  color: #fff;
}

.nav-tabs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 196px;
  padding: 0;
  background: transparent;
}

.nav-tab,
.nav-link {
  position: relative;
  width: 196px;
  min-height: 38px;
  padding: 10px 12px 10px 30px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-align: left;
}

.nav-tab::before,
.nav-link::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 15px;
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 999px;
}

.nav-tab.active {
  color: var(--accent-dark);
  background: #e1ecff;
  box-shadow: none;
}

.nav-tab.active::before {
  background: var(--accent);
}

.nav-link:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.sidebar-note {
  display: grid;
  gap: 6px;
  width: 196px;
  padding: 12px;
  margin-top: 0;
  color: #fff;
  background: var(--sidebar-panel);
  border-radius: 8px;
}

.sidebar-note strong {
  font-size: 12px;
  line-height: 16px;
}

.sidebar-note span {
  color: var(--sidebar-muted);
  font-size: 11px;
  line-height: 15px;
}

.account {
  width: 196px;
  margin-top: auto;
  flex-direction: column;
  align-items: flex-start;
  color: var(--sidebar-muted);
  font-size: 11px;
}

.account .btn.ghost {
  color: var(--sidebar-muted);
  padding-left: 0;
}

.workspace {
  width: 100%;
  max-width: 1196px;
  margin: 0;
  padding: 28px 32px 32px;
}

.page-header,
.detail-header {
  align-items: center;
  margin-bottom: 20px;
}

h2 {
  color: var(--text);
  font-size: 24px;
  line-height: 32px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.panel,
.table-panel,
.filters,
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
}

.panel {
  padding: 16px;
}

.panel-title,
.section-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 22px;
}

label {
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
  font-weight: 800;
  text-transform: none;
}

input,
select,
textarea {
  min-height: 34px;
  color: var(--text);
  border-color: var(--border-strong);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
}

.btn {
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.btn.small {
  min-height: 30px;
  padding: 6px 10px;
}

.btn.secondary {
  border-color: var(--border-strong);
}

.metric-grid {
  grid-template-columns: repeat(4, 190px);
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  min-height: 107px;
  padding: 16px;
}

.metric::after {
  content: "";
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 12px;
  background: var(--accent);
  border-radius: 999px;
}

.metric:nth-child(2)::after,
.metric.green::after {
  background: var(--green);
}

.metric:nth-child(3)::after {
  background: var(--orange);
}

.metric:nth-child(4)::after {
  background: var(--red);
}

.metric-value {
  color: var(--text);
  font-size: 24px;
  line-height: 32px;
  font-weight: 850;
}

.metric-label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
  text-transform: none;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 700px) minmax(320px, 416px);
  align-items: start;
  gap: 16px;
}

.dashboard-grid .panel:nth-child(1),
.dashboard-grid .panel:nth-child(2) {
  grid-column: 1;
}

.dashboard-grid .panel:nth-child(3),
.dashboard-grid .panel:nth-child(4) {
  grid-column: 2;
}

.rank-row {
  min-height: 38px;
  padding: 10px 0;
  font-size: 12px;
}

.filters {
  grid-template-columns: minmax(320px, 1.8fr) repeat(4, minmax(128px, 0.75fr));
  gap: 10px;
  align-items: end;
  padding: 16px;
  margin-bottom: 20px;
}

.table-panel {
  overflow: auto;
}

.data-table {
  font-size: 12px;
}

.data-table th,
.data-table td {
  height: 38px;
  padding: 10px 12px;
  border-bottom: 0;
  color: var(--muted);
  line-height: 16px;
}

.data-table th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  line-height: 15px;
  text-transform: none;
}

.data-table strong {
  color: var(--text);
  font-size: 12px;
  line-height: 16px;
}

.data-table tbody tr {
  border-bottom: 1px solid #f1f3f6;
}

.data-table tbody tr:last-child {
  border-bottom: 0;
}

.investor-data-table {
  min-width: 960px;
}

.status {
  min-height: 22px;
  padding: 4px 9px;
  font-size: 11px;
  line-height: 15px;
  border-radius: 999px;
}

.status-follow_up,
.status-researching {
  color: var(--orange);
  background: #feecc3;
}

.status-qualified,
.status-contacted {
  color: var(--green);
  background: #dcf5e2;
}

.status-new {
  color: var(--accent);
  background: #e1ecff;
}

.manager-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #1e3a8a;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.manager-badge.unassigned {
  color: var(--muted);
  background: #f8fafc;
  border-color: var(--border);
}

.tag {
  min-height: 21px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.profile-summary-row {
  display: grid;
  grid-template-columns: minmax(420px, 500px) minmax(260px, 300px) 190px;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.profile-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(320px, 396px);
  gap: 16px;
  align-items: start;
}

.main-profile-column,
.side-profile-column,
.profile-stat-cards {
  display: grid;
  gap: 16px;
}

.profile-stat-cards .metric {
  width: 190px;
}

.account-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-summary-grid label:last-child {
  grid-column: auto;
}

.primary-contact-card {
  min-height: 126px;
}

.primary-contact-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 24px;
}

.primary-contact-card small,
.primary-contact-card p {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.primary-contact-card p {
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
}

.crm-contact-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-contact-card,
.contact-item,
.trace-item {
  padding: 10px 0;
  border-color: #f1f3f6;
}

.crm-contact-card::before {
  content: attr(data-initials);
}

.purchase-history-panel {
  max-width: 100%;
}

.auction-data-table {
  min-width: 2200px;
}

/* Figma-style purchase history summary table */
.purchase-history-panel {
  border-radius: 8px;
  overflow: hidden;
}

.purchase-history-panel .section-title {
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.purchase-history-panel .section-title .muted {
  margin-top: 2px;
}

.purchase-history-table {
  min-width: 700px;
  table-layout: fixed;
}

.purchase-history-table th,
.purchase-history-table td {
  height: 38px;
  padding: 10px 12px;
}

.purchase-history-table .check-col {
  width: 42px;
}

.purchase-date-cell {
  width: 130px;
}

.purchase-property-cell {
  width: 270px;
}

.purchase-county-cell {
  width: 150px;
}

.purchase-bid-cell {
  width: 150px;
}

.purchase-history-table td.purchase-date-cell {
  color: var(--text);
  font-weight: 600;
}

.purchase-history-table td.purchase-property-cell,
.purchase-history-table td.purchase-county-cell,
.purchase-history-table td.purchase-bid-cell {
  color: var(--muted);
}

.purchase-history-table tbody tr:hover {
  background: #f7faff;
}

.purchase-history-table .clickable-purchase-row.selected,
.purchase-history-table .clickable-purchase-row.selected:hover {
  background: #eff6ff;
}

/* Final sidebar behavior: fixed rail with icon-only collapse */
:root {
  --sidebar-width: 244px;
  --sidebar-collapsed-width: 76px;
}

.app-shell {
  display: block;
  padding-left: var(--sidebar-width);
  transition: padding-left 0.18s ease;
}

.topbar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  transition: width 0.18s ease, padding 0.18s ease;
}

.brand {
  position: relative;
  width: 196px;
}

.brand-name,
.sidebar-note,
.account,
.nav-tab,
.nav-link {
  transition: opacity 0.12s ease, width 0.18s ease, padding 0.18s ease;
}

.sidebar-toggle {
  position: absolute;
  right: 0;
  top: 2px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--sidebar-muted);
  background: var(--sidebar-panel);
  border: 1px solid rgba(178, 194, 214, 0.14);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.sidebar-toggle:hover {
  color: #fff;
  background: #1e2a39;
}

.nav-tab::before,
.nav-link::before {
  display: none !important;
}

.nav-tab,
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
}

.nav-tab i,
.nav-link i,
.nav-tab svg,
.nav-link svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: currentColor;
  stroke-width: 2;
}

.nav-tab span,
.nav-link span {
  display: block;
}

.sidebar-collapsed .app-shell {
  padding-left: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .topbar {
  width: var(--sidebar-collapsed-width);
  padding: 24px 14px;
  align-items: center;
}

.sidebar-collapsed .brand {
  width: 48px;
  justify-content: center;
}

.sidebar-collapsed .brand-name,
.sidebar-collapsed .sidebar-note,
.sidebar-collapsed .account {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  right: -5px;
  top: 42px;
  width: 24px;
  height: 24px;
  background: #1e2a39;
}

.sidebar-collapsed .nav-tabs {
  width: 48px;
  align-items: center;
}

.sidebar-collapsed .nav-tab,
.sidebar-collapsed .nav-link {
  justify-content: center;
  width: 40px;
  min-width: 0;
  padding: 0;
  color: var(--sidebar-muted);
  font-size: 0;
}

.sidebar-collapsed .nav-tab span,
.sidebar-collapsed .nav-link span {
  display: none;
}

.sidebar-collapsed .nav-tab svg,
.sidebar-collapsed .nav-link svg {
  width: 20px;
  height: 20px;
}

.sidebar-collapsed .nav-tab.active {
  color: var(--accent-dark);
  background: #e1ecff;
}

.sidebar-collapsed .workspace {
  max-width: 1728px;
}

.auction-detail-panel {
  max-width: 560px;
}

.quick-actions-panel .inline-form {
  margin-bottom: 12px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-tabs {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-tab,
  .nav-link {
    width: auto;
    min-width: 132px;
  }

  .sidebar-note,
  .account {
    width: 100%;
  }

  .workspace {
    max-width: none;
  }

  .dashboard-grid,
  .profile-summary-row,
  .profile-content-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid .panel:nth-child(n) {
    grid-column: auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-stat-cards {
    grid-template-columns: repeat(2, 190px);
  }
}

@media (max-width: 720px) {
  .topbar,
  .workspace {
    padding: 16px;
  }

  .filters,
  .metric-grid,
  .profile-stat-cards,
  .account-summary-grid,
  .crm-contact-form {
    grid-template-columns: 1fr;
  }

  .profile-stat-cards .metric {
    width: auto;
  }
}

/* Typography refinement to match the Figma screens */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

body {
  font-weight: 400;
  line-height: 1.38;
}

.brand,
.brand-mark h1,
h2,
.metric-value {
  font-weight: 700;
}

.panel-title,
.section-title,
.data-table strong,
.rank-row strong,
.primary-contact-card strong,
.crm-contact-heading strong {
  font-weight: 600;
}

.nav-tab,
.nav-link,
.btn,
label,
.data-table th,
.metric-label,
.status,
.tag,
.confidence-badge {
  font-weight: 600;
}

.btn {
  letter-spacing: 0;
}

.page-header h2,
.detail-header h2 {
  margin-bottom: 1px;
}

.muted,
.data-table td,
.data-table small,
.rank-row small,
.stack-item small,
.primary-contact-card small,
.primary-contact-card p {
  font-weight: 400;
}

.data-table th {
  letter-spacing: 0;
}

.data-table td,
.rank-row,
.stack-item,
.contact-item,
.trace-item {
  color: var(--muted);
}

input::placeholder,
textarea::placeholder {
  color: #7a8798;
  opacity: 1;
}

/* Desktop-only CRM layout: optimized for laptop and desktop workstations */
html,
body {
  min-width: 1180px;
  overflow-x: auto;
}

.app-shell {
  grid-template-columns: 244px minmax(936px, 1fr);
}

.topbar {
  position: sticky;
  top: 0;
  width: 244px;
  height: 100vh;
  flex-direction: column;
  flex-wrap: nowrap;
}

.nav-tabs {
  width: 196px;
  flex-direction: column;
  flex-wrap: nowrap;
}

.nav-tab,
.nav-link {
  width: 196px;
  min-width: 0;
}

.sidebar-note,
.account {
  width: 196px;
}

.workspace {
  width: 100%;
  max-width: 1560px;
  min-height: 100vh;
  padding: 28px clamp(24px, 2.25vw, 40px) 40px;
}

.page-header,
.detail-header {
  min-height: 53px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.metric {
  min-width: 0;
}

.dashboard-grid {
  grid-template-columns: minmax(560px, 1.7fr) minmax(340px, 0.9fr);
  grid-template-areas:
    "volume recency"
    "frequency markets";
  width: 100%;
}

.dashboard-grid .panel:nth-child(1) {
  grid-area: volume;
}

.dashboard-grid .panel:nth-child(2) {
  grid-area: frequency;
}

.dashboard-grid .panel:nth-child(3) {
  grid-area: recency;
}

.dashboard-grid .panel:nth-child(4) {
  grid-area: markets;
}

.filters {
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  width: 100%;
}

.filters label:first-child {
  grid-column: span 2;
}

.filters label:nth-child(n + 6) {
  grid-column: span 1;
}

.investor-data-table {
  min-width: 100%;
}

.investor-data-table th:nth-child(2),
.investor-data-table td:nth-child(2) {
  min-width: 260px;
}

.investor-data-table th:nth-child(3),
.investor-data-table td:nth-child(3) {
  min-width: 150px;
}

.profile-summary-row {
  grid-template-columns: minmax(420px, 1.4fr) minmax(280px, 0.8fr) minmax(190px, 0.55fr);
  width: 100%;
}

.profile-content-grid {
  grid-template-columns: minmax(620px, 1fr) minmax(340px, 396px);
  width: 100%;
}

.main-profile-column,
.side-profile-column {
  min-width: 0;
}

.profile-stat-cards {
  grid-template-columns: 1fr;
}

.profile-stat-cards .metric {
  width: 100%;
}

.crm-contact-form {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.contact-entry-form {
  grid-template-columns: 120px minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.auction-data-table {
  min-width: 2200px;
}

/* Sidebar final overrides must stay after desktop sizing rules. */
.app-shell {
  display: block;
  padding-left: var(--sidebar-width);
}

.topbar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
}

.nav-tab::before,
.nav-link::before {
  display: none !important;
}

.nav-tab,
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
}

.nav-tab svg,
.nav-link svg,
.nav-tab i,
.nav-link i {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.sidebar-collapsed .app-shell {
  padding-left: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .topbar {
  width: var(--sidebar-collapsed-width);
  padding: 24px 14px;
  align-items: center;
}

.sidebar-collapsed .brand {
  width: 48px;
  justify-content: center;
}

.sidebar-collapsed .brand-name,
.sidebar-collapsed .sidebar-note,
.sidebar-collapsed .account {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  right: -5px;
  top: 42px;
  width: 24px;
  height: 24px;
}

.sidebar-collapsed .nav-tabs {
  width: 48px;
  align-items: center;
}

.sidebar-collapsed .nav-tab,
.sidebar-collapsed .nav-link {
  justify-content: center;
  width: 40px;
  min-width: 0;
  padding: 0;
  color: var(--sidebar-muted);
  font-size: 0;
}

.sidebar-collapsed .nav-tab span,
.sidebar-collapsed .nav-link span {
  display: none;
}

.sidebar-collapsed .nav-tab.active {
  color: var(--accent-dark);
  background: #e1ecff;
}

/* Final responsive overrides */
@media (max-width: 980px) {
  html,
  body {
    min-width: 0;
    overflow-x: hidden;
  }

  .app-shell,
  .sidebar-collapsed .app-shell {
    padding-left: 0;
  }

  .topbar,
  .sidebar-collapsed .topbar {
    position: sticky;
    inset: auto;
    top: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    overflow: visible;
  }

  .brand,
  .sidebar-collapsed .brand {
    width: auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .brand-name,
  .sidebar-collapsed .brand-name {
    display: inline;
  }

  .sidebar-toggle {
    display: none;
  }

  .nav-tabs,
  .sidebar-collapsed .nav-tabs {
    order: 3;
    display: flex;
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-tab,
  .nav-link,
  .sidebar-collapsed .nav-tab,
  .sidebar-collapsed .nav-link {
    width: auto;
    min-width: 88px;
    min-height: 36px;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
  }

  .nav-tab span,
  .nav-link span,
  .sidebar-collapsed .nav-tab span,
  .sidebar-collapsed .nav-link span {
    display: inline;
  }

  .sidebar-note,
  .account,
  .sidebar-collapsed .sidebar-note,
  .sidebar-collapsed .account {
    display: none;
  }

  .workspace,
  .sidebar-collapsed .workspace {
    max-width: none;
    min-height: 0;
    padding: 16px;
  }

  .page-header,
  .detail-header {
    min-height: 0;
    align-items: flex-start;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters label:first-child {
    grid-column: 1 / -1;
  }

  .dashboard-grid,
  .profile-summary-row,
  .profile-content-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid .panel:nth-child(n) {
    grid-area: auto;
    grid-column: auto;
  }

  .profile-stat-cards,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-stat-cards .metric {
    width: 100%;
  }

  .crm-contact-form,
  .contact-entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar,
  .sidebar-collapsed .topbar {
    align-items: flex-start;
  }

  .brand {
    flex: 1 1 auto;
  }

  .page-header,
  .detail-header,
  .results-header,
  .section-title,
  .assignment-control,
  .crm-contact-card,
  .task-item {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar,
  .detail-actions,
  .assignment-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .filters,
  .metric-grid,
  .profile-stat-cards,
  .account-summary-grid,
  .crm-contact-form,
  .contact-entry-form,
  .task-filters {
    grid-template-columns: 1fr;
  }

  .crm-contact-form .span-2 {
    grid-column: auto;
  }

  .table-panel {
    margin-left: -16px;
    margin-right: -16px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .investor-data-table,
  .purchase-history-table {
    min-width: 760px;
  }

  .task-item {
    grid-template-columns: 1fr;
  }

  .auction-detail-drawer {
    grid-template-columns: 1fr;
  }

  .auction-detail-backdrop {
    display: none;
  }

  .auction-detail-panel {
    max-width: none;
    width: 100%;
  }
}
.upload-type-field { display: grid; gap: 8px; max-width: 420px; margin-bottom: 20px; }
.upload-type-field[hidden], .filters label[hidden] { display: none; }
.auction-type-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.auction-type-badge { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 500; color: #49515e; background: #eef0f3; }
.auction-type-badge.tax-deed { color: #136343; background: #e7f5ee; }
.auction-type-badge.foreclosure { color: #8c343b; background: #fbecef; }
.sidebar-workspace { width: 100%; min-width: 0; display: grid; gap: 4px; }
.sidebar-workspace > span { color: var(--sidebar-muted); font-size: 11px; }
#workspace-name { color: #fff; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.sidebar-collapsed .sidebar-workspace { display: none; }
.workspace-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.workspace-context > svg { flex: 0 0 20px; width: 20px; height: 20px; color: #087f6e; }
.workspace-context-identity { display: grid; gap: 3px; min-width: 0; flex: 1 1 180px; }
.workspace-context-label { color: var(--muted); font-size: 11px; }
#workspace-context-name { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
#workspace-context-domain { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .sidebar-workspace { display: none; }
  .workspace-context { margin-bottom: 18px; }
}
