/* style.css — PSI CRM Design System + Dashboard Styles */

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root, [data-theme="light"] {
  /* Fonts */
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-display: 'DM Sans', 'Helvetica Neue', sans-serif;

  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Surfaces (Cloud Gray / White) */
  --color-bg:             #e7e7e7;
  --color-surface:        #f2f2f0;
  --color-surface-2:      #fafafa;
  --color-surface-offset: #e8e6e2;
  --color-surface-offset-2: #dfddd8;
  --color-surface-dynamic: #d6d5d2;
  --color-divider:        #cccbc7;
  --color-border:         #c2c0bb;

  /* Text (Deep Mountain Blue / Slate) */
  --color-text:           #1C3C55;
  --color-text-muted:     #3B4363;
  --color-text-faint:     #8b8f9e;
  --color-text-inverse:   #f5f5f5;

  /* Primary Accent (Deep Mountain Blue) */
  --color-primary:        #1C3C55;
  --color-primary-hover:  #152e42;
  --color-primary-active: #0f2030;
  --color-primary-highlight: #d4dde5;

  /* Warning (Terra Brown) */
  --color-warning:        #964219;
  --color-warning-hover:  #713417;
  --color-warning-active: #4b2614;
  --color-warning-highlight: #ddcfc6;

  /* Error */
  --color-error:          #a12c3b;
  --color-error-hover:    #7d1e2e;
  --color-error-active:   #561720;
  --color-error-highlight: #e0ced2;

  /* Notification */
  --color-notification:   #a13544;
  --color-notification-hover: #782b33;
  --color-notification-active: #521f24;
  --color-notification-highlight: #dececb;

  /* Orange */
  --color-orange:         #da7101;
  --color-orange-hover:   #c55700;
  --color-orange-active:  #ac3e00;
  --color-orange-highlight: #e7d7c4;

  /* Gold (Alpine Gold) */
  --color-gold:           #A69565;
  --color-gold-highlight: #e9e4d2;

  /* Green */
  --color-success:        #437a22;
  --color-success-hover:  #2e5c10;
  --color-success-active: #1e3f0a;
  --color-success-highlight: #d4dfcc;

  /* Blue */
  --color-blue:           #1C3C55;
  --color-blue-hover:     #152e42;
  --color-blue-active:    #0f2030;
  --color-blue-highlight: #d4dde5;

  /* Purple */
  --color-purple:         #5a4d8a;
  --color-purple-highlight: #dad4e4;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);

  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-collapsed: 0px;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --color-bg:             #141a20;
  --color-surface:        #192028;
  --color-surface-2:      #1d2530;
  --color-surface-offset: #1a2229;
  --color-surface-offset-2: #1f2832;
  --color-surface-dynamic: #283340;
  --color-divider:        #253040;
  --color-border:         #354050;

  --color-text:           #cfd3d8;
  --color-text-muted:     #8a92a0;
  --color-text-faint:     #5a6373;
  --color-text-inverse:   #1C3C55;

  --color-primary:        #5d8aad;
  --color-primary-hover:  #4a7699;
  --color-primary-active: #396385;
  --color-primary-highlight: #253545;

  --color-warning:        #bb653b;
  --color-warning-hover:  #b95525;
  --color-warning-active: #993d10;
  --color-warning-highlight: #453530;

  --color-error:          #d16370;
  --color-error-hover:    #b94758;
  --color-error-active:   #9b2f42;
  --color-error-highlight: #4c3d40;

  --color-notification:   #dd6974;
  --color-notification-hover: #c24a59;
  --color-notification-active: #a53142;
  --color-notification-highlight: #453535;

  --color-orange:         #fdab43;
  --color-orange-hover:   #fec47e;
  --color-orange-active:  #fdd1a4;
  --color-orange-highlight: #453d30;

  --color-gold:           #c8b578;
  --color-gold-highlight: #3d3828;

  --color-success:        #6daa45;
  --color-success-hover:  #4d8f25;
  --color-success-active: #387015;
  --color-success-highlight: #2d3a28;

  --color-blue:           #5d8aad;
  --color-blue-hover:     #4a7699;
  --color-blue-active:    #396385;
  --color-blue-highlight: #253545;

  --color-purple:         #8a7ab8;
  --color-purple-highlight: #3a354a;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #141a20;
    --color-surface:        #192028;
    --color-surface-2:      #1d2530;
    --color-surface-offset: #1a2229;
    --color-surface-offset-2: #1f2832;
    --color-surface-dynamic: #283340;
    --color-divider:        #253040;
    --color-border:         #354050;
    --color-text:           #cfd3d8;
    --color-text-muted:     #8a92a0;
    --color-text-faint:     #5a6373;
    --color-text-inverse:   #1C3C55;
    --color-primary:        #5d8aad;
    --color-primary-hover:  #4a7699;
    --color-primary-active: #396385;
    --color-primary-highlight: #253545;
    --color-warning:        #bb653b;
    --color-warning-highlight: #453530;
    --color-error:          #d16370;
    --color-error-highlight: #4c3d40;
    --color-notification:   #dd6974;
    --color-notification-highlight: #453535;
    --color-orange:         #fdab43;
    --color-orange-highlight: #453d30;
    --color-gold:           #c8b578;
    --color-gold-highlight: #3d3828;
    --color-success:        #6daa45;
    --color-success-highlight: #2d3a28;
    --color-blue:           #5d8aad;
    --color-blue-highlight: #253545;
    --color-purple:         #8a7ab8;
    --color-purple-highlight: #3a354a;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
html, body {
  height: 100%;
  overflow: hidden;
  margin: 0;
}

.dashboard {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: auto 1fr;
  height: 100dvh;
}

/* Sidebar */
.sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  background: var(--color-surface);
  border-right: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 20;
}

