/* ======= SIDEBAR ======= */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.brand-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 6px;
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.brand-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }

.sidebar-section { padding: 12px 8px 4px; }
.sidebar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 4px 12px 6px;
  font-weight: 600;
}
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-tertiary);
  cursor: not-allowed;
  user-select: none;
}
.nav-item .nav-ico { width: 16px; height: 16px; opacity: 0.6; }
.nav-item.active {
  color: var(--accent-deep);
  background: var(--accent-bg);
  font-weight: 600;
  cursor: pointer;
}
.nav-item.active .nav-ico { opacity: 1; }
.nav-item.active::before {
  content: "";
  width: 2px; height: 14px;
  background: var(--accent);
  border-radius: 2px;
  margin-left: -14px;
  margin-right: 12px;
}
.nav-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-surface);
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-count { color: var(--accent-deep); border-color: var(--accent-border); }

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  background: linear-gradient(135deg, #C9DCDC, #5A9A9D);
  color: #fff; font-weight: 600;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}
.avatar.sq { border-radius: 6px; }
.avatar-32 { width: 32px; height: 32px; }
.avatar-28 { width: 28px; height: 28px; font-size: 11px; }
.avatar-64 { width: 64px; height: 64px; font-size: 22px; }
.footer-meta { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.footer-name { font-size: 12px; font-weight: 600; }
.footer-role { font-size: 11px; color: var(--text-tertiary); }
.icon-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-tertiary);
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-page); color: var(--text-primary); }

/* ======= TOP BAR (legacy compact) ======= */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 20;
}
.page-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.page-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ======= PAGE HEADER (Finance overview style) =======
   Eyebrow uppercase + huge sans-serif H1 + grey subtitle.
   Replaces .topbar for /users list. Mirrors admin2 Finance overview. */
.page-header {
  padding: 32px 28px 28px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 32px;
}
.page-header .ph-text { flex: 1; min-width: 0; max-width: 720px; }
.page-header .ph-eyebrow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.page-header h1 {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: var(--text-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 12px;
}
.page-header .ph-sub {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 640px;
}
.page-header .ph-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; padding-top: 6px; }

/* ======= EYEBROW + H2 (section header above table — Finance pipeline style) ======= */
.section-header {
  padding: 28px 28px 16px;
  background: var(--bg-page);
}
.section-header .sh-eyebrow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.section-header h2 {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.section-header .sh-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ======= BUTTONS ======= */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: #C8C5BB; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text-primary); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-icon { padding: 6px; width: 28px; justify-content: center; }
.btn-icon svg { width: 14px; height: 14px; }
.btn .kbd {
  font-size: 10px;
  background: rgba(0,0,0,0.06);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
}

/* ======= KPI CARDS (Finance overview style) =======
   Big sans-serif numbers, eyebrow label, descriptive sub-line.
   First card (Total Users) gets pale teal background to focus the primary metric. */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 8px 28px 4px;
}
.kpi {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  overflow: hidden;
  min-height: 156px;
}
.kpi.kpi-focus {
  background: var(--bg-teal-pale);
  border-color: var(--border-teal-pale);
}
.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.kpi-row { display: flex; align-items: baseline; justify-content: flex-start; gap: 8px; }
.kpi-value {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: var(--text-kpi);
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
.kpi.kpi-focus .kpi-value { color: var(--accent-deep); }
.kpi-delta {
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.kpi-delta.neg { color: var(--danger); }
.kpi-spark { width: 80px; height: 28px; }
.kpi-clickable { cursor: pointer; }
.kpi-clickable:hover { border-color: var(--border-strong); }

/* ======= FILTERS BAR (v3.2 — replaces pills/saved-views/toggle) ======= */
.filters {
  background: var(--bg-page);
  padding: 0 28px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.filters-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.search {
  position: relative;
  flex: 1 1 100%;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
}
.search input::placeholder { color: var(--text-tertiary); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.search .search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-tertiary);
}
.search .kbd-hint {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-tertiary);
  background: var(--bg-page);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* Compact filter controls */
.f-control {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s, background 0.12s;
  position: relative;
}
.f-control:hover { border-color: var(--border-strong); }
.f-control.active { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-deep); font-weight: 500; }
.f-control .f-label { color: var(--text-secondary); font-weight: 500; }
.f-control.active .f-label { color: var(--accent-deep); }
.f-control .chev { color: var(--text-tertiary); font-size: 9px; }
.f-control input.f-num {
  width: 78px;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  outline: none;
  padding: 0;
}
.f-control input.f-num::placeholder { color: var(--text-tertiary); }
.f-control input.f-date {
  border: 0;
  background: transparent;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  outline: none;
  padding: 0;
  height: 100%;
}
.f-control.has-date input.f-date::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }
.f-meta {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.f-clear {
  background: transparent;
  border: 0;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
}
.f-clear:hover { background: var(--accent-bg); }

/* Multi-select dropdown panel */
.f-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px 0;
}
.f-dropdown .f-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}
.f-dropdown .f-opt:hover { background: var(--bg-hover); }
.f-dropdown .f-opt input { margin: 0; cursor: pointer; }
.f-dropdown .f-opt .f-opt-count { margin-left: auto; color: var(--text-tertiary); font-size: 11px; font-variant-numeric: tabular-nums; }

