/* ============================================================================
   CCL Acquisitions Dashboard — Component Library
   Source: DESIGN_SYSTEM.md + Approved Mockups (Sessions 15-22)
   Load order: tokens.css → components.css → view-specific CSS
   ============================================================================ */


/* ========== LAYOUT ========== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--s-8);
}

.container--narrow { max-width: 960px; }
.container--form   { max-width: 520px; }
.container--report { max-width: 900px; }


/* ========== APP HEADER ========== */

.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s-8);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--brand);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 15px;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

/* Navigation */
.nav-items { display: flex; gap: var(--s-1); }

.nav-item {
  padding: var(--s-2) var(--s-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-500);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  border: none;
  background: none;
  font-family: var(--font-sans);
}

.nav-item:hover { color: var(--gray-700); background: var(--gray-100); }
.nav-item.active { color: var(--brand); font-weight: 600; background: var(--brand-wash); }
.nav-item i { width: 16px; height: 16px; }

/* Header actions */
.btn-header {
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  padding: var(--s-1-5) var(--s-3);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--t-fast);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
}

.btn-header:hover { border-color: var(--gray-300); box-shadow: var(--shadow-xs); }
.btn-header.primary { background: var(--brand); color: var(--white); border-color: var(--brand); }
.btn-header.primary:hover { background: var(--brand-dark); }
.btn-header i { width: 15px; height: 15px; }

/* Notification bell */
.notification-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-500);
  transition: all var(--t-fast);
}

.notification-btn:hover,
.notification-btn.active-state { background: var(--gray-100); color: var(--gray-700); }
.notification-btn i { width: 18px; height: 18px; }

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--error);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: var(--text-2xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow var(--t-fast);
}

.avatar:hover,
.avatar.active-state { box-shadow: 0 0 0 3px var(--brand-glow); }


/* ========== BUTTONS ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1-5);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-glow); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn i { width: 16px; height: 16px; }

.btn-primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { background: var(--brand-dark); box-shadow: none; }

.btn-secondary {
  background: var(--white);
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn-secondary:hover { background: var(--brand-wash); }

.btn-danger {
  background: var(--white);
  color: var(--error);
  border: 1px solid var(--error);
}
.btn-danger:hover { background: var(--error-wash); }

.btn-danger-solid {
  background: var(--error);
  color: var(--white);
}
.btn-danger-solid:hover { background: #DC2626; }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  color: var(--gray-600);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-icon:hover { background: var(--gray-300); color: var(--gray-800); }
.btn-icon i { width: 16px; height: 16px; }

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-1-5) 14px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-sans);
}
.btn-action i { width: 14px; height: 14px; }

.btn-action.advance  { color: var(--success); border-color: var(--success); }
.btn-action.advance:hover  { background: var(--success-wash); }
.btn-action.sendback { color: var(--warning); border-color: var(--warning); }
.btn-action.sendback:hover { background: var(--warning-wash); }
.btn-action.decline  { color: var(--error); border-color: var(--error); }
.btn-action.decline:hover  { background: var(--error-wash); }

.btn-sm { font-size: var(--text-sm); padding: var(--s-1-5) var(--s-3); }


/* ========== BADGES ========== */

/* Stage badge */
.badge-stage {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* Temperature badge */
.badge-temp {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
}
.badge-temp i { width: 12px; height: 12px; }

.badge-temp.hot    { background: var(--temp-hot-wash);    color: var(--temp-hot); }
.badge-temp.warm   { background: var(--temp-warm-wash);   color: var(--temp-warm); }
.badge-temp.cool   { background: var(--temp-cool-wash);   color: var(--temp-cool); }
.badge-temp.cold   { background: var(--temp-cold-wash);   color: var(--temp-cold); }
.badge-temp.frozen { background: var(--temp-frozen-wash); color: var(--temp-frozen); }

/* Sub-state badge */
.badge-sub {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.badge-sub::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.badge-sub.assigned    { background: var(--sub-assigned-wash);  color: var(--sub-assigned); }
.badge-sub.assigned::before    { background: var(--sub-assigned); }
.badge-sub.in-progress { background: var(--sub-progress-wash); color: var(--sub-progress); }
.badge-sub.in-progress::before { background: var(--sub-progress); }
.badge-sub.review      { background: var(--sub-review-wash);   color: var(--sub-review); }
.badge-sub.review::before      { background: var(--sub-review); }
.badge-sub.approved    { background: var(--sub-approved-wash); color: var(--sub-approved); }
.badge-sub.approved::before    { background: var(--sub-approved); }
.badge-sub.on-hold     { background: var(--sub-hold-wash);     color: var(--sub-hold); }
.badge-sub.on-hold::before     { background: var(--sub-hold); }

/* Days aging badge */
.days-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  color: var(--gray-500);
}
.days-badge i { width: 12px; height: 12px; }
.days-badge.warning { color: var(--days-warning); }
.days-badge.urgent  { color: var(--days-urgent); font-weight: 700; }

/* Score badge */
.score-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.score-badge .prefix { color: var(--gray-400); }
.score-badge .val    { color: var(--gray-800); }

/* Role badge */
.role-badge {
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.role-badge.admin     { background: var(--role-admin-bg);     color: var(--role-admin-text); }
.role-badge.assignee  { background: var(--role-assignee-bg);   color: var(--role-assignee-text); }
.role-badge.submitter { background: var(--role-submitter-bg);  color: var(--role-submitter-text); }


/* ========== PIPELINE STAGE BAR ========== */

/* ========== PIPELINE BAR (Segmented Tabs) ========== */

.pipeline-bar {
  position: sticky;
  top: 56px;
  z-index: var(--z-summary);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--s-2) var(--s-8);
}

.pipeline-tabs {
  display: flex;
  gap: var(--s-0-5);
  background: var(--gray-100);
  border-radius: var(--r-md);
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pipeline-tabs::-webkit-scrollbar { display: none; }

.pipeline-tab {
  padding: 5px var(--s-3);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  font-family: var(--font-sans);
  white-space: nowrap;
  flex-shrink: 0;
}
.pipeline-tab:hover { color: var(--gray-700); }

.pipeline-tab.active {
  background: var(--white);
  color: var(--gray-900);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.pipeline-tab .tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--gray-200);
  color: var(--gray-600);
  padding: 1px 6px;
  border-radius: var(--r-full);
  min-width: 20px;
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast);
}

.pipeline-tab:not(.zero) .tab-count {
  background: var(--tab-wash);
  color: var(--tab-color);
}

.pipeline-tab.active .tab-count {
  background: var(--tab-wash);
  color: var(--tab-color);
  font-weight: 700;
}

.pipeline-tab.zero { opacity: 0.5; }
.pipeline-tab.zero:hover { opacity: 0.75; }