.sidebar-logo {
  padding: var(--space-4) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.sidebar-logo svg {
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.sidebar-logo-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
  display: block;
  line-height: 1.3;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-interactive);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  min-height: 44px;
  position: relative;
}

.sidebar-nav-item:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
  padding-left: calc(var(--space-4) + 2px);
}

.sidebar-nav-item.active {
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.sidebar-nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.sidebar-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  padding: var(--space-2) var(--space-3) var(--space-1);
}

.sidebar-footer {
  padding: var(--space-3) var(--space-3);
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* Header */
.header {
  grid-column: 2;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.header-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.mobile-menu-btn {
  display: none;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text);
}

/* Main content */
.main {
  grid-column: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-6);
  background: var(--color-bg);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-interactive);
  border: none;
  font-family: inherit;
  white-space: nowrap;
  min-height: 36px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-secondary {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-border); }

.btn-danger {
  background: #dc3545;
  color: #fff;
}
.btn-danger:hover { background: #c82333; }

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  min-height: 28px;
}

.btn-icon {
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  background: transparent;
  min-height: 36px;
  min-width: 36px;
}
.btn-icon:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
}

/* Status badges */
.badge-active { background: var(--color-success-highlight); color: var(--color-success); }
.badge-prospect { background: var(--color-blue-highlight); color: var(--color-blue); }
.badge-dormant { background: var(--color-surface-dynamic); color: var(--color-text-muted); }
.badge-new { background: var(--color-primary-highlight); color: var(--color-primary); }
.badge-in-process { background: var(--color-blue-highlight); color: var(--color-blue); }
.badge-placed { background: var(--color-success-highlight); color: var(--color-success); }
.badge-do-not-contact { background: var(--color-notification-highlight); color: var(--color-notification); }

/* Pipeline stage badges */
.badge-sourced { background: var(--color-surface-dynamic); color: var(--color-text-muted); }
.badge-contacted { background: var(--color-blue-highlight); color: var(--color-blue); }
.badge-qualified { background: var(--color-primary-highlight); color: var(--color-primary); }
.badge-submitted { background: var(--color-purple-highlight); color: var(--color-purple); }
.badge-interviewing { background: var(--color-orange-highlight); color: var(--color-orange); }
.badge-offer { background: var(--color-gold-highlight); color: var(--color-gold); }
.badge-pipeline-placed { background: var(--color-success-highlight); color: var(--color-success); }
.badge-rejected { background: var(--color-notification-highlight); color: var(--color-notification); }

/* Priority badges */
.badge-high { background: var(--color-notification-highlight); color: var(--color-notification); }
.badge-medium { background: var(--color-orange-highlight); color: var(--color-orange); }
.badge-low { background: var(--color-blue-highlight); color: var(--color-blue); }

/* Role status badges */
.badge-researching { background: var(--color-surface-dynamic); color: var(--color-text-muted); }
.badge-shortlist { background: var(--color-blue-highlight); color: var(--color-blue); }
.badge-role-interviewing { background: var(--color-orange-highlight); color: var(--color-orange); }
.badge-role-offer { background: var(--color-gold-highlight); color: var(--color-gold); }
.badge-role-placed { background: var(--color-success-highlight); color: var(--color-success); }
.badge-closed { background: var(--color-surface-dynamic); color: var(--color-text-faint); }
.badge-on-hold { background: var(--color-orange-highlight); color: var(--color-orange); }
.badge-canceled { background: var(--color-error-highlight); color: var(--color-error); }
.badge-past-client { background: var(--color-surface-dynamic); color: var(--color-text-faint); }