.pills { display: flex; gap: 4px; align-items: center; }
.pill {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 14px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  border: 1px solid transparent;
}
.pill:hover { background: var(--bg-muted); color: var(--text-primary); }
.pill.active {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.pill .pill-count { color: var(--text-tertiary); margin-left: 4px; font-variant-numeric: tabular-nums; }
.pill.active .pill-count { color: var(--text-secondary); }

.divider-v { width: 1px; height: 20px; background: var(--border-subtle); margin: 0 4px; }

/* ======= TABLE (Finance overview style — white bg, light header row) ======= */
.table-wrap {
  margin: 0 28px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table.investors {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.investors thead th {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  padding: 14px 16px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9A9A9A;
  white-space: nowrap;
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
}
table.investors thead th:hover { color: var(--text-primary); }
table.investors thead th .sort-ico {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.5;
}
table.investors thead th.sorted .sort-ico { opacity: 1; color: var(--accent); }
table.investors tbody tr {
  border-bottom: 1px solid var(--border-divider);
  transition: background 0.08s;
  cursor: pointer;
}
table.investors tbody tr:hover { background: var(--bg-hover); }
table.investors tbody tr.selected { background: var(--accent-bg); }
table.investors tbody td {
  padding: 16px; /* v3.1 — from 12px to 16px vertical for breathing room */
  height: var(--row-h);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.td-num { text-align: right; font-variant-numeric: tabular-nums; }
.td-investor { display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-investor .meta { display: flex; flex-direction: column; min-width: 0; }
.td-investor .name { font-weight: 500; color: var(--text-primary); display: flex; align-items: center; gap: 6px; font-size: 14px; }
.td-investor .email { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.flag { font-size: 10px; padding: 1px 5px; background: var(--bg-muted); border-radius: 3px; color: var(--text-secondary); font-weight: 600; letter-spacing: 0.04em; border: 1px solid var(--border-subtle); }

input[type="checkbox"] {
  appearance: none;
  width: 14px; height: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
input[type="checkbox"]:checked::after {
  content: ""; position: absolute;
  left: 3px; top: 0px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:indeterminate {
  background: var(--accent); border-color: var(--accent);
}
input[type="checkbox"]:indeterminate::after {
  content: ""; position: absolute;
  left: 2px; top: 5px; width: 8px; height: 2px; background: #fff;
}

/* ======= BADGES ======= */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.b-success { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.b-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.b-danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.b-neutral { color: var(--neutral); background: var(--neutral-bg); border-color: var(--neutral-border); }
.b-accent { color: var(--accent-deep); background: var(--accent-bg); border-color: var(--accent-border); }

.cohort {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.cohort-tag {
  font-size: 10px;
  background: var(--bg-muted);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.perf-pos { color: var(--perf-pos); font-weight: 500; }
.perf-neg { color: var(--perf-neg); font-weight: 500; }
.perf-flat { color: var(--perf-flat); }

/* Active deals indicator */
.deals-cell { display: inline-flex; align-items: center; gap: 6px; }
.deals-cell .recent-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Health bar */
.health-bar {
  width: 80px;
  height: 6px;
  background: var(--bg-muted);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  position: relative;
}
.health-fill { height: 100%; }
.health-fill.s1 { background: var(--success); }
.health-fill.s2 { background: var(--warning); }
.health-fill.s3 { background: var(--danger); }
.health-cell { display: flex; align-items: center; gap: 8px; }
.health-num { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; min-width: 22px; }

.last-act { color: var(--text-secondary); font-size: 12px; }

.row-actions { position: relative; }
.row-actions .icon-btn { color: var(--text-tertiary); }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-page);
  font-size: 12px;
  color: var(--text-secondary);
}
.pagination .page-info { font-variant-numeric: tabular-nums; }
.pagination .page-controls { display: flex; align-items: center; gap: 4px; }
.page-btn {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  cursor: pointer;
}
.page-btn:hover { background: var(--bg-muted); color: var(--text-primary); }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.page-size {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 3px 6px;
  font-size: 12px;
  color: var(--text-primary);
}

/* Bulk action bar */
.bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A1A;
  color: #fff;
  border-radius: 8px;
  padding: 8px 8px 8px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.1);
  font-size: 13px;
  z-index: 50;
  animation: slide-up 0.18s ease-out;
}
@keyframes slide-up { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.bulk-bar .count { font-weight: 600; padding-right: 12px; border-right: 1px solid rgba(255,255,255,0.16); }
.bulk-bar .bulk-btn {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px;
}
.bulk-bar .bulk-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.bulk-bar .bulk-btn.danger { color: #FF9090; }
.bulk-bar .close-btn { padding: 6px; opacity: 0.6; }

/* ======= DETAIL PAGE ======= */
.breadcrumb { font-size: 12px; color: var(--text-tertiary); padding: 16px 28px 0; display: flex; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--text-secondary); cursor: pointer; }
.breadcrumb a:hover { color: var(--text-primary); text-decoration: underline; }
.breadcrumb .sep { color: var(--text-tertiary); }
.breadcrumb .current { color: var(--text-primary); font-weight: 500; }

.detail-header {
  padding: 24px 28px 20px;
  display: flex; gap: 20px; align-items: flex-start;
  border-bottom: 1px solid var(--border-subtle);
}
.detail-header .who { display: flex; gap: 16px; align-items: flex-start; flex: 1; min-width: 0; }
.detail-header .name {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.detail-header .role-line {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 8px;
}
.detail-header .role-line .sep { color: var(--text-tertiary); }
.detail-header .role-line .company { color: var(--text-primary); font-weight: 500; }
.detail-header .row-tags { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.detail-header .contact { display: flex; gap: 14px; margin-top: 4px; font-size: 12px; color: var(--text-secondary); }
.detail-header .contact .copyable { display: flex; gap: 4px; align-items: center; cursor: pointer; }
.detail-header .contact .copyable:hover { color: var(--accent-deep); }

.kpi-inline {
  display: flex; gap: 0;
  margin-top: 10px;
}
.kpi-inline .ki {
  padding: 4px 16px;
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 2px;
}
.kpi-inline .ki:first-child { padding-left: 0; }
.kpi-inline .ki:last-child { border-right: none; }
.kpi-inline .ki-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); font-weight: 600; }
.kpi-inline .ki-value { font-family: var(--font-sans); font-style: normal; font-weight: 600; font-size: 20px; color: var(--text-primary); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.01em; }
.kpi-inline .ki-value.small { font-family: var(--font-sans); font-style: normal; font-size: 14px; font-weight: 600; }

.detail-actions { display: flex; gap: 6px; align-items: flex-start; }

/* Sub-tabs */
.subtabs {
  display: flex; gap: 0;
  padding: 0 28px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-page);
  position: sticky;
  top: var(--topbar-h);
  z-index: 9;
}
.subtab {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.subtab:hover { color: var(--text-primary); }
.subtab.active { color: var(--accent-deep); border-bottom-color: var(--accent); font-weight: 600; }
.subtab .stab-count {
  background: var(--bg-muted);
  color: var(--text-tertiary);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.subtab.active .stab-count { background: var(--accent-bg); color: var(--accent-deep); }

/* Detail layout */
.detail-body { padding: 20px 28px 40px; }
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: 12px; }

/* Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-page);
}
.card-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 16px; color: var(--text-primary); letter-spacing: -0.005em;
}
.card-actions { display: flex; gap: 4px; }
.card-body { padding: 14px; }

/* Profile field rows */
.field-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border-divider);
  align-items: center;
}
.field-row:last-child { border-bottom: none; }
.field-label { color: var(--text-tertiary); font-size: 12px; }
.field-value { color: var(--text-primary); display: flex; align-items: center; gap: 6px; min-height: 22px; }
.field-row .pencil {
  opacity: 0;
  width: 12px; height: 12px; color: var(--text-tertiary);
  cursor: pointer;
  margin-left: auto;
}
.field-row:hover .pencil { opacity: 1; }
.field-row:hover .pencil:hover { color: var(--accent); }

.tag {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
}
.tag.accent { background: var(--accent-bg); color: var(--accent-deep); border-color: var(--accent-border); }

/* Portfolio big number */
.port-big {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.port-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-top: 14px;
}
.port-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-divider);
}
.port-item-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.port-item-val { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Health card */
.health-big {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 44px;
  line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.health-factors { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.health-factor { display: grid; grid-template-columns: 110px 1fr 28px; gap: 8px; align-items: center; font-size: 12px; color: var(--text-secondary); }
.health-factor .hbar { height: 5px; background: var(--bg-muted); border-radius: 3px; overflow: hidden; }
.health-factor .hbar > span { display: block; height: 100%; background: var(--accent); }
.health-factor .hval { font-variant-numeric: tabular-nums; text-align: right; color: var(--text-primary); font-weight: 500; }

/* Next actions list */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  background: var(--bg-page);
}
.todo-item .todo-content { flex: 1; min-width: 0; }
.todo-item .todo-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.todo-item .todo-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.todo-item.urgent { background: var(--warning-bg); border-color: var(--warning-border); }

/* Investments mini header */
.mini-header {
  display: flex; gap: 0;
  padding: 12px 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  margin-bottom: 12px;
}
.mini-header .mh-item {
  flex: 1;
  border-right: 1px solid var(--border-subtle);
  padding: 0 14px;
}
.mini-header .mh-item:first-child { padding-left: 4px; }
.mini-header .mh-item:last-child { border-right: none; }
.mini-header .mh-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); font-weight: 600; }
.mini-header .mh-val { font-family: var(--font-sans); font-style: normal; font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--text-primary); letter-spacing: -0.01em; line-height: 1.1; }

.toggle-group {
  display: inline-flex; gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 2px;
}
.toggle-group .tg {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 3px;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
}
.toggle-group .tg.active { background: var(--bg-page); color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* Investments table */
.deals-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.deals-table thead th {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.deals-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border-divider); font-variant-numeric: tabular-nums; }
.deals-table tbody tr:hover { background: var(--bg-hover); cursor: pointer; }
.deal-cell { display: flex; align-items: center; gap: 8px; }
.deal-logo {
  width: 24px; height: 24px;
  border-radius: 4px;
  background: var(--bg-muted);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Communications timeline */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.timeline-item:not(:last-child)::after {
  content: ""; position: absolute;
  left: 13px; top: 38px; bottom: -10px;
  width: 1px; background: var(--border-subtle);
}
.timeline-ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  display: grid; place-items: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  z-index: 1;
}
.timeline-ico.email { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent-deep); }
.timeline-ico.call { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.timeline-ico.meeting { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.timeline-ico svg { width: 13px; height: 13px; }
.timeline-content { padding: 2px 0; }
.timeline-head { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.timeline-type { font-weight: 600; color: var(--text-primary); }
.timeline-time { color: var(--text-tertiary); }
.timeline-by { color: var(--text-tertiary); margin-left: auto; }
.timeline-subject { font-size: 13px; color: var(--text-primary); margin-top: 2px; font-weight: 500; }
.timeline-snippet { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }

/* KYC big badge */
.kyc-big {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
}
.kyc-big .kyc-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: grid; place-items: center;
}
.kyc-big .kyc-text { display: flex; flex-direction: column; gap: 2px; }
.kyc-big .kyc-status { font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--text-primary); }
.kyc-big .kyc-meta { font-size: 12px; color: var(--text-secondary); }

/* Documents grid */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.doc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.1s;
  cursor: pointer;
  position: relative;
}
.doc-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.doc-head { display: flex; align-items: flex-start; gap: 10px; }
.doc-ico {
  width: 36px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  display: grid; place-items: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  position: relative;
}
.doc-ico::before {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 8px; height: 8px;
  background: var(--bg-muted);
  border-left: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.doc-ico .ext { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }
.doc-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.doc-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.doc-foot { display: flex; align-items: center; justify-content: space-between; }

/* Audit log */
.audit-list { display: flex; flex-direction: column; }
.audit-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-divider);
  font-size: 12px;
}
.audit-item:last-child { border-bottom: none; }
.audit-time { color: var(--text-tertiary); width: 130px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.audit-body { flex: 1; color: var(--text-primary); }
.audit-actor { font-weight: 600; }
.audit-action { color: var(--text-secondary); }
.audit-old { color: var(--text-tertiary); text-decoration: line-through; margin: 0 4px; }
.audit-new { color: var(--accent-deep); font-weight: 500; }

/* Notes */
.note-editor {
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 10px;
  min-height: 80px;
  width: 100%;
  font-size: 13px;
  color: var(--text-primary);
  resize: vertical;
}
.note-editor:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.note-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.note-item {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 12px;
}
.note-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--text-tertiary); margin-bottom: 6px; }
.note-meta .note-actions { margin-left: auto; display: flex; gap: 4px; opacity: 0; }
.note-item:hover .note-actions { opacity: 1; }
.note-body { font-size: 13px; color: var(--text-primary); line-height: 1.5; }