.pipeline-sep {
  width: 1px;
  background: var(--gray-300);
  margin: 4px 2px;
  flex-shrink: 0;
}


/* ========== FILTER BAR ========== */

.filter-bar {
  position: sticky;
  top: 109px;
  z-index: var(--z-filter);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--s-2) var(--s-8);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex: 1;
  flex-wrap: wrap;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  padding: 6.5px var(--s-3);
  border-radius: var(--r-full);
  border: 1px solid var(--gray-300);
  background: var(--white);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  white-space: nowrap;
  line-height: 18px;
}

.filter-pill i { width: 14px; height: 14px; }
.filter-pill:hover { border-color: var(--gray-400); background: var(--gray-50); }
.filter-pill.active { border-color: var(--brand); background: var(--brand-wash); color: var(--brand); }

.filter-pill .count-badge {
  background: var(--brand);
  color: var(--white);
  border-radius: var(--r-full);
  padding: 0 5px;
  font-size: var(--text-2xs);
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

.clear-filters {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  cursor: pointer;
  border: none;
  background: none;
  padding: var(--s-1);
  transition: color var(--t-fast);
  font-family: var(--font-sans);
}
.clear-filters:hover { color: var(--gray-600); }

/* View toggle (Kanban / Table) */
.view-toggle {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-left: auto;
  flex-shrink: 0;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: none;
  background: var(--white);
  color: var(--gray-400);
  cursor: pointer;
  transition: all var(--t-fast);
}
.view-btn:hover { color: var(--gray-600); background: var(--gray-50); }
.view-btn.active { color: var(--brand); background: var(--brand-wash); }
.view-btn i { width: 16px; height: 16px; }


/* ========== DROPDOWN MENUS ========== */

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: var(--s-1);
  z-index: var(--z-dropdown);
  display: none;
}

.dropdown-menu.open { display: block; animation: dropdownReveal 150ms ease; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t-fast);
  color: var(--gray-700);
}
.dropdown-item:hover { background: var(--gray-50); }

.dropdown-item .check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}

.dropdown-item.selected .check { background: var(--brand); border-color: var(--brand); }

.dropdown-item.selected .check::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg);
  margin-bottom: 2px;
}


/* ========== KANBAN BOARD ========== */

.pipeline-content { padding: var(--s-5) var(--s-8) var(--s-10); }

.kanban-board {
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: var(--s-4);
  min-height: calc(100vh - 200px);
}
.kanban-board::-webkit-scrollbar { height: 6px; }
.kanban-board::-webkit-scrollbar-track { background: transparent; }
.kanban-board::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--r-full); }

.kanban-column {
  min-width: 272px;
  max-width: 272px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.kanban-column.auto-stage { min-width: 220px; max-width: 220px; opacity: 0.65; }

.col-header {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md) var(--r-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.col-count {
  background: rgba(255,255,255,0.25);
  color: var(--white);
  border-radius: var(--r-full);
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0 6px;
}

.col-body {
  flex: 1;
  background: var(--gray-100);
  border-radius: 0 0 var(--r-md) var(--r-md);
  border: 1px solid var(--gray-200);
  border-top: none;
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  overflow-y: auto;
  max-height: calc(100vh - 240px);
}
.col-body::-webkit-scrollbar { width: 4px; }
.col-body::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--r-full); }

.col-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-8) var(--s-4);
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  gap: var(--s-2);
}
.col-empty i { width: 24px; height: 24px; opacity: 0.5; }


/* ========== KANBAN CARD ========== */

.kanban-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  cursor: pointer;
  transition: all var(--t-base);
  box-shadow: var(--shadow-xs);
  position: relative;
}

/* Stage color accent (left bar) */
.kanban-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}

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

.kanban-card.clicked {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.kanban-card.analyzing { animation: cardPulse 2.5s ease-in-out infinite; }

.card-address {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.3;
}

.card-city {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}

.card-scores {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-2);
}

.card-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.card-subtasks {
  margin-top: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.subtask-tag {
  font-size: var(--text-2xs);
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-50);
  padding: 1px 6px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 3px;
}
.subtask-tag i { width: 10px; height: 10px; }
.subtask-tag.done { color: var(--success); background: rgba(16,185,129,0.06); text-decoration: line-through; }


/* ========== TABLE VIEW ========== */

.table-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.pipeline-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }

.pipeline-table thead { background: var(--gray-50); }

.pipeline-table th {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  font-size: 12px;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color var(--t-fast);
}
.pipeline-table th:hover { color: var(--gray-800); }

.pipeline-table th .sort-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
  opacity: 0.4;
}
.pipeline-table th.sorted .sort-icon { opacity: 1; color: var(--brand); }
.pipeline-table th i { width: 13px; height: 13px; }

.pipeline-table td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.pipeline-table tbody tr {
  cursor: pointer;
  transition: background var(--t-fast);
}
.pipeline-table tbody tr:hover { background: var(--brand-wash); }
.pipeline-table tbody tr:last-child td { border-bottom: none; }
.pipeline-table tbody tr.selected { background: var(--brand-wash); }

.table-address { font-weight: 500; color: var(--gray-800); }
.table-address .city { font-weight: 400; color: var(--gray-500); font-size: 12px; }

.table-score {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--gray-800);
}

.table-time {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
}

.table-assignee { display: flex; align-items: center; gap: var(--s-2); }
.table-assignee .card-avatar { width: 22px; height: 22px; font-size: 9px; }

.table-source { font-size: 12px; color: var(--gray-500); }

/* Source tag badge */
.source-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  border-radius: var(--r-sm); letter-spacing: 0.02em; line-height: 1.5;
  white-space: nowrap;
}
.source-tag i { width: 10px; height: 10px; }
.source-tag.src-api {
  background: rgba(72,122,123,0.08); color: var(--brand);
  border: 1px solid rgba(72,122,123,0.12);
}
.source-tag.src-form {
  background: rgba(245,158,11,0.06); color: #B45309;
  border: 1px solid rgba(245,158,11,0.12);
}
.source-tag.src-direct {
  background: rgba(59,130,246,0.06); color: var(--info);
  border: 1px solid rgba(59,130,246,0.12);
}
.card-source { margin-top: var(--s-1-5); }


/* ========== PAGINATION ========== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-500);
}

.pagination-info { font-weight: 500; }
.pagination-controls { display: flex; align-items: center; gap: var(--s-1); }

.page-btn {
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--t-fast);
}
.page-btn:hover { background: var(--gray-50); border-color: var(--gray-300); }
.page-btn.active { background: var(--brand); color: var(--white); border-color: var(--brand); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn i { width: 14px; height: 14px; }

.per-page { display: flex; align-items: center; gap: var(--s-2); }
.per-page select {
  padding: var(--s-1) var(--s-2);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
}


/* ========== SLIDE-OUT PANEL ========== */