/* Seniority badges */
.badge-seniority {
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Source badges */
.badge-source {
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  margin-right: var(--space-1);
  margin-bottom: var(--space-1);
}

/* ============================================
   TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums lining-nums;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-bg);
}

.data-table th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-divider);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color var(--transition-interactive);
}

.data-table th:hover {
  color: var(--color-text);
}

.data-table th .sort-arrow {
  display: inline-block;
  margin-left: var(--space-1);
  opacity: 0.4;
  font-size: 0.65rem;
}

.data-table th.sorted .sort-arrow {
  opacity: 1;
  color: var(--color-primary);
}

.data-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-interactive);
}

.data-table tbody tr:hover {
  background: var(--color-surface-offset);
}

.data-table tbody tr.clickable {
  cursor: pointer;
}

.date-overdue {
  color: var(--color-notification);
  font-weight: 600;
}

.date-today {
  color: var(--color-orange);
  font-weight: 600;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  transform: translateY(-1px);
}

/* ============================================
   KANBAN
   ============================================ */
.kanban-board {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-4);
  min-height: 400px;
}

.kanban-column {
  flex: 0 0 280px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 160px);
}

.kanban-column-header {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-count {
  background: var(--color-surface-dynamic);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.kanban-column-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
}

.kanban-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kanban-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.kanban-card-client {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.kanban-card-location {
  font-size: 0.7rem;
  color: var(--color-text-faint);
}

.kanban-card-count {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.kanban-card-date {
  font-size: 0.7rem;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ============================================
   SEARCHES — HORIZONTAL SECTIONS
   ============================================ */
.searches-horizontal {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.search-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}

.search-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  user-select: none;
  background: var(--color-surface-offset);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-interactive);
}
.search-section-header:hover {
  background: var(--color-surface-offset-2);
}

.search-section-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.search-section-indicator {
  width: 4px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
}

.search-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.search-section-count {
  background: var(--color-surface-dynamic);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.search-section-chevron {
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.search-section.collapsed .search-section-chevron {
  transform: rotate(-90deg);
}
.search-section.collapsed .search-section-body {
  display: none;
}
.search-section.collapsed .search-section-header {
  border-bottom: none;
}

.search-section-body {
  padding: var(--space-3) var(--space-4);
}

.search-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.search-card-h {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}
.search-card-h:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.search-card-h-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 2px;
}

.search-card-h-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.search-card-h-client {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.search-card-h-details {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: var(--color-text-faint);
}

.search-card-h-details span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.search-card-h-pipeline {
  color: var(--color-text-muted);
  font-weight: 500;
}

.search-card-h-date {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   LINKEDIN LINK STYLES
   ============================================ */
.linkedin-link {
  color: #0a66c2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-interactive);
}
.linkedin-link:hover {
  opacity: 0.7;
}

.linkedin-profile-link {
  color: #0a66c2;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
}
.linkedin-profile-link:hover {
  text-decoration: underline;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.form-input,
.form-select,
.form-textarea {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
  color: var(--color-text);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-faint);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* Search bar */
.search-bar {
  position: relative;
  max-width: 320px;
}

.search-bar svg {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-faint);
  pointer-events: none;
}

.search-bar input {
  padding-left: var(--space-8);
}

/* Filters row */
.filters-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

/* ============================================
   MODALS
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0.15 0.01 80 / 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: scale(0.96) translateY(8px);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.modal-close {
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: all var(--transition-interactive);
}
.modal-close:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}

.modal-body {
  padding: var(--space-5) var(--space-6);
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* ============================================
   DETAIL PANEL (slide-out)
   ============================================ */
.detail-panel-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0.15 0.01 80 / 0.4);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-panel-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: 90vw;
  background: var(--color-surface);
  border-left: 1px solid var(--color-divider);
  box-shadow: var(--shadow-lg);
  z-index: 91;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-panel-backdrop.open .detail-panel {
  transform: translateX(0);
}

.detail-panel-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.detail-panel-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.detail-panel-body {
  padding: var(--space-5) var(--space-6);
  flex: 1;
}

.detail-section {
  margin-bottom: var(--space-6);
}

.detail-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}

.detail-field {
  margin-bottom: var(--space-3);
}

.detail-field-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
  margin-bottom: 2px;
}

.detail-field-value {
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  text-align: center;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 360px;
}

/* ============================================
   UTILITY
   ============================================ */
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.font-mono { font-variant-numeric: tabular-nums lining-nums; }
.font-semibold { font-weight: 600; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.gap-2 { gap: var(--space-2); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Mini table inside detail panels */
.mini-table {
  width: 100%;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums lining-nums;
}

.mini-table th {
  text-align: left;
  padding: var(--space-1) var(--space-2);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  border-bottom: 1px solid var(--color-divider);
}

.mini-table td {
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Keep sidebar always visible — use compact mode for narrow viewports */
@media (max-width: 600px) {
  :root, [data-theme="light"], [data-theme="dark"] {
    --sidebar-width: 220px;
  }

  .dashboard {
    grid-template-columns: var(--sidebar-width) 1fr;
  }

  .sidebar-nav-item {
    min-height: 38px;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
  }

  .sidebar-nav-item svg {
    width: 18px;
    height: 18px;
  }

  .sidebar-logo-text {
    font-size: var(--text-sm);
  }

  .sidebar-logo-sub {
    display: none;
  }

  .sidebar-logo svg {
    width: 28px;
    height: 28px;
  }

  .sidebar-logo {
    padding: var(--space-2) var(--space-3);
  }

  .sidebar-section-label {
    font-size: 0.65rem;
    padding: var(--space-1) var(--space-3);
  }

  .main {
    padding: var(--space-4);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .kanban-column {
    flex: 0 0 250px;
  }

  .detail-panel {
    width: 100%;
    max-width: 100vw;
  }

  .header {
    padding: var(--space-3) var(--space-4);
  }

  .global-search-wrap {
    width: 140px;
  }
}

/* Only hide sidebar on very narrow phone screens */
@media (max-width: 420px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: oklch(0.15 0.01 80 / 0.4);
    z-index: 49;
    display: none;
  }

  .sidebar-overlay.open {
    display: block;
  }

  .header {
    grid-column: 1;
  }

  .main {
    grid-column: 1;
    padding: var(--space-3);
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* ============================================
   NEW STAGE BADGES (Thrive TRM stage names)
   ============================================ */
.badge-outreach-required   { background: var(--color-surface-dynamic); color: var(--color-text-muted); }
.badge-outreach-complete   { background: var(--color-blue-highlight); color: var(--color-blue); }
.badge-interest-in-consideration { background: var(--color-primary-highlight); color: var(--color-primary); }
.badge-interview-reference { background: var(--color-purple-highlight); color: var(--color-purple); }
.badge-client-interview    { background: var(--color-orange-highlight); color: var(--color-orange); }
.badge-present-offer       { background: var(--color-gold-highlight); color: var(--color-gold); }
.badge-pipeline-placed     { background: var(--color-success-highlight); color: var(--color-success); }
.badge-rejected            { background: var(--color-notification-highlight); color: var(--color-notification); }

/* Task status badges */
.badge-task-open      { background: var(--color-blue-highlight); color: var(--color-blue); }
.badge-task-completed { background: var(--color-success-highlight); color: var(--color-success); }
.badge-task-overdue   { background: var(--color-notification-highlight); color: var(--color-notification); }

/* Contact type badges */
.badge-type-candidate { background: var(--color-primary-highlight); color: var(--color-primary); }
.badge-type-client    { background: var(--color-orange-highlight); color: var(--color-orange); }

/* ============================================
   KPI CARDS (Dashboard)
   ============================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.kpi-card-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.kpi-card-label svg {
  width: 15px;
  height: 15px;
  color: var(--color-text-faint);
}

.kpi-card-value {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}

.kpi-card-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.kpi-card-accent-teal   { border-top: 3px solid var(--color-primary); }
.kpi-card-accent-orange { border-top: 3px solid var(--color-orange); }
.kpi-card-accent-red    { border-top: 3px solid var(--color-notification); }
.kpi-card-accent-green  { border-top: 3px solid var(--color-success); }

/* ============================================
   SECTION HEADERS
   ============================================ */
.view-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.view-section-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

/* ============================================
   SEARCHES TOOLBAR
   ============================================ */
.searches-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.searches-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
}

.searches-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.view-toggle {
  display: flex;
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.view-toggle-btn {
  padding: var(--space-1) var(--space-3);
  border-radius: calc(var(--radius-md) - 2px);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  transition: all var(--transition-interactive);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.view-toggle-btn svg {
  width: 14px;
  height: 14px;
}

.view-toggle-btn.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   DETAIL PANEL TABS
   ============================================ */
.detail-tabs,
.detail-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-5);
}

.detail-tab,
.detail-tab-btn {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-interactive);
  font-family: inherit;
}

.detail-tab:hover,
.detail-tab-btn:hover {
  color: var(--color-text);
}

.detail-tab.active,
.detail-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.activity-item {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 5px;
}

.activity-content {
  flex: 1;
}

.activity-title {
  color: var(--color-text);
  line-height: 1.4;
}

.activity-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: 2px;
}

/* ============================================
   PIPELINE STAGE GROUP HEADERS
   ============================================ */
.stage-group-header {
  background: var(--color-surface-offset);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.stage-group-header .stage-count {
  background: var(--color-surface-dynamic);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
}

/* ============================================
   TASKS
   ============================================ */
.tasks-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-5);
}

.tasks-tab {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-interactive);
  font-family: inherit;
}

.tasks-tab:hover { color: var(--color-text); }

.tasks-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* ============================================
   GLOBAL SEARCH
   ============================================ */
.global-search-wrap {
  position: relative;
  width: 260px;
}

@media (max-width: 768px) {
  .global-search-wrap { width: 160px; }
}

.global-search-bar {
  position: relative;
}

.global-search-bar svg {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--color-text-faint);
  pointer-events: none;
}

.global-search-bar input {
  padding-left: calc(var(--space-3) + 15px + var(--space-2));
  font-size: var(--text-sm);
}

.global-search-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
}