/* ======= WIZARD ======= */
.wizard-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px;
}
.stepper {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 28px;
}
.step {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
  position: relative;
}
.step-circle {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-tertiary);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.step.done .step-circle { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.active .step-circle { background: var(--bg-surface); border-color: var(--accent); color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-bg); }
.step-label { font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.step.active .step-label { color: var(--text-primary); font-weight: 600; }
.step.done .step-label { color: var(--text-secondary); }
.step-line { flex: 1; height: 1px; background: var(--border-strong); margin: 0 12px; }
.step.done + .step .step-line, .step.done .step-line { background: var(--accent); }

.wizard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.wizard-title { font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--text-primary); margin-bottom: 4px; }
.wizard-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { display: block; font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 5px; }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.form-help { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; }

.checkbox-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border-divider); }
.checkbox-row:last-child { border-bottom: none; }
.checkbox-row .ck-text { font-size: 13px; color: var(--text-primary); flex: 1; }
.checkbox-row .ck-text small { display: block; color: var(--text-tertiary); font-size: 11px; margin-top: 2px; }

.wizard-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 0;
  margin-top: 20px;
  border-top: 1px solid var(--border-subtle);
}
.save-indicator { font-size: 11px; color: var(--text-tertiary); display: flex; gap: 6px; align-items: center; }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* Toast */
.toast-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  min-width: 240px;
  animation: toast-in 0.16s ease-out;
}
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,26,26,0.32);
  display: grid; place-items: center;
  z-index: 200;
  animation: fade-in 0.12s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 0;
  min-width: 420px;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--font-serif); font-style: italic; font-size: 19px; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: flex-end; gap: 8px; background: var(--bg-page); }