.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: var(--z-panel-backdrop);
  animation: fadeIn 200ms ease;
}

.panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 60%;
  min-width: 480px;
  background: var(--white);
  box-shadow: var(--shadow-panel);
  z-index: var(--z-panel);
  display: flex;
  flex-direction: column;
  animation: slideInRight 300ms ease;
}

.panel.closing { animation: slideOutRight 200ms ease forwards; }

.panel-header {
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--gray-200);
}

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

.panel-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--gray-400);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
}
.panel-close:hover { background: var(--gray-100); color: var(--gray-700); }
.panel-close i { width: 18px; height: 18px; }

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

.panel-badges {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

/* Panel tab bar */
.panel-tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.panel-tabs::-webkit-scrollbar { display: none; }

.panel-tab {
  padding: var(--s-3) var(--s-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  font-family: var(--font-sans);
}
.panel-tab:hover { color: var(--gray-700); }
.panel-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.panel-tab i { width: 16px; height: 16px; }

/* Panel body (scrollable) */
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-6);
}

/* Panel action bar (sticky bottom) */
.panel-actions {
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* ========== DHL PROGRESS TRACKER ========== */

.dhl-tracker { padding: var(--s-4) var(--s-3); position: relative; }

.dhl-tracker.expanded {
  background: var(--white);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
  padding: var(--s-6) var(--s-8);
  border: 1px solid var(--gray-200);
}

.dhl-milestones {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding: 0 var(--s-1);
}

.dhl-milestone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Track line between milestones */
.dhl-milestone:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: var(--gray-200);
  z-index: 0;
}
.dhl-milestone.completed:not(:last-child)::after { background: var(--brand); }
.dhl-milestone.current:not(:last-child)::after {
  background: linear-gradient(90deg, var(--brand) 0%, var(--gray-200) 100%);
}

/* Milestone dot */
.dhl-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  transition: all var(--t-slower);
}

.dhl-milestone.completed .dhl-dot {
  background: var(--brand);
  border: 2px solid var(--brand);
  color: var(--white);
}
.dhl-milestone.completed .dhl-dot svg { animation: dhlFill 400ms ease both; }

.dhl-milestone.current .dhl-dot {
  background: var(--brand-wash);
  border: 2px solid var(--brand);
  color: var(--brand);
  animation: pulseGlow 2s ease-in-out infinite;
}

.dhl-dot-inner {
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  background: var(--brand);
  animation: pulse 2s ease-in-out infinite;
}

.dhl-milestone.future .dhl-dot {
  background: var(--gray-50);
  border: 2px solid var(--gray-300);
  color: var(--gray-300);
}

.dhl-milestone.declined .dhl-dot {
  background: rgba(239,68,68,0.08);
  border: 2px solid var(--error);
  color: var(--error);
}

/* Milestone label */
.dhl-label {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  margin-top: var(--s-2);
  line-height: 1.3;
  max-width: 80px;
  word-wrap: break-word;
}
.dhl-milestone.completed .dhl-label { color: var(--brand); }
.dhl-milestone.current .dhl-label   { color: var(--gray-800); font-weight: 600; }
.dhl-milestone.future .dhl-label    { color: var(--gray-400); }
.dhl-milestone.declined .dhl-label  { color: var(--error); font-weight: 600; }

/* Milestone timestamp */
.dhl-timestamp {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--gray-400);
  margin-top: var(--s-0-5);
}

/* Milestone tooltip */
.dhl-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  font-size: 12px;
  font-weight: 400;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
  z-index: 10;
}
.dhl-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--gray-900);
}
.dhl-milestone:hover .dhl-tooltip { opacity: 1; }


/* ========== PORTFOLIO CARD (Submitter) ========== */

.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-8) 0 var(--s-5);
}

.portfolio-header-left { display: flex; align-items: center; gap: var(--s-3); }

.portfolio-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-900);
}

.portfolio-count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-wash);
  border: 1px solid var(--brand-subtle);
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
}

.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-bottom: var(--s-10);
}

.portfolio-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
  display: grid;
  grid-template-columns: 4px 1fr;
  overflow: hidden;
  animation: cardReveal 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.portfolio-card:nth-child(1) { animation-delay: 0ms; }
.portfolio-card:nth-child(2) { animation-delay: 80ms; }
.portfolio-card:nth-child(3) { animation-delay: 160ms; }

.portfolio-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--gray-300);
}

.card-accent { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.card-content { padding: var(--s-5) var(--s-6); }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--s-3);
}

.card-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  margin-top: var(--s-1);
}

.card-stage-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-message {
  font-size: var(--text-sm);
  color: var(--gray-600);
  font-style: italic;
  margin-top: var(--s-3);
  line-height: 1.5;
  padding: var(--s-2) var(--s-3);
  background: var(--gray-50);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--gray-300);
}
.card-message.declined-msg {
  color: var(--error);
  background: rgba(239,68,68,0.04);
  border-left-color: var(--error);
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: var(--s-4);
  gap: var(--s-3);
}

.card-deal-preview { display: flex; gap: var(--s-4); flex: 1; }

.card-deal-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: var(--s-1);
}
.card-deal-chip i { width: 12px; height: 12px; }
.card-deal-chip .val { color: var(--gray-700); font-weight: 600; }

.view-details-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--s-1);
  transition: color var(--t-fast), gap var(--t-fast);
}
.view-details-link:hover { color: var(--brand-dark); gap: var(--s-2); }


/* ========== INTAKE FORM ========== */

.form-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  margin-bottom: var(--s-8);
}

.form-progress-step {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gray-400);
}
.form-progress-step.active { color: var(--brand); font-weight: 600; }
.form-progress-step.complete { color: var(--brand); }

.form-progress-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--r-full);
  border: 2px solid var(--gray-300);
  background: var(--white);
}
.form-progress-step.active .form-progress-dot { border-color: var(--brand); background: var(--brand); }
.form-progress-step.complete .form-progress-dot { border-color: var(--brand); background: var(--brand); }

.form-progress-track {
  width: 60px;
  height: 4px;
  background: var(--gray-200);
  border-radius: var(--r-full);
}
.form-progress-track.filled { background: var(--brand); }

/* Form fields */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--s-1-5);
}
.form-label .required { color: var(--error); }
.form-label .hint {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--gray-400);
  margin-left: var(--s-1);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  font: 400 var(--text-base) / 1.4 var(--font-sans);
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-input::placeholder { color: var(--gray-400); }
.form-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.form-input.error { border-color: var(--error); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }

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