.global-search-dropdown.open {
  display: block;
}

.global-search-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--transition-interactive);
  border-bottom: 1px solid var(--color-divider);
}

.global-search-result:last-child {
  border-bottom: none;
}

.global-search-result:hover {
  background: var(--color-surface-offset);
}

.global-search-result-info {
  flex: 1;
  min-width: 0;
}

.global-search-result-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-result-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-empty {
  padding: var(--space-4);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================
   SETTINGS PAGE
   ============================================ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

@media (max-width: 768px) {
  .settings-grid { grid-template-columns: 1fr; }
}

.settings-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.settings-section-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}

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

.settings-item-label {
  color: var(--color-text);
}

.settings-about {
  grid-column: 1 / -1;
  background: var(--color-primary-highlight);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.settings-about-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.settings-about-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================
   NOTES TEXTAREA IN DETAIL PANEL
   ============================================ */
.notes-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-2);
}

/* ============================================
   ADD TO SEARCH BUTTON
   ============================================ */
.add-to-search-bar {
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

/* ============================================
   CONTACTS VIEW
   ============================================ */
.contacts-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

/* ============================================
   PIPELINE STAGE GROUPS (in detail panel)
   ============================================ */
/* Stage summary bar — clickable chips at top of pipeline */
.pipeline-stage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
}
.pipeline-stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--color-divider);
  background: var(--color-surface-2);
  color: var(--color-text);
  transition: all 0.15s;
}
.pipeline-stage-chip:hover {
  border-color: var(--color-gold);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.pipeline-stage-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 0.68rem;
  font-weight: 700;
}
.pipeline-stage-chip-label {
  white-space: nowrap;
}