/* Column picker dropdown (mock) */
.dropdown {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 4px;
  min-width: 200px;
  z-index: 30;
}
.dropdown .dd-item {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-primary);
}
.dropdown .dd-item:hover { background: var(--bg-muted); }
.dropdown .dd-item.danger { color: var(--danger); }
.dropdown .dd-divider { height: 1px; background: var(--border-subtle); margin: 4px 0; }
.dropdown .dd-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); padding: 6px 10px 4px; font-weight: 600; }

/* Empty state */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
}
.empty svg { margin: 0 auto 12px; }
.empty .empty-title { font-family: var(--font-serif); font-style: italic; font-size: 18px; color: var(--text-secondary); margin-bottom: 4px; }
.empty .empty-sub { font-size: 12px; }

/* Responsive guard */
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ======= 7-STATUS BADGES (admission funnel) ======= */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: filter 0.1s;
}
.status-badge:hover { filter: brightness(0.97); }
.status-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge .chev { width: 9px; height: 9px; opacity: 0.6; margin-left: 2px; }

.st-pending    { color:#B8923A; background:#F5EDD8; border-color:#E5D8B5; }
.st-accepted   { color:#3F7C7F; background:#E8F0F0; border-color:#C9DCDC; }
.st-active     { color:#4F8C5A; background:#E8F0E8; border-color:#CFE0CF; }
.st-inactive   { color:#5A5A5A; background:#EDECE5; border-color:#DCDAD2; }
.st-suspended  { color:#B05050; background:#F5E5E5; border-color:#E5C8C8; }
.st-declined   { color:#8A3535; background:#F0DCDC; border-color:#D8B8B8; }
.st-paused     { color:#9A8530; background:#F0EAD8; border-color:#D8CDA8; }

/* big status badge in decision panel */
.status-big {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid transparent;
}
.status-big .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Status dropdown menu (matches Yoann's screenshot) */
.status-dd {
  position: absolute;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.05);
  padding: 4px 0;
  min-width: 130px;
  z-index: 60;
}
.status-dd .sd-item {
  padding: 8px 14px;
  font-size: 13px;
  color: #1A1A1A;
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-sans);
}
.status-dd .sd-item:hover { background: var(--bg-page); }
.status-dd .sd-item.current { background: var(--bg-muted); }

/* ======= LINKEDIN ======= */
.li-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: #E8F0F0;
  color: #3F7C7F;
  border-radius: 4px;
  border: 1px solid #C9DCDC;
  cursor: pointer;
  transition: background 0.1s;
}
.li-icon:hover { background: #5A9A9D; color: #fff; border-color: #5A9A9D; }
.li-icon svg { width: 12px; height: 12px; }

.li-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid var(--accent);
  cursor: pointer;
  width: 100%;
  justify-content: center;
}
.li-cta:hover { background: var(--accent-hover); }
.li-cta svg { width: 14px; height: 14px; }

/* Quick action buttons inline in actions cell */
.quick-actions { display: inline-flex; gap: 4px; align-items: center; }
.quick-btn {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid;
  white-space: nowrap;
}
.quick-btn.approve { background: var(--accent); color: #fff; border-color: var(--accent); }
.quick-btn.approve:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.quick-btn.decline { background: transparent; color: var(--danger); border-color: var(--danger-border); }
.quick-btn.decline:hover { background: var(--danger-bg); }

/* Profile mini cell in list */
.profile-cell {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-cell strong { color: var(--text-primary); font-weight: 500; }

.exp-badge {
  font-size: 11px; font-weight: 500;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
}
.exp-badge.experienced { background: var(--accent-bg); color: var(--accent-deep); border-color: var(--accent-border); }
.exp-badge.some        { background: var(--bg-muted); color: var(--text-secondary); border-color: var(--border-subtle); }
.exp-badge.firsttime   { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }

.intent-cell { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }

.ref-cell { font-size: 12px; color: var(--text-secondary); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.ref-cell.member { color: var(--accent-deep); font-weight: 500; }
.ref-cell.linkedin { color: var(--text-secondary); }
.ref-cell.direct { color: var(--text-tertiary); font-style: italic; }

/* ======= APPLICATION TAB ======= */
.app-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  margin-bottom: 12px;
  overflow: hidden;
}
.app-section-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-page);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.app-section-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--text-primary);
}
.app-section-body { padding: 14px; }

.app-field {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border-divider);
  align-items: flex-start;
}
.app-field:last-child { border-bottom: none; }
.app-field-label {
  color: var(--text-tertiary);
  font-size: 12px;
  padding-top: 1px;
}
.app-field-value {
  color: var(--text-primary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  line-height: 1.5;
}
.app-field-value.long { display: block; line-height: 1.55; }

.yn-yes, .yn-no {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid;
}
.yn-yes { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.yn-no { color: var(--text-tertiary); background: var(--bg-muted); border-color: var(--border-subtle); }
.yn-yes::before, .yn-no::before { content:""; width:5px; height:5px; border-radius:50%; background: currentColor; }

/* Big LinkedIn block in Application tab */
.linkedin-block {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 10px;
}
.linkedin-block .li-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-deep);
  word-break: break-all;
}

/* ======= DECISION PANEL ======= */
.decision-panel {
  position: sticky;
  top: calc(var(--topbar-h) + 50px);
  display: flex; flex-direction: column; gap: 12px;
}
.decision-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
}
.decision-card-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-page);
}
.decision-card-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--text-primary);
}
.decision-card-body { padding: 14px; }