.form-error-msg {
  font-size: var(--text-xs);
  color: var(--error);
  margin-top: var(--s-1);
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-error-msg i { width: 14px; height: 14px; }

/* Error banner */
.form-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--r-md);
  margin-bottom: 24px;
}
.form-error-banner > i { width: 20px; height: 20px; color: var(--error); flex-shrink: 0; margin-top: 1px; }
.form-error-banner-text h4 { font-size: var(--text-base); font-weight: 600; color: #991B1B; margin-bottom: 4px; }
.form-error-banner-text ul { font-size: var(--text-sm); color: #DC2626; list-style: disc; padding-left: 16px; line-height: 1.6; }

/* Radio group (On/Off Market) */
.form-radio-group {
  display: flex;
  gap: var(--s-2);
}

.form-radio-option {
  flex: 1;
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--t-fast);
}
.form-radio-option:hover { border-color: var(--gray-400); }
.form-radio-option.selected {
  border-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand);
}

/* Checkbox group (Creative Finance) */
.form-checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}

.form-checkbox-option {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--gray-700);
}

.form-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--t-fast);
}
.form-checkbox-option.checked .form-checkbox {
  background: var(--brand);
  border-color: var(--brand);
}
.form-checkbox-option.checked .form-checkbox::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg);
  margin-bottom: 2px;
}

/* Currency input */
.form-currency {
  position: relative;
}
.form-currency::before {
  content: '$';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-family: var(--font-mono);
  font-size: var(--text-base);
  pointer-events: none;
}
.form-currency .form-input {
  padding-left: 28px;
  font-family: var(--font-mono);
  text-align: right;
}

/* Fixed address label (Page 2 top) */
.form-address-fixed {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-6);
}
.form-address-fixed .label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gray-500);
}
.form-address-fixed .value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--gray-800);
  margin-top: 2px;
}


/* ========== TOAST NOTIFICATIONS ========== */

.toast-container {
  position: fixed;
  top: var(--s-6);
  right: var(--s-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.toast {
  max-width: 380px;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  animation: toastEnter 300ms ease;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast.success::before { background: var(--success); }
.toast.warning::before { background: var(--warning); }
.toast.error::before   { background: var(--error); }
.toast.info::before    { background: var(--info); }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.toast.success .toast-icon { color: var(--success); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.error   .toast-icon { color: var(--error); }
.toast.info    .toast-icon { color: var(--info); }

.toast-message {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--gray-700);
  line-height: 1.4;
}

.toast-close {
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  transition: color var(--t-fast);
  flex-shrink: 0;
}
.toast-close:hover { color: var(--gray-700); }

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  animation: toastProgress 5s linear forwards;
}
.toast.success .toast-progress { background: var(--success); }
.toast.warning .toast-progress { background: var(--warning); }
.toast.error   .toast-progress { background: var(--error); }
.toast.info    .toast-progress { background: var(--info); }


/* ========== NOTIFICATION DROPDOWN ========== */

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: -60px;
  width: 380px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: var(--z-panel);
  animation: dropdownReveal 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
}
.notif-dropdown-header h3 { font-size: var(--text-md); font-weight: 700; color: var(--gray-900); }

.mark-read-btn {
  font: 500 12px/1 var(--font-sans);
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.mark-read-btn:hover { background: var(--brand-wash); }

.notif-list { max-height: 360px; overflow-y: auto; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.notif-item:hover { background: var(--gray-50); }
.notif-item + .notif-item { border-top: 1px solid var(--gray-100); }
.notif-item.unread { background: rgba(72,122,123,0.03); }

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-icon i { width: 16px; height: 16px; }

/* Notification icon types — using token variables */
.notif-icon.submission { background: var(--notif-submission-bg); color: var(--notif-submission-color); }
.notif-icon.advance    { background: var(--notif-advance-bg);    color: var(--notif-advance-color); }
.notif-icon.task       { background: var(--notif-task-bg);       color: var(--notif-task-color); }
.notif-icon.escalation { background: var(--notif-escalation-bg); color: var(--notif-escalation-color); }
.notif-icon.approval   { background: var(--notif-approval-bg);   color: var(--notif-approval-color); }
.notif-icon.assignment { background: var(--notif-assignment-bg); color: var(--notif-assignment-color); }
.notif-icon.sendback   { background: var(--notif-sendback-bg);   color: var(--notif-sendback-color); }
.notif-icon.deadline   { background: var(--notif-deadline-bg);   color: var(--notif-deadline-color); }
.notif-icon.milestone  { background: var(--notif-milestone-bg);  color: var(--notif-milestone-color); }
.notif-icon.report     { background: var(--notif-report-bg);     color: var(--notif-report-color); }
.notif-icon.outcome-won     { background: var(--notif-won-bg);       color: var(--notif-won-color); }
.notif-icon.outcome-declined { background: var(--notif-declined-bg); color: var(--notif-declined-color); }
.notif-icon.reviewed   { background: var(--notif-reviewed-bg);   color: var(--notif-reviewed-color); }

.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: var(--text-sm); font-weight: 600; color: var(--gray-900); line-height: 1.3; }
.notif-desc { font-size: 12px; color: var(--gray-500); line-height: 1.4; margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--gray-400); font-family: var(--font-mono); display: block; margin-top: 4px; }

.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--brand);
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-dropdown-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  text-align: center;
}
.notif-dropdown-footer a { font-size: var(--text-sm); font-weight: 500; color: var(--brand); text-decoration: none; }
.notif-dropdown-footer a:hover { text-decoration: underline; }