.pipeline-stage-group {
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.pipeline-stage-header {
  background: var(--color-surface-offset);
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}
.pipeline-stage-toggle:hover {
  background: var(--color-surface-offset-2);
}
.pipeline-stage-chevron {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-faint);
  flex-shrink: 0;
}

/* Candidate info within pipeline rows */
.pipeline-cand-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-primary);
  cursor: pointer;
  display: inline;
}
.pipeline-cand-name:hover {
  text-decoration: underline;
  color: var(--color-primary-hover);
}
.pipeline-cand-subtitle {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.pipeline-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  transition: background var(--transition-interactive);
}

.pipeline-row:last-child {
  border-bottom: none;
}

.pipeline-row:hover {
  background: var(--color-surface-offset);
}

/* ============================================ */
/* Documents / Attachments                      */
/* ============================================ */

.doc-list { display: flex; flex-direction: column; gap: var(--space-2); }

.doc-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  transition: background var(--transition-interactive);
}
.doc-item:hover { background: var(--color-surface-offset-2); }

.doc-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em;
}

.doc-icon-resume       { background: var(--color-primary-highlight); color: var(--color-primary); }
.doc-icon-cover        { background: var(--color-blue-highlight);    color: var(--color-blue); }
.doc-icon-reference    { background: var(--color-orange-highlight);  color: var(--color-orange); }
.doc-icon-spec         { background: var(--color-purple-highlight);  color: var(--color-purple); }
.doc-icon-contract     { background: var(--color-gold-highlight);    color: var(--color-gold); }
.doc-icon-presentation { background: var(--color-success-highlight); color: var(--color-success); }
.doc-icon-other        { background: var(--color-surface-dynamic);   color: var(--color-text-muted); }