.decision-cta {
  display: flex; flex-direction: column; gap: 8px;
}
.decision-cta .big {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.decision-cta .big.approve { background: var(--accent); color: #fff; border-color: var(--accent); }
.decision-cta .big.approve:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.decision-cta .big.decline { background: transparent; color: var(--danger); border-color: var(--danger-border); }
.decision-cta .big.decline:hover { background: var(--danger-bg); }

.decision-textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-primary);
  resize: vertical;
  min-height: 56px;
  font-family: var(--font-sans);
}
.decision-textarea:focus { outline: none; border-color: var(--accent); }

.meta-list { display: flex; flex-direction: column; gap: 0; }
.meta-list .ml-row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px dashed var(--border-divider);
}
.meta-list .ml-row:last-child { border-bottom: none; }
.meta-list .ml-label { color: var(--text-tertiary); }
.meta-list .ml-value { color: var(--text-primary); font-weight: 500; }

/* Quality signals list */
.signals-list { display: flex; flex-direction: column; gap: 6px; }
.signal-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0;
  font-size: 12px;
}
.signal-row .sig-ico {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
}
.signal-row.on .sig-ico { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.signal-row.off .sig-ico { background: var(--bg-muted); color: var(--text-tertiary); border: 1px solid var(--border-subtle); }
.signal-row.on { color: var(--text-primary); font-weight: 500; }
.signal-row.off { color: var(--text-tertiary); }

/* Status select dropdown attached to badge in list */
.row-status-cell { position: relative; }

/* KPI strip variant for funnel */
.kpi-funnel-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

/* Detail header CTAs for pending */
.detail-actions .li-cta-small {
  background: var(--accent);
  color: #fff;
  padding: 7px 12px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--accent);
  cursor: pointer;
}
.detail-actions .li-cta-small:hover { background: var(--accent-hover); }


/* Constrain inline SVGs inside CTAs (SVG defaults to 100% width without attribute) */
.btn svg, .li-cta svg, .li-cta-small svg, .quick-btn svg,
.decision-cta .big svg, .timeline-ico svg, .icon-btn svg,
.kyc-big .kyc-icon svg, .kpi-spark, .nav-ico svg,
.brand-mark, .deal-logo, .empty svg, .doc-ico svg, .sig-ico {
  flex-shrink: 0;
}
.decision-cta .big svg { width: 14px; height: 14px; }
.li-cta-small svg { width: 14px; height: 14px; }
.li-cta-small { white-space: nowrap; }
.detail-header .contact { flex-wrap: wrap; row-gap: 4px; }
.detail-header .contact .copyable { white-space: nowrap; }
.detail-header .contact svg { width: 12px; height: 12px; flex-shrink: 0; }
.btn svg { width: 14px; height: 14px; }
.quick-btn svg { width: 11px; height: 11px; }
.decision-card-body .big { white-space: nowrap; }

/* Sidebar nav SVG sizing */
.nav-ico { display: inline-flex; }
.nav-ico svg { width: 16px; height: 16px; }

/* timeline icon sizing */
.timeline-ico svg { width: 13px; height: 13px; }

/* Footer save indicator alignment */
.save-indicator svg { width: 6px; height: 6px; }