.notif-empty-state { padding: 48px 24px; text-align: center; }
.notif-empty-state .empty-bell { width: 40px; height: 40px; color: var(--gray-300); margin: 0 auto 16px; display: block; }
.notif-empty-state h4 { font-size: var(--text-base); font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.notif-empty-state p { font-size: var(--text-sm); color: var(--gray-400); line-height: 1.5; max-width: 240px; margin: 0 auto; }


/* ========== PROFILE MENU ========== */

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: var(--z-panel);
  animation: dropdownReveal 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-user {
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.profile-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-user-info { min-width: 0; }
.profile-user-name { font-size: var(--text-base); font-weight: 600; color: var(--gray-900); }
.profile-user-email {
  font-size: 12px;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.profile-role-badge {
  display: inline-flex; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; margin-top: 4px;
}
.profile-role-badge.acq-lead { background: rgba(72,122,123,0.1); color: var(--brand); }
.profile-role-badge.assignee { background: #EEF2FF; color: #6366F1; }
.profile-role-badge.submitter { background: #F0FDF4; color: #16A34A; }

.profile-menu-items { padding: 6px 0; }

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font: 500 var(--text-sm)/1 var(--font-sans);
  color: var(--gray-700);
  cursor: pointer;
  transition: background var(--t-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.profile-menu-item:hover { background: var(--gray-50); }
.profile-menu-item i { width: 16px; height: 16px; color: var(--gray-400); }

.profile-divider { height: 1px; background: var(--gray-100); margin: 4px 0; }

.profile-menu-item.danger { color: var(--error); }
.profile-menu-item.danger i { color: var(--error); }


/* ========== SKELETON LOADING ========== */

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 37%, var(--gray-100) 63%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-sm);
}

.skeleton-text { height: 12px; border-radius: var(--r-sm); }
.skeleton-card { border-radius: var(--r-lg); }
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
}
.skeleton-circle { width: 32px; height: 32px; border-radius: var(--r-full); flex-shrink: 0; }
.skeleton-badge { width: 60px; height: 20px; border-radius: var(--r-full); }
.skeleton-line { height: 12px; border-radius: var(--r-sm); }

/* Width utilities for skeleton lines */
.skeleton-line.w-20 { width: 20%; }
.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-90 { width: 90%; }


/* ========== EMPTY STATES ========== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.empty-state-icon i { width: 28px; height: 28px; }
.empty-state-icon.gray  { background: var(--gray-100); color: var(--gray-400); }
.empty-state-icon.green { background: #F0FDF4; color: #22C55E; }
.empty-state-icon.brand { background: rgba(72,122,123,0.08); color: var(--brand); }

.empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: var(--text-base);
  color: var(--gray-500);
  max-width: 360px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.empty-state .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  background: var(--brand);
  color: var(--white);
  border: none;
  font: 600 var(--text-sm)/1 var(--font-sans);
  cursor: pointer;
  transition: background var(--t-fast);
}
.empty-state .btn-cta:hover { background: var(--brand-dark); }
.empty-state .btn-cta i { width: 16px; height: 16px; }


/* ========== MODALS / DIALOGS ========== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: var(--z-modal-backdrop);
  animation: fadeIn 200ms ease;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 480px;
  width: calc(100% - 48px);
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-modal);
  animation: slideUp 300ms ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-6) var(--s-6) var(--s-4);
}
.modal-header h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-900);
}

.modal-body {
  padding: 0 var(--s-6) var(--s-6);
  max-height: 60vh;
  overflow-y: auto;
}
.modal-body p {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: 1.6;
}

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


/* ========== LOGIN PAGE ========== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  padding: var(--s-6);
  position: relative;
  overflow: hidden;
}

/* Decorative background orbs */
.login-page::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72,122,123,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246,141,46,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--s-12);
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: slideUp 400ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 1;
  border: 1px solid var(--gray-200);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin-bottom: var(--s-8);
}

.login-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--brand);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 18px;
}

.login-logo-text {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.login-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--s-2);
}

.login-subtitle {
  font-size: var(--text-base);
  color: var(--gray-500);
  margin-bottom: var(--s-8);
  line-height: 1.5;
}

.login-input {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: 1.5px;
  padding: var(--s-4);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  margin-bottom: var(--s-5);
}
.login-input::placeholder { color: var(--gray-400); font-weight: 400; letter-spacing: 1px; }
.login-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }

.login-btn {
  width: 100%;
  padding: var(--s-3) var(--s-6);
  font-size: var(--text-md);
  margin-bottom: var(--s-5);
}

.login-hint {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
}


/* ========== SETTINGS ========== */

.settings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
}

.settings-sidebar {
  background: var(--gray-100);
  padding: var(--s-3);
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
}
.settings-tab:hover { background: var(--gray-200); }
.settings-tab.active { background: var(--white); color: var(--gray-800); font-weight: 600; box-shadow: var(--shadow-xs); }
.settings-tab i { width: 16px; height: 16px; }

.settings-content { padding: var(--s-8); background: var(--white); }

.settings-section { margin-bottom: 32px; }
.settings-section-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--gray-900);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-section-title i { width: 18px; height: 18px; color: var(--gray-400); }


/* ========== SUB-TASK CHECKLIST ========== */

.checklist { display: flex; flex-direction: column; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}
.checklist-item:hover { background: var(--gray-50); }

.checklist-checkbox {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--t-fast);
}
.checklist-item.complete .checklist-checkbox {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

.checklist-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-800);
  flex: 1;
}
.checklist-item.complete .checklist-name {
  color: var(--gray-400);
  text-decoration: line-through;
}

.checklist-assignee {
  font-size: var(--text-xs);
  color: var(--gray-500);
}


/* ========== REPORT SUMMARY CARD ========== */

.report-summary {
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.report-summary-item {
  padding: var(--s-5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.report-summary-item + .report-summary-item { border-top: 1px solid var(--gray-200); }

.report-summary-left {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}

.report-summary-icon {
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.report-summary-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--gray-800);
}

.report-summary-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: 2px;
}

.report-summary-score {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-900);
  flex-shrink: 0;
}

.report-summary-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--brand);
  cursor: pointer;
  text-decoration: none;
  margin-top: var(--s-2);
  display: inline-block;
}
.report-summary-link:hover { text-decoration: underline; }

/* Pending report placeholder */
.report-pending {
  border: 1px dashed var(--gray-300);
  border-radius: var(--r-md);
  padding: 24px 16px;
  text-align: center;
}
.report-pending i { width: 24px; height: 24px; color: var(--gray-300); margin-bottom: 8px; display: block; margin-inline: auto; }
.report-pending .title { font-size: var(--text-sm); font-weight: 600; color: var(--gray-500); }
.report-pending .status { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.report-pending.generating .status { animation: pulse 2s ease-in-out infinite; }


/* ========== ARCHIVE COMPONENTS ========== */

.archive-section {
  padding: var(--s-6) var(--s-8) var(--s-10);
  max-width: 1120px;
  margin: 0 auto;
}

.archive-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-5);
}
.archive-header-left { display: flex; align-items: center; gap: var(--s-3); }
.archive-title { font-size: var(--text-xl); font-weight: 700; color: var(--gray-900); }

.archive-count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
}

/* Segmented tabs */
.archive-tabs {
  display: flex;
  gap: var(--s-1);
  background: var(--gray-100);
  border-radius: var(--r-md);
  padding: 3px;
  width: fit-content;
  margin-bottom: var(--s-4);
}

.archive-tab {
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  font-family: var(--font-sans);
}
.archive-tab:hover { color: var(--gray-700); }
.archive-tab.active {
  background: var(--white);
  color: var(--gray-900);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.archive-tab .tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--gray-200);
  color: var(--gray-600);
  padding: 1px 6px;
  border-radius: var(--r-full);
  min-width: 20px;
  text-align: center;
}
.archive-tab.active .tab-count { background: var(--brand-wash); color: var(--brand); }

/* Archive table */
.archive-table-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  animation: cardReveal 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.archive-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.archive-table thead { background: var(--gray-50); }

.archive-table th {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  font-size: 12px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
  transition: color var(--t-fast);
}
.archive-table th:hover { color: var(--gray-800); }

.archive-table th .sort-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
  opacity: 0.4;
}
.archive-table th.sorted .sort-icon { opacity: 1; color: var(--brand); }