.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.doc-name a { color: var(--color-primary); text-decoration: none; }
.doc-name a:hover { text-decoration: underline; }
.doc-meta { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }
.doc-delete {
  padding: var(--space-1); border-radius: var(--radius-sm);
  color: var(--color-text-faint); cursor: pointer;
  background: none; border: none;
  transition: all var(--transition-interactive);
}
.doc-delete:hover { color: var(--color-notification); background: var(--color-notification-highlight); }

.doc-download {
  padding: var(--space-1); border-radius: var(--radius-sm);
  color: var(--color-text-faint); cursor: pointer;
  background: none; border: none;
  transition: all var(--transition-interactive);
}
.doc-download:hover { color: var(--color-primary); background: var(--color-primary-highlight); }

/* ============================================
   DROP ZONE (modal)
   ============================================ */
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  margin-bottom: var(--space-4);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-offset);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.drop-zone svg {
  color: var(--color-text-faint);
  transition: color var(--transition-interactive);
}

.drop-zone-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.drop-zone-or {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.drop-zone.drag-over {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.drop-zone.drag-over svg {
  color: var(--color-primary);
}

.drop-zone.has-file {
  border-color: var(--color-success);
  border-style: solid;
  background: var(--color-success-highlight);
  padding: var(--space-4);
}

.drop-zone.has-file svg {
  color: var(--color-success);
}

.drop-zone-filename {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}

.drop-zone-size {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================
   INLINE DROP ZONE (in document lists)
   ============================================ */
.inline-drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  border: 2px dashed var(--color-divider);
  border-radius: var(--radius-md);
  background: transparent;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  transition: all var(--transition-interactive);
}

.inline-drop-zone svg {
  color: var(--color-text-faint);
  flex-shrink: 0;
}

.inline-drop-zone.drag-over {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}

.inline-drop-zone.drag-over svg {
  color: var(--color-primary);
}

/* Pipeline candidate docs expand section */
.pipeline-row-wrap {
  border-bottom: 1px solid var(--color-divider);
}

.pipeline-row-wrap:last-child {
  border-bottom: none;
}

.pipeline-cand-docs {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.pipeline-cand-docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.pipeline-docs-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  min-height: unset;
  font-size: var(--text-xs);
  line-height: 1;
}

.pipeline-docs-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--color-primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
}

.btn-ghost.pipeline-docs-btn .pipeline-docs-count {
  background: var(--color-text-faint);
}

.btn-primary.pipeline-docs-btn .pipeline-docs-count {
  background: rgba(255,255,255,0.3);
}

.pipeline-cand-docs .inline-drop-zone {
  margin-bottom: var(--space-2);
  padding: var(--space-2);
}

.pipeline-cand-docs .doc-list {
  margin-top: var(--space-2);
}

.pipeline-cand-docs .doc-item {
  padding: var(--space-2) var(--space-3);
}

/* Candidate Search Picker */
.candidate-search-results {
  display: none;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-top: var(--space-2);
  background: var(--color-surface-dynamic);
}

.cand-result-item {
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  border-bottom: 1px solid var(--color-divider);
  transition: background 0.12s;
}
.cand-result-item:last-child { border-bottom: none; }
.cand-result-item:hover { background: var(--color-surface-offset); }

.cand-result-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.cand-result-empty {
  padding: var(--space-3);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.cand-selected-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-top: var(--space-2);
}

/* ============================================
   BULK ACTIONS
   ============================================ */
.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-highlight);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.bulk-count {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.bulk-selected-row {
  background: var(--color-primary-highlight) !important;
}

.data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

/* ============================================
   DUPLICATE DETECTION
   ============================================ */
.dup-warning-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-warning-highlight);
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  color: var(--color-warning);
  font-size: var(--text-sm);
  font-weight: 500;
}

.dup-warning-banner svg {
  flex-shrink: 0;
  color: var(--color-warning);
}

.dup-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.dup-item {
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
}

/* ============================================
   TASK ENHANCEMENTS (Reminders + Categories)
   ============================================ */
.reminder-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--color-notification-highlight);
  color: var(--color-notification);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

.reminder-row {
  border-left: 3px solid var(--color-notification) !important;
}

/* ============================================
   AI-POWERED CANDIDATE MATCHING
   ============================================ */
.match-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.match-card {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-interactive);
}