/* Default-size SVGs that have no inline width/height inside small buttons */
.li-icon svg { width: 12px; height: 12px; }
.li-cta svg { width: 14px; height: 14px; }
.li-cta-small svg { width: 14px; height: 14px; }
.quick-btn svg { width: 11px; height: 11px; }
.decision-cta .big svg { width: 16px; height: 16px; }
.timeline-ico svg { width: 13px; height: 13px; }
.kyc-big .kyc-icon svg { width: 22px; height: 22px; }
.btn svg:not([width]) { width: 13px; height: 13px; }

/* Sidebar nav icon sizing — ensure all nav SVGs have a fixed size */
.sidebar .nav-ico svg { width: 16px; height: 16px; }


/* ============ v3.1 — KPI strip pictograms + sub-line ============ */
.kpi-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  color: var(--text-tertiary);
  border-radius: 4px;
}
.kpi-ico svg { width: 13px; height: 13px; }
.kpi-ico-success { color: var(--success); }
.kpi-ico-accent  { color: var(--accent); }
.kpi-ico-warning { color: var(--warning); }
.kpi-sub {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  line-height: 1.5;
  margin-top: 4px;
}

/* ============ v3.1 — Plan to invest / Has invested cells ============ */
.plan-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  min-width: 0;
}
.yn-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.yn-badge.yes {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.yn-badge.yes-teal {
  background: var(--accent-bg);
  color: var(--accent-deep);
  border-color: var(--accent-border);
}
.yn-badge.no {
  background: var(--bg-muted);
  color: var(--text-tertiary);
  border-color: var(--border-subtle);
}
.yn-badge.first {
  background: var(--bg-muted);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}
.plan-amount {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.plan-platforms {
  font-size: 11.5px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.th-sub {
  font-size: 9.5px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 2px;
}

/* ============ v3.2 — ANALYTICS TAB (Mixpanel-style mini charts) ============ */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.analytics-kpi {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
}
.analytics-kpi .ak-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}
.analytics-kpi .ak-val {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.analytics-kpi .ak-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}
.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
}
.chart-card .cc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.chart-card .cc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.chart-card .cc-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.chart-card .cc-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 4px;
}
.chart-card svg.line-chart {
  width: 100%;
  height: 80px;
  display: block;
}
.charts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ============ v3.2 — GROUPS TAB ============ */
.groups-list {
  display: flex; flex-direction: column; gap: 10px;
}
.group-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 44px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
}
.group-card:hover { background: var(--bg-hover); cursor: pointer; }
.group-avatar {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-bg);
  color: var(--accent-deep);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.01em;
}
.group-meta .group-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.group-meta .group-desc {
  font-size: 12px;
  color: var(--text-secondary);
}
.group-stat {
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 80px;
}
.group-stat .gs-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}
.group-activity {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
  display: inline-flex; align-items: center; gap: 5px;
}
.group-activity.active {
  color: var(--success);
  background: var(--success-bg);
}
.group-activity.quiet {
  color: var(--text-tertiary);
  background: var(--bg-muted);
}
.group-activity .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ========================================================================
   v3.3 — FICHE DÉTAIL : Refonte (Overview / Investments / Career)
   Reproduit la structure de l'admin actuel (Activity Metrics, Current
   Company, Events, Groups, Career) en gardant le design system Upscalers
   (beige #F5F4EE, teal #5A9A9D, Satoshi sans, light only).
   ======================================================================== */

/* Expertise tags strip — entre l'header et les sub-tabs */
.expertise-strip {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 28px 14px;
  border-bottom: 1px solid var(--border-divider);
  background: var(--bg-page);
}
.exp-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  font-size: 12px; font-weight: 500;
  color: var(--accent-deep);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
}
.exp-pill:hover { background: #DDE9E9; }

/* Card titles in Overview cards : icon + label, sans-serif, no italic */
.ov-grid .card-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.ov-grid .card-title svg { width: 16px; height: 16px; color: var(--text-secondary); }
.ov-grid .card-head { background: var(--bg-surface); }

/* Overview grid — v3.4: 2 cols Row 1 (Activity 60% / Groups 40%), Row 2 full Application */
.ov-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px;
  align-items: start;
}
.ov-grid .am-card { grid-column: 1; }
.ov-grid .gr-card { grid-column: 2; }
.ov-grid .app-form-card { grid-column: 1 / -1; }

/* App form card v3.4 — collapsible head + edit toggle */
.app-form-head { cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; }
.app-form-head:hover { background: var(--bg-page); }
.app-form-meta { display: inline-flex; align-items: center; gap: 12px; }
.chev-toggle { display: inline-flex; transition: transform 0.18s ease; color: var(--text-tertiary); }
.chev-toggle svg { width: 14px; height: 14px; }
.app-form-card.is-open .chev-toggle { transform: rotate(90deg); }

/* Header company line v3.4 */
.role-line .hdr-company { display: inline-flex; align-items: center; gap: 6px; }
.role-line .hdr-company svg { width: 14px !important; height: 14px !important; color: var(--text-secondary); flex-shrink: 0; }
.role-line .hdr-company strong { color: var(--text-primary); font-weight: 600; }
.role-line .hdr-employee { font-style: normal; color: var(--accent-deep); font-size: 12px; padding: 2px 8px; background: var(--accent-bg); border-radius: 999px; line-height: 1.4; }
/* Make sure all SVGs in role-line, contact and breadcrumbs stay tiny */
.role-line svg,
.contact svg,
.breadcrumb svg,
.detail-header .who svg { width: 14px; height: 14px; }