.archive-table td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}
.archive-table tbody tr { cursor: pointer; transition: background var(--t-fast); }
.archive-table tbody tr:hover { background: var(--brand-wash); }
.archive-table tbody tr:last-child td { border-bottom: none; }

.archive-outcome-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
}
.archive-outcome-badge i { width: 12px; height: 12px; }
.archive-outcome-badge.won { background: var(--stage-won-wash); color: var(--stage-won); }
.archive-outcome-badge.declined { background: var(--stage-declined-wash); color: var(--error); }

.btn-view-detail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font: 600 12px/1 var(--font-sans);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.btn-view-detail:hover {
  background: var(--brand-wash);
  border-color: var(--brand-light);
  color: var(--brand);
}
.btn-view-detail i { width: 13px; height: 13px; }


/* ========== RESEARCH VIEW ========== */

.section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: var(--s-4);
}


/* ========== ACCOUNT SETTINGS (from ui-states.html) ========== */

.settings-avatar-row { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }

.settings-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  position: relative;
}

.settings-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast);
}
.settings-avatar-edit:hover { border-color: var(--brand); }
.settings-avatar-edit i { width: 12px; height: 12px; color: var(--gray-500); }

.settings-avatar-info .sa-name { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.settings-avatar-info .sa-email { font-size: var(--text-sm); color: var(--gray-500); margin-top: 2px; }

.settings-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.settings-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.settings-field input,
.settings-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  font: 400 var(--text-base) / 1.4 var(--font-sans);
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.settings-field input:focus,
.settings-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}


/* ========== FORM SUCCESS STATE ========== */

.form-success { text-align: center; padding: 80px 24px; }

.form-success-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--r-full);
  background: #F0FDF4;
  color: #22C55E;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.form-success-icon i { width: 36px; height: 36px; }

.form-success h2 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.form-success p { font-size: var(--text-base); color: var(--gray-500); line-height: 1.6; max-width: 400px; margin: 0 auto 32px; }
.form-success-actions { display: flex; gap: 12px; justify-content: center; }


/* ========== DETAIL VIEW (Submitter property detail) ========== */

.detail-header { padding: var(--s-6) 0; animation: cardReveal 300ms ease both; }

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--t-fast);
  margin-bottom: var(--s-4);
  border: none;
  background: none;
  font-family: var(--font-sans);
  padding: var(--s-1-5) var(--s-2);
  border-radius: var(--r-sm);
}
.detail-back:hover { color: var(--gray-800); background: var(--gray-100); }
.detail-back i { width: 16px; height: 16px; }

.detail-title { font-size: var(--text-xl); font-weight: 700; color: var(--gray-900); }

.detail-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  margin-top: var(--s-1);
}

.detail-milestone-msg {
  font-size: var(--text-md);
  color: var(--gray-600);
  font-style: italic;
  padding: var(--s-4) var(--s-6);
  background: var(--brand-wash);
  border-radius: var(--r-lg);
  border-left: 3px solid var(--brand);
  margin: var(--s-5) 0;
}
.detail-milestone-msg.declined {
  background: rgba(239,68,68,0.05);
  border-left-color: var(--error);
  color: var(--error);
}

.detail-section { margin-top: var(--s-8); }

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-4);
}

.detail-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.detail-section-title i { width: 18px; height: 18px; color: var(--gray-500); }


/* ========== DEAL INFORMATION CARD ========== */

.deal-info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.deal-info-hint {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 400;
  padding: var(--s-3) var(--s-5);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.deal-info-hint i { width: 14px; height: 14px; color: var(--brand-light); flex-shrink: 0; }

.deal-info-body { padding: var(--s-5); }

.deal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.deal-field-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.deal-field-value {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--gray-800);
}
.deal-field-value.mono { font-family: var(--font-mono); }
.deal-field-value.empty { color: var(--gray-400); font-style: italic; }


/* ========== TOGGLE SWITCH ========== */

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--gray-300);
  cursor: pointer;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.toggle.active { background: var(--brand); }

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: var(--r-full);
  background: var(--white);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast);
}
.toggle.active::after { transform: translateX(18px); }


/* ========== MY TASKS VIEW ========== */

.my-tasks-view { padding: var(--s-6) var(--s-8) var(--s-10); max-width: 960px; margin: 0 auto; }

/* Tasks Header */
.tasks-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-5);
}
.tasks-header-left { display: flex; align-items: baseline; gap: var(--s-3); }
.tasks-title { font-size: 22px; font-weight: 700; color: var(--gray-900); line-height: 1.3; }
.tasks-count { font-size: 13px; font-weight: 500; color: var(--gray-500); }
.tasks-count span { font-family: var(--font-mono); font-weight: 600; color: var(--gray-700); }

/* Tasks Summary Strip */
.tasks-summary {
  display: flex; gap: var(--s-4); padding: var(--s-4) var(--s-5);
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
  margin-bottom: var(--s-5);
}
.tasks-summary-item {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-3); border-radius: var(--r-md);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--t-fast);
}
.tasks-summary-item:hover { background: var(--gray-50); }
.tasks-summary-item .ts-dot { width: 8px; height: 8px; border-radius: var(--r-full); flex-shrink: 0; }
.tasks-summary-item .ts-count { font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--gray-800); }
.tasks-summary-item .ts-label { color: var(--gray-500); }
.tasks-summary-sep { width: 1px; background: var(--gray-200); align-self: stretch; }

/* Tasks Filter Bar */
.tasks-filter {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-5); flex-wrap: wrap;
}
.tasks-filter-label {
  font-size: 12px; font-weight: 600; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.04em; margin-right: var(--s-1);
}
.tasks-filter-pill {
  display: flex; align-items: center; gap: var(--s-1-5);
  padding: var(--s-1-5) var(--s-3); border-radius: var(--r-full);
  font-size: 12px; font-weight: 500; color: var(--gray-600);
  border: 1px solid var(--gray-300); cursor: pointer;
  transition: all var(--t-fast); background: var(--white);
}
.tasks-filter-pill:hover { border-color: var(--gray-400); background: var(--gray-50); }
.tasks-filter-pill.active { background: var(--brand-wash); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.tasks-filter-pill .tf-dot { width: 6px; height: 6px; border-radius: var(--r-full); }
.tasks-filter-pill .tf-dot.assigned { background: var(--sub-assigned); }
.tasks-filter-pill .tf-dot.in-progress { background: var(--sub-progress); }
.tasks-filter-pill .tf-dot.pending-review { background: var(--sub-review); }
.tasks-filter-pill .tf-dot.on-hold { background: var(--sub-hold); }

/* Task Cards */
.tasks-list { display: flex; flex-direction: column; gap: var(--s-3); }

.task-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
  cursor: pointer; transition: all var(--t-base);
  display: grid; grid-template-columns: 4px 1fr auto;
  gap: 0; position: relative; overflow: hidden;
}
.task-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--gray-300); }