.match-card:hover {
  border-color: var(--color-primary);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.match-score {
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.match-reason-tag {
  padding: 2px 8px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ============================================
   RESUME PARSING
   ============================================ */
.resume-parse-preview {
  padding: var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.resume-parse-preview .detail-field {
  margin-bottom: var(--space-2);
}

/* ============================================
   MOBILE-OPTIMIZED VIEWS
   ============================================ */

/* Mobile candidate cards */
@media (max-width: 768px) {
  .filters-row {
    flex-direction: column;
    gap: var(--space-2);
  }

  .filters-row .form-select {
    min-width: unset;
    width: 100%;
  }

  .filters-row .search-bar {
    width: 100%;
  }

  /* Convert tables to card layout on mobile */
  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tbody tr {
    padding: var(--space-3);
    margin-bottom: var(--space-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
  }

  .data-table td {
    padding: var(--space-1) 0;
    border-bottom: none;
    font-size: var(--text-sm);
  }

  .data-table td:first-child {
    font-size: var(--text-base);
    padding-bottom: var(--space-1);
  }

  .data-table td:empty {
    display: none;
  }

  /* Task table mobile */
  .data-table td:last-child {
    padding-top: var(--space-2);
  }

  /* Bulk toolbar mobile */
  .bulk-toolbar {
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
  }

  .bulk-toolbar .form-input,
  .bulk-toolbar .form-select {
    min-width: unset;
    width: 100%;
  }

  /* Detail panel mobile */
  .detail-panel {
    width: 100%;
    max-width: 100vw;
  }

  .detail-panel-header {
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-start;
  }

  .detail-tab-bar,
  .detail-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .detail-tab-bar::-webkit-scrollbar,
  .detail-tabs::-webkit-scrollbar {
    display: none;
  }

  /* Match cards mobile */
  .match-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* KPI grid responsive (already exists but reinforce) */
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Modal mobile */
  .modal {
    width: 95vw;
    max-height: 90vh;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Pipeline view mobile */
  .pipeline-row {
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-start;
  }

  .pipeline-row > div:last-child {
    flex-wrap: wrap;
  }

  /* Header mobile */
  .header-right {
    gap: var(--space-2);
  }

  .global-search-wrap {
    width: 100px;
  }

  /* Tab bar mobile */
  .tab-bar {
    flex-direction: column;
    gap: var(--space-2);
  }

  /* Kanban mobile */
  .kanban-board {
    flex-direction: column;
  }

  .kanban-column {
    flex: none;
    width: 100%;
  }

  .search-cards-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .header-title {
    font-size: var(--text-base);
  }

  .header-subtitle {
    display: none;
  }

  .match-card {
    padding: var(--space-2) var(--space-3);
  }

  .searches-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .searches-toolbar-left,
  .searches-toolbar-right {
    flex-wrap: wrap;
  }
}

/* ============================================
   DOCUMENT PARSE UI
   ============================================ */

/* Parse button on doc items */
.doc-parse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--accent);
  transition: background 180ms ease, color 180ms ease;
  flex-shrink: 0;
}
.doc-parse-btn:hover {
  background: var(--accent);
  color: var(--color-text-inverse);
}

/* Parse mode sections in modal */
.parse-mode-section {
  margin-bottom: var(--space-3);
}
.parse-mode-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

/* Divider between modes */
.parse-mode-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.parse-mode-divider::before,
.parse-mode-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Document option buttons in parse modal */
.parse-doc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.parse-doc-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
  text-align: left;
}
.parse-doc-option:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}
.parse-doc-ext {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--color-text-inverse);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.parse-doc-details {
  flex: 1;
  min-width: 0;
}
.parse-doc-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.parse-doc-type {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 1px;
}
.parse-doc-arrow {
  flex-shrink: 0;
  color: var(--color-text-secondary);
  transition: transform 180ms ease;
}
.parse-doc-option:hover .parse-doc-arrow {
  transform: translateX(2px);
  color: var(--accent);
}

/* Loading state */
.parse-doc-loading {
  justify-content: center;
  gap: var(--space-2);
  pointer-events: none;
  opacity: 0.7;
}

/* Spinner */
.parse-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: parseSpin 0.8s linear infinite;
}
@keyframes parseSpin {
  to { transform: rotate(360deg); }
}

/* Resume parse preview */
.resume-parse-preview {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* Auto-parse loading status */
.auto-parse-status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ===================== OFF-LIMITS ===================== */

/* Badge */
.badge-offlimits {
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

/* Table row tint */
.row-offlimits {
  background: rgba(220, 38, 38, 0.05);
}
.row-offlimits:hover {
  background: rgba(220, 38, 38, 0.09) !important;
}

/* Candidate detail banner */
.offlimits-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #dc2626;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}
.offlimits-banner svg {
  flex-shrink: 0;
  color: #dc2626;
}

/* Settings: Off-Limits group cards */
.ol-window-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
}

.ol-group-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--surface-2);
}
.ol-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.ol-group-name {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
}