/* Inline edit field (v3.4) */
.field-edit-wrap { display: inline-flex; align-items: center; gap: 6px; }
.field-edit-wrap .pencil { opacity: 0; transition: opacity 0.15s; cursor: pointer; color: var(--text-tertiary); }
.field-edit-wrap:hover .pencil { opacity: 1; }
.field-edit-wrap .pencil:hover { color: var(--accent); }
.field-edit-input { font: inherit; padding: 4px 8px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: white; min-width: 180px; }
.field-edit-actions { display: inline-flex; gap: 4px; margin-left: 6px; }
.field-edit-actions button { padding: 3px 8px; font-size: 12px; border-radius: var(--r-sm); border: 1px solid var(--border-subtle); background: white; cursor: pointer; }
.field-edit-actions button.save { background: var(--accent); color: white; border-color: var(--accent); }
.field-edit-actions button.save:hover { background: var(--accent-hover); }
.app-form-card.edit-mode .field-edit-wrap .pencil { opacity: 1; }

/* Edit-mode subtle highlight on app fields */
.app-form-card.edit-mode .app-field { background: rgba(90, 154, 157, 0.04); }

/* ===== Activity Metrics card ===== */
.am-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.am-period {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-size: 12px; color: var(--text-secondary);
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums;
}
.am-period svg { width: 13px; height: 13px; color: var(--text-tertiary); }

.am-body { padding: 18px; }
.am-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.am-cell {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 92px;
}
.am-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.am-value {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.am-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}
.am-pos { color: var(--perf-pos); }
.am-neg { color: var(--perf-neg); }
.am-empty { padding: 28px 12px; text-align: center; }
.am-empty-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.am-empty-sub { font-size: 12px; color: var(--text-tertiary); max-width: 320px; margin: 0 auto; line-height: 1.5; }