.task-card-accent { border-radius: var(--r-lg) 0 0 var(--r-lg); }

.task-card-body {
  padding: var(--s-5) var(--s-5) var(--s-5) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-2); min-width: 0;
}

.task-card-address { font-size: 15px; font-weight: 600; color: var(--gray-800); line-height: 1.35; }
.task-card-city { font-size: 12px; color: var(--gray-500); margin-top: -1px; }

.task-card-task-name {
  display: inline-flex; align-items: center; gap: var(--s-1-5);
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  background: var(--gray-50); padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm); margin-top: var(--s-1);
  border: 1px solid var(--gray-100); align-self: flex-start;
}
.task-card-task-name i { width: 12px; height: 12px; color: var(--gray-400); }

.task-card-meta {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-1);
}

.task-badge-stage {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: var(--r-sm); font-size: 11px; font-weight: 600; white-space: nowrap;
}
.task-badge-sub {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 2px var(--s-2); border-radius: var(--r-sm);
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
.task-badge-sub .dot { width: 6px; height: 6px; border-radius: var(--r-full); flex-shrink: 0; }
.task-badge-sub.assigned { background: rgba(148,163,184,0.10); color: #64748B; }
.task-badge-sub.assigned .dot { background: var(--sub-assigned); }
.task-badge-sub.in-progress { background: rgba(59,130,246,0.10); color: #2563EB; }
.task-badge-sub.in-progress .dot { background: var(--sub-progress); }
.task-badge-sub.pending-review { background: rgba(139,92,246,0.10); color: #7C3AED; }
.task-badge-sub.pending-review .dot { background: var(--sub-review); }
.task-badge-sub.on-hold { background: rgba(239,68,68,0.10); color: #DC2626; }
.task-badge-sub.on-hold .dot { background: var(--sub-hold); }

.task-days {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
}
.task-days i { width: 12px; height: 12px; }
.task-days.neutral { color: var(--gray-500); }
.task-days.warning { color: var(--warning); }
.task-days.urgent { color: var(--error); font-weight: 700; }

.task-scores { display: flex; align-items: center; gap: var(--s-2); }
.task-score { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.task-score .prefix { color: var(--gray-400); }
.task-score .val { color: var(--gray-800); }

/* Task Feedback (On Hold) */
.task-card-feedback {
  margin-top: var(--s-2); padding: var(--s-3) var(--s-4);
  background: rgba(239,68,68,0.03); border-left: 3px solid var(--sub-hold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.task-card-feedback .feedback-from {
  font-size: 11px; font-weight: 600; color: var(--sub-hold);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--s-1);
}
.task-card-feedback .feedback-text {
  font-size: 13px; font-style: italic; color: var(--gray-600); line-height: 1.5;
}

/* Task Card Actions */
.task-card-actions {
  display: flex; flex-direction: column; align-items: flex-end;
  justify-content: center; gap: var(--s-3);
  padding: var(--s-5) var(--s-5) var(--s-5) 0;
}

.btn-task {
  display: inline-flex; align-items: center; gap: var(--s-1-5);
  padding: var(--s-1-5) var(--s-4); border-radius: var(--r-full);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--t-fast); border: none; white-space: nowrap;
}
.btn-task i { width: 14px; height: 14px; }

.btn-task.start { background: rgba(59,130,246,0.10); color: #2563EB; }
.btn-task.start:hover { background: rgba(59,130,246,0.18); }
.btn-task.complete { background: rgba(16,185,129,0.10); color: #059669; }
.btn-task.complete:hover { background: rgba(16,185,129,0.18); }
.btn-task.rework { background: rgba(239,68,68,0.10); color: #DC2626; }
.btn-task.rework:hover { background: rgba(239,68,68,0.18); }
.btn-task.awaiting {
  background: rgba(139,92,246,0.08); color: #7C3AED;
  opacity: 0.6; cursor: not-allowed;
}

/* Empty tasks state */
.tasks-empty { text-align: center; padding: var(--s-16, 64px) var(--s-8); color: var(--gray-400); }
.tasks-empty i { width: 48px; height: 48px; margin-bottom: var(--s-4); opacity: 0.4; }
.tasks-empty-title { font-size: 16px; font-weight: 600; color: var(--gray-600); margin-bottom: var(--s-2); }
.tasks-empty-text { font-size: 14px; color: var(--gray-500); line-height: 1.5; }


/* ========== RESEARCH VIEW ========== */

.research-view { padding: var(--s-8); max-width: 1120px; margin: 0 auto; }

.slots-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5); margin-bottom: var(--s-10);
}

.slot-card {
  background: var(--white); border-radius: var(--r-lg);
  border: 1.5px solid var(--gray-200); padding: var(--s-6);
  transition: all var(--t-base); position: relative;
  min-height: 200px; display: flex; flex-direction: column;
}
.slot-card:hover { box-shadow: var(--shadow-md); }

.slot-active { border-color: var(--brand); border-left-width: 3px; }
.slot-generating { border-color: var(--accent); border-left-width: 3px; animation: slotPulse 2.5s ease-in-out infinite; }
.slot-completed { border-color: var(--success); border-left-width: 3px; }
.slot-error { border-color: var(--error); border-left-width: 3px; }

.slot-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-4);
}

.slot-label {
  font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500);
}

.slot-status {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; display: flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-full);
}
.slot-active .slot-status { color: var(--brand); background: var(--brand-wash); }
.slot-generating .slot-status { color: var(--accent); background: var(--accent-wash); }
.slot-completed .slot-status { color: var(--success); background: rgba(16,185,129,0.08); }
.slot-error .slot-status { color: var(--error); background: rgba(239,68,68,0.08); }

.slot-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.slot-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md); font: 400 14px/1.4 var(--font-sans);
  color: var(--gray-800); background: var(--white);
  margin-bottom: var(--s-4); transition: border-color var(--t-fast);
  box-sizing: border-box;
}
.slot-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.slot-input::placeholder { color: var(--gray-400); }

.btn-run {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px; background: var(--brand); color: white;
  border: none; border-radius: var(--r-md); font: 600 13px/1 var(--font-sans);
  cursor: pointer; transition: all var(--t-fast); box-shadow: var(--shadow-brand);
  width: 100%;
}
.btn-run:hover { background: var(--brand-dark); transform: translateY(-1px); }

.slot-address { font-size: 14px; font-weight: 500; color: var(--gray-800); margin-bottom: var(--s-3); }

.progress-meta {
  display: flex; justify-content: space-between; font-size: 12px;
  color: var(--gray-400); margin-top: 4px;
}
.progress-stage { font-weight: 500; color: var(--gray-600); }
.progress-pct { font-family: var(--font-mono); font-weight: 500; }
.elapsed { font-family: var(--font-mono); font-size: 11px; color: var(--gray-400); margin-top: 4px; }

.slot-result-scores { display: flex; gap: var(--s-4); margin-bottom: var(--s-4); }
.slot-score-item { display: flex; flex-direction: column; gap: 2px; }
.slot-score-label {
  font-size: 11px; font-weight: 500; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.slot-score-value { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--gray-900); }

.slot-actions { display: flex; gap: var(--s-2); }
.btn-slot {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 14px; border-radius: var(--r-md);
  font: 600 13px/1 var(--font-sans); cursor: pointer; transition: all var(--t-fast);
}
.btn-slot i { width: 14px; height: 14px; }
.btn-slot-primary {
  background: var(--white); color: var(--brand); border: 1.5px solid var(--brand);
}
.btn-slot-primary:hover { background: var(--brand-wash); }
.btn-slot-secondary {
  background: var(--brand); color: var(--white); border: 1.5px solid var(--brand);
}
.btn-slot-secondary:hover { background: var(--brand-dark); }

.slot-error-msg {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 13px; color: var(--error); margin-bottom: var(--s-4);
  padding: var(--s-3); background: rgba(239,68,68,0.06);
  border-radius: var(--r-md);
}

@keyframes slotPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-wash); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* Research History */
.research-history { margin-top: var(--s-4); }
.research-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-4);
}
.research-title { font-size: 16px; font-weight: 700; color: var(--gray-900); letter-spacing: -0.01em; }
.research-count { font-size: 13px; color: var(--gray-400); font-family: var(--font-mono); }
.research-filters { display: flex; gap: var(--s-2); align-items: center; flex-shrink: 0; }