.ol-subs-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-3);
  max-height: 180px;
  overflow-y: auto;
}
.ol-sub-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 12px;
  color: var(--text-1);
  white-space: nowrap;
}
.ol-sub-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  border-radius: 2px;
}
.ol-sub-remove:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.ol-add-sub-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* AI Match card off-limits */
.match-card-offlimits {
  border-left: 3px solid #dc2626;
  background: rgba(220, 38, 38, 0.04);
}
.match-ol-reason {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #dc2626;
  padding: 4px 0 2px;
}

/* ============================================
   CANDIDATE NAME LINK + PREVIEW POPOVER
   ============================================ */
.cand-name-link {
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s, color 0.15s;
  position: relative;
  white-space: nowrap;
}
.cand-name-link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Preview popover */
.cand-preview-popover {
  position: fixed;
  z-index: 9999;
  width: 360px;
  max-height: 420px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  overflow: hidden;
}
.cand-preview-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cand-preview-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.cand-preview-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}
.cand-preview-title {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.cand-preview-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.cand-preview-body {
  padding: 12px 16px;
  max-height: 280px;
  overflow-y: auto;
}
.cand-preview-section {
  margin-bottom: 10px;
}
.cand-preview-section:last-child {
  margin-bottom: 0;
}
.cand-preview-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: 4px;
}
.cand-preview-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: 2px 0;
}
.cand-preview-row svg {
  flex-shrink: 0;
  opacity: 0.5;
}
.cand-preview-row a {
  color: var(--color-accent);
  text-decoration: none;
}
.cand-preview-row a:hover {
  text-decoration: underline;
}
.cand-preview-pipeline {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-xs);
}
.cand-preview-pipeline th {
  text-align: left;
  font-weight: 600;
  color: var(--color-text-faint);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 6px 3px 0;
  border-bottom: 1px solid var(--color-divider);
}
.cand-preview-pipeline td {
  padding: 4px 6px 4px 0;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-surface-offset);
}
.cand-preview-footer {
  padding: 8px 16px 10px;
  border-top: 1px solid var(--color-divider);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.cand-preview-footer .btn {
  font-size: var(--text-xs);
  padding: 4px 12px;
}
.cand-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.cand-preview-tags .tag {
  font-size: 0.6rem;
  padding: 1px 6px;
}

@media (max-width: 600px) {
  .cand-preview-popover {
    width: calc(100vw - 32px);
    left: 16px !important;
    right: 16px !important;
  }
}

/* ── Work History Timeline ───────────────────────────────── */
.work-history-timeline {
  position: relative;
  padding-left: 0;
}
.wh-entry {
  display: flex;
  gap: 14px;
  position: relative;
  min-height: 48px;
}
.wh-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 14px;
  flex-shrink: 0;
  padding-top: 5px;
}
.wh-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  z-index: 1;
}
.wh-dot--current {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166, 149, 101, 0.18);
}
.wh-connector {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
  margin-bottom: -4px;
}
.wh-content {
  flex: 1;
  padding-bottom: 20px;
}
.wh-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.3;
}
.wh-company {
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 500;
  margin-top: 1px;
}
.wh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 4px;
}
.wh-meta span:not(:last-child)::after {
  content: '\00b7';
  margin-left: 6px;
}
.wh-duration {
  font-weight: 500;
}
.wh-description {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
  max-height: 4.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Compact work history (popover) */
.wh-compact { display: flex; flex-direction: column; gap: 6px; }
.wh-compact-entry {
  padding: 5px 8px;
  border-left: 2px solid var(--border);
  background: var(--bg-alt);
  border-radius: 0 4px 4px 0;
}
.wh-compact--current {
  border-left-color: var(--accent);
}
.wh-compact-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.wh-compact-company {
  font-size: 0.62rem;
  color: var(--accent);
  font-weight: 500;
}
.wh-compact-dates {
  font-size: 0.58rem;
  color: var(--text-muted);
}

/* Education */
.education-list { display: flex; flex-direction: column; gap: 12px; }
.edu-entry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.edu-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-top: 2px;
}
.edu-content { flex: 1; }
.edu-school {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.edu-degree {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 1px;
}
.edu-dates {
  margin-top: 2px;
}