/* ===== Current Company card ===== */
.cc-card .card-body { padding: 18px; display: flex; flex-direction: column; height: calc(100% - 50px); min-height: 200px; }
.cc-row {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 0;
}
.cc-logo {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px; color: var(--text-secondary);
}
.cc-meta { flex: 1; min-width: 0; }
.cc-name { font-size: 16px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.cc-role { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.cc-status {
  font-size: 11px; font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.cc-foot { margin-top: auto; padding-top: 16px; display: flex; justify-content: flex-end; }

/* ===== Events Attended card ===== */
.ev-empty {
  padding: 24px 8px;
  font-size: 13px;
  color: var(--text-tertiary);
}
.ev-list { display: flex; flex-direction: column; gap: 10px; }
.ev-item {
  display: flex; gap: 14px; align-items: baseline;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  background: var(--bg-page);
}
.ev-date { font-size: 11px; color: var(--text-tertiary); width: 80px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ev-name { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ===== Groups card ===== */
.gr-section-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.gr-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  font-size: 12px; font-weight: 500;
  color: var(--accent-deep);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
}
.gr-pill:hover { background: #DDE9E9; }
.gr-pill.muted { color: var(--text-tertiary); background: var(--bg-muted); border-color: var(--border-subtle); }
.gr-empty { font-size: 12px; color: var(--text-tertiary); padding: 4px 0; }

/* ===== Application form card (Pending only, in Overview) ===== */
.app-form-card .card-head { padding: 12px 18px; }
.app-form-card .card-body { padding: 0; }
.app-form-card .detail-grid { padding: 18px; gap: 14px; grid-template-columns: 2fr 1fr; }

/* ===== Investments tab — KPI strip ===== */
.inv-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}
.inv-kpi {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.inv-kpi-label {
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.inv-kpi-val {
  font-family: var(--font-sans); font-style: normal;
  font-weight: 600;
  font-size: 22px; line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.inv-kpi-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.inv-kpi-sub.perf-pos { color: var(--perf-pos); }

/* Investments table — extra rules for v3.3 */
.inv-table thead th { font-size: 10.5px; }
.inv-table .deal-cell { gap: 10px; }
.inv-table .deal-logo {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--bg-muted); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; color: var(--text-secondary);
}
.inv-foot-row td {
  background: var(--bg-page);
  border-top: 1px solid var(--border-strong);
  border-bottom: none !important;
  padding: 12px 12px !important;
  font-size: 13px;
}

/* ===== Career tab — vertical timeline ===== */
.career-list { display: flex; flex-direction: column; gap: 10px; }
.career-item {
  display: flex; gap: 14px;
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  align-items: flex-start;
}
.career-logo {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; color: var(--text-secondary);
  flex-shrink: 0;
}
.career-body { flex: 1; min-width: 0; }
.career-period {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.career-role { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.career-company { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.career-desc { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }

/* Detail-actions tightening for new Approve/Decline buttons */
.detail-header .detail-actions { gap: 6px; flex-wrap: wrap; }

/* Mid-width responsive */
@media (max-width: 1100px) {
  .ov-grid { grid-template-columns: 1fr; }
  .ov-grid .am-card,
  .ov-grid .gr-card { grid-column: 1 !important; }
  .inv-kpi-strip { grid-template-columns: repeat(3, 1fr); }
}

/* ============ v3.4 — Header rework ============ */
/* Header lines: company line + location line, with leading icon */
.detail-header .hdr-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
  font-size: 13px; color: var(--text-secondary);
  flex-wrap: wrap;
}
.detail-header .hdr-line .sep { color: var(--text-tertiary); }
.detail-header .hdr-line .hdr-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; color: var(--text-tertiary);
  flex-shrink: 0;
}
.detail-header .hdr-line .hdr-ico svg { width: 14px; height: 14px; }
.detail-header .hdr-company-line .company {
  color: var(--text-primary); font-weight: 600;
}
.detail-header .hdr-company-line .emp-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; font-size: 11px; font-weight: 500;
  border-radius: 999px;
  background: var(--success-bg); color: var(--success);
  border: 1px solid var(--success-border);
}
.detail-header .row-tags { margin-top: 8px; }
/* Tighten contact line — make it wrap nicely with the dot separators */
.detail-header .contact { margin-top: 8px; gap: 8px; align-items: center; }
.detail-header .contact .sep { color: var(--text-tertiary); }

/* Pencil-app: hidden by default, shown when card is in edit-mode */
.app-form-card .pencil-app {
  display: none;
  align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm);
  color: var(--text-tertiary); cursor: pointer;
  transition: all 0.15s ease;
  opacity: 0.65;
  margin-left: auto;
}
.app-form-card.edit-mode .pencil-app { display: inline-flex; }
.app-form-card.edit-mode .app-field:hover .pencil-app { opacity: 1; }
.app-form-card .pencil-app:hover { color: var(--accent); background: var(--accent-bg); border-color: var(--accent-border); }

/* Inline edit input inside Application card */
.app-field .field-edit-input {
  font: inherit; padding: 5px 9px;
  border: 1.5px solid var(--accent); border-radius: var(--r-sm);
  background: white; color: var(--text-primary);
  min-width: 220px;
  outline: none;
}
.app-field .field-edit-input:focus { box-shadow: 0 0 0 3px var(--accent-bg); }
.app-field .field-edit-actions { display: inline-flex; gap: 6px; margin-left: 8px; }
.app-field .field-edit-actions button {
  padding: 5px 12px; font-size: 12px; font-weight: 500;
  border-radius: var(--r-sm); border: 1px solid var(--border-subtle);
  background: white; cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.app-field .field-edit-actions button.save {
  background: var(--accent); color: white; border-color: var(--accent);
}
.app-field .field-edit-actions button.save:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.app-field .field-edit-actions button.cancel:hover { background: var(--bg-muted); }

/* Edit-all mode highlight */
.app-form-card.edit-mode { box-shadow: 0 0 0 2px var(--accent-bg) inset; }
.app-form-card.edit-mode .pencil-app { opacity: 1; color: var(--accent); }

/* Make sure topic of expertise etc. is NOT italic Source Serif */
.app-field-value.long { font-style: normal; font-family: var(--font-sans); }

/* v3.4 — make Application form fields a 3-col grid: label | value | pencil */
.app-form-card .app-field {
  grid-template-columns: 180px 1fr auto;
}
.app-form-card .app-field .pencil-app {
  grid-column: 3;
  align-self: center;
}
/* When inline-edit input is present, drop into row 2 spanning all cols cleanly */
.app-form-card .app-field .field-edit-input {
  grid-column: 2;
}
.app-form-card .app-field .field-edit-actions {
  grid-column: 3;
  margin-left: 0;
}

/* ============ EDIT MODAL ============ */
.ups-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20, 30, 35, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: ups-fade-in 0.15s ease;
}
@keyframes ups-fade-in { from { opacity: 0; } to { opacity: 1; } }
.ups-modal {
  background: #F5F4EE; border-radius: 16px;
  width: 100%; max-width: 640px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  font-family: "Satoshi", -apple-system, sans-serif;
  border: 1px solid rgba(90,154,157,0.18);
}
.ups-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(90,154,157,0.16);
}
.ups-modal-header h2 {
  margin: 0; font-size: 20px; font-weight: 600; color: #1f3034;
  letter-spacing: -0.01em;
}
.ups-modal-close {
  background: transparent; border: 0; cursor: pointer;
  font-size: 28px; line-height: 1; color: #5a6a6e;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.ups-modal-close:hover { background: rgba(90,154,157,0.10); color: #1f3034; }
.ups-modal-body {
  padding: 18px 24px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.ups-modal-body label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 500; color: #2a3a3e;
  flex: 1;
}
.ups-modal-body label .req { color: #c84b3a; margin-left: 4px; }
.ups-modal-body input,
.ups-modal-body select,
.ups-modal-body textarea {
  font-family: inherit; font-size: 14px;
  padding: 10px 12px; border: 1px solid rgba(90,154,157,0.30);
  border-radius: 8px; background: #fff; color: #1f3034;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ups-modal-body input:focus,
.ups-modal-body select:focus,
.ups-modal-body textarea:focus {
  outline: none; border-color: #5A9A9D;
  box-shadow: 0 0 0 3px rgba(90,154,157,0.18);
}
.ups-form-row {
  display: flex; gap: 14px;
}
.ups-form-row > label { flex: 1; min-width: 0; }
.ups-modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 14px; margin-top: 6px;
  border-top: 1px solid rgba(90,154,157,0.16);
  position: sticky; bottom: 0; background: #F5F4EE;
}
.ups-modal-footer .btn {
  font-size: 14px; font-weight: 500; padding: 10px 18px;
  border-radius: 8px; cursor: pointer; border: 0;
  transition: all 0.15s;
}
.ups-modal-footer .btn-secondary {
  background: transparent; color: #2a3a3e;
  border: 1px solid rgba(90,154,157,0.30);
}
.ups-modal-footer .btn-secondary:hover { background: rgba(90,154,157,0.08); }
.ups-modal-footer .btn-primary {
  background: #5A9A9D; color: #fff;
}
.ups-modal-footer .btn-primary:hover { background: #4a8487; }
.ups-modal-footer .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.ups-modal-note {
  font-size: 12px; color: #6a7a7e; margin: 4px 0 0;
  padding: 8px 12px; background: rgba(90,154,157,0.08);
  border-radius: 6px; border-left: 3px solid #5A9A9D;
}
.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid rgba(90,154,157,0.30);
  border-radius: 8px; max-height: 220px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 10;
}
.autocomplete-item {
  padding: 10px 12px; cursor: pointer; font-size: 14px;
  display: flex; justify-content: space-between; gap: 8px;
}
.autocomplete-item:hover { background: rgba(90,154,157,0.10); }
.autocomplete-item .meta { color: #6a7a7e; font-size: 12px; }