/* Temperature Badge */
.temp-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 3px 8px;
  border-radius: var(--r-full);
}
.temp-badge i { width: 12px; height: 12px; }
.temp-badge.temp-hot { color: var(--temp-hot); background: var(--temp-hot-wash); }
.temp-badge.temp-warm { color: var(--temp-warm); background: var(--temp-warm-wash); }
.temp-badge.temp-cool { color: var(--temp-cool); background: var(--temp-cool-wash); }
.temp-badge.temp-cold { color: var(--temp-cold); background: var(--temp-cold-wash); }

/* Table action buttons (shared) */
.td-actions { text-align: right; white-space: nowrap; }

.btn-view-report {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: var(--r-md);
  border: 1px solid var(--gray-200); background: var(--white);
  color: var(--gray-600); font: 600 12px/1 var(--font-sans);
  cursor: pointer; transition: all var(--t-fast); white-space: nowrap;
}
.btn-view-report i { width: 14px; height: 14px; }
.btn-view-report:hover { background: var(--brand-wash); border-color: var(--brand-light); color: var(--brand); }

.btn-add-pipeline {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: var(--r-md);
  border: 1px solid var(--gray-200); background: var(--white);
  color: var(--gray-600); font: 600 12px/1 var(--font-sans);
  cursor: pointer; transition: all var(--t-fast); white-space: nowrap;
}
.btn-add-pipeline i { width: 14px; height: 14px; }
.btn-add-pipeline:hover { background: var(--brand-wash); border-color: var(--brand-light); color: var(--brand); }

.btn-reactivate {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: var(--r-md);
  border: 1px solid var(--warning); background: var(--white);
  color: #B45309; font: 600 12px/1 var(--font-sans);
  cursor: pointer; transition: all var(--t-fast); white-space: nowrap;
}
.btn-reactivate i { width: 14px; height: 14px; }
.btn-reactivate:hover { background: var(--warning-wash); }

.status-added {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; color: var(--success);
}
.status-added i { width: 14px; height: 14px; }

.stage-badge {
  display: inline-flex; align-items: center; padding: 3px 8px;
  border-radius: var(--r-sm); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em;
}

.decline-reason {
  font-size: 13px; color: var(--gray-500); font-style: italic;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.acq-price { font-family: var(--font-mono); font-weight: 600; color: var(--gray-800); }
.pipeline-duration { font-family: var(--font-mono); font-size: 12px; color: var(--gray-500); }

/* ========== ARCHIVE VIEW ========== */

.archive-view { padding: var(--s-6) var(--s-8); max-width: 1120px; margin: 0 auto; }

.archive-header { margin-bottom: var(--s-5); }

.archive-content { }

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

@media (max-width: 1023px) {
  .panel { width: 100%; min-width: 0; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-sidebar {
    display: flex;
    overflow-x: auto;
    padding: var(--s-2);
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .settings-sidebar::-webkit-scrollbar { display: none; }
  .settings-tab { white-space: nowrap; }
}

@media (max-width: 767px) {
  .app-header { padding: 0 var(--s-4); }
  .pipeline-bar { padding: var(--s-2) var(--s-4); }
  .pipeline-tab { padding: 4px var(--s-2); font-size: 11px; }
  .pipeline-tab .tab-count { font-size: 10px; padding: 1px 5px; min-width: 18px; }
  .filter-bar { padding: var(--s-2) var(--s-4); flex-wrap: wrap; }
  .pipeline-content { padding: var(--s-4); }
  .container { padding: 0 var(--s-4); }

  .nav-items { display: none; }

  .dhl-milestones { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .dhl-milestone { flex-direction: row; gap: var(--s-3); }
  .dhl-milestone:not(:last-child)::after {
    top: auto;
    left: 14px;
    width: 3px;
    height: 100%;
  }
  .dhl-label { text-align: left; margin-top: 0; max-width: none; }

  .form-checkbox-group { grid-template-columns: 1fr; }
  .settings-field-row { grid-template-columns: 1fr; }
  .deal-grid { grid-template-columns: 1fr; }

  .my-tasks-view { padding: var(--s-4); }
  .tasks-summary { flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3); }
  .task-card { grid-template-columns: 4px 1fr; }
  .task-card-actions { flex-direction: row; padding: 0 var(--s-4) var(--s-4); justify-content: flex-start; }

  .notif-dropdown { width: calc(100vw - 32px); right: -16px; }
  .modal { width: calc(100% - 32px); }

  .research-view { padding: var(--s-4); }
  .slots-grid { grid-template-columns: 1fr; }
  .archive-view { padding: var(--s-4); }
  .archive-tabs { flex-wrap: wrap; }

  /* Kanban: stack columns vertically on mobile */
  .kanban-board {
    flex-direction: column;
    overflow-x: visible;
    gap: var(--s-3);
    min-height: auto;
  }
  .kanban-column {
    min-width: 100%;
    max-width: 100%;
  }
  .kanban-column.auto-stage {
    min-width: 100%;
    max-width: 100%;
    opacity: 0.65;
  }
  .col-cards { max-height: none; }

  /* View toggle: slightly larger touch targets */
  .view-btn { padding: var(--s-2); }
}
