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


/* ========== LUCIDE ICON FLASH FIX ========== */
/* Hide raw <i data-lucide> elements until lucide.createIcons() replaces them with <svg>.
   Prevents duplicate icon flash when Preact re-renders (creates <i>) alongside
   existing <svg> from a previous Lucide pass. */
i[data-lucide] { visibility: hidden; width: 0; height: 0; overflow: hidden; }

/* ========== 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: 103px;
  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); }

/* --- Bulk Selection --- */

.bulk-check-col {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
  cursor: pointer;
}

.bulk-check-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

.pipeline-table tbody tr.bulk-selected {
  background: rgba(72, 122, 123, 0.08);
}

.kanban-card.bulk-selected {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  background: rgba(72, 122, 123, 0.06);
}

/* --- Bulk Action Bar --- */

.bulk-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-6);
  background: var(--gray-900);
  color: white;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  gap: var(--s-4);
}

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

.bulk-count {
  font-weight: 600;
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}

.bulk-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  cursor: pointer;
}

.bulk-clear:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
}

.bulk-bar-right {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: white;
  transition: all 0.15s;
}

.bulk-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.bulk-btn.primary {
  background: var(--brand);
  border-color: var(--brand);
}

.bulk-btn.primary:hover:not(:disabled) {
  background: var(--brand-dark, #3a6566);
}

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

.bulk-select {
  padding: 5px 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 13px;
  min-width: 160px;
}

.bulk-select option {
  background: var(--gray-900);
  color: white;
}

/* Context label (stage summary) */
.bulk-context {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  white-space: nowrap;
}

/* Advance dropdown wrapper */
.bulk-advance-wrap {
  position: relative;
}

/* Upward-opening dropdown menu */
.bulk-advance-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--gray-800);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-md);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
  padding: 4px;
  z-index: 10;
}

/* Dropdown item */
.bulk-advance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: white;
  cursor: pointer;
  transition: background 0.1s;
}
.bulk-advance-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Eligibility hint in dropdown */
.bulk-eligible-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 12px;
  white-space: nowrap;
}

/* Danger/destructive button variant */
.bulk-btn.danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: rgba(239, 68, 68, 0.9);
}
.bulk-btn.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

/* Badge count on bulk buttons */
.bulk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}

/* 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);
}
.source-tag.src-csv {
  background: rgba(139,92,246,0.06); color: #7C3AED;
  border: 1px solid rgba(139,92,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: 0;
  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 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--gray-100);
}
.notif-header-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.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);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mark-read-btn:hover { background: var(--brand-wash); }

.notif-list {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-200) transparent;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
}
.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); }

/* Left accent bar for unread items */
.notif-unread-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
}

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

/* 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); }
/* Task-specific notification types (per mockup H1) */
.notif-icon.assigned   { background: var(--notif-assignment-bg); color: var(--notif-assignment-color); }
.notif-icon.submitted  { background: var(--sub-review-wash);     color: var(--sub-review); }
.notif-icon.approved   { background: var(--sub-approved-wash);   color: var(--sub-approved); }
.notif-icon.changes    { background: var(--sub-hold-wash);       color: var(--sub-hold); }
.notif-icon.ready      { background: var(--notif-approval-bg);   color: var(--notif-approval-color); }
.notif-icon.comment    { background: var(--notif-task-bg);       color: var(--notif-task-color); }

.notif-content { flex: 1; min-width: 0; }

.notif-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: 11px;
  color: var(--gray-400);
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}
.notif-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-dropdown-footer {
  padding: 10px 16px;
  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; }

/* Empty state — compact */
.notif-empty-state {
  padding: 32px 20px;
  text-align: center;
}
.notif-empty-state .empty-icon {
  width: 32px;
  height: 32px;
  color: var(--brand);
  opacity: 0.5;
  margin: 0 auto 12px;
  display: block;
}
.notif-empty-state h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
}
.notif-empty-state p {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.4;
}

/* Loading skeleton */
.notif-skeleton-list { padding: 4px 0; }
.notif-skeleton-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
}
.notif-skeleton-item + .notif-skeleton-item { border-top: 1px solid var(--gray-100); }

.notif-skel {
  background: var(--gray-100);
  border-radius: var(--r-sm);
  animation: notifShimmer 1.2s ease-in-out infinite;
}
.notif-skel-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}
.notif-skel-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.notif-skel-title { height: 12px; width: 55%; }
.notif-skel-desc  { height: 10px; width: 85%; }
.notif-skel-time  { height: 8px; width: 30%; }

@keyframes notifShimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* ========== 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: fadeIn 200ms 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);
}


/* ========== CSV IMPORT MODAL ========== */

.csv-modal {
  max-width: 720px;
  width: calc(100% - 48px);
}

/* Stepper */
.csv-stepper {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-6) var(--s-4);
}

.csv-step {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-400);
  transition: color var(--t-fast);
}

.csv-step .step-num {
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: all var(--t-fast);
}

.csv-step.active { color: var(--brand); }
.csv-step.active .step-num { border-color: var(--brand); background: var(--brand); color: var(--white); }
.csv-step.done { color: var(--success); }
.csv-step.done .step-num { border-color: var(--success); background: var(--success); color: var(--white); }

.csv-step-sep {
  width: 24px;
  height: 1px;
  background: var(--gray-300);
  flex-shrink: 0;
}

/* Drop zone */
.csv-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--r-lg);
  padding: var(--s-10) var(--s-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
  background: var(--gray-50);
}
.csv-dropzone:hover { border-color: var(--brand-light); background: var(--brand-wash); }
.csv-dropzone.dragover { border-color: var(--brand); background: var(--brand-wash); box-shadow: 0 0 0 3px var(--brand-glow); }

.csv-dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  background: var(--brand-wash);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s-3);
  color: var(--brand);
}
.csv-dropzone-icon i { width: 24px; height: 24px; }

.csv-dropzone h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: var(--s-1);
}
.csv-dropzone p {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-bottom: var(--s-3);
}
.csv-dropzone .browse-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.csv-template-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-size: var(--text-xs);
  color: var(--gray-500);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
  transition: color var(--t-fast);
  margin-top: var(--s-2);
}
.csv-template-link:hover { color: var(--brand); }
.csv-template-link i { width: 14px; height: 14px; }

/* Column format guide */
.csv-column-guide {
  margin-top: var(--s-3);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  font-size: var(--text-xs);
  background: var(--white);
  overflow: hidden;
}

.csv-column-guide summary {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 10px 14px;
  cursor: pointer;
  color: var(--gray-600);
  font-weight: 600;
  font-size: var(--text-sm);
  user-select: none;
  list-style: none;
  transition: background var(--t-fast);
}

.csv-column-guide summary:hover { background: var(--gray-50); }
.csv-column-guide summary::-webkit-details-marker { display: none; }

.csv-guide-chevron {
  transition: transform var(--t-base);
  color: var(--gray-400);
}

.csv-column-guide[open] .csv-guide-chevron {
  transform: rotate(180deg);
}

.csv-column-guide[open] summary {
  border-bottom: 1px solid var(--gray-100);
}

.csv-guide-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--gray-50);
}

.csv-guide-field {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-md);
  padding: 10px 12px;
}

.csv-guide-field-header {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-2);
}

.csv-guide-col {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-wash);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  letter-spacing: -0.01em;
}

.csv-guide-field-type {
  font-size: var(--text-2xs);
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.csv-guide-field-type code {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--gray-100);
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray-600);
}

.csv-guide-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.csv-guide-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 2px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.csv-guide-example {
  margin-top: var(--s-2);
  font-size: 11px;
  color: var(--gray-400);
}

.csv-guide-example code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--gray-100);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--gray-600);
}

/* Validation summary banner (Preview step) */
.csv-validation-banner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 12px 16px;
  border-radius: var(--r-md);
  margin-bottom: var(--s-3);
}

.csv-validation-banner.success {
  background: var(--success-wash);
  border: 1px solid rgba(16,185,129,0.20);
}

.csv-validation-banner.warning {
  background: var(--warning-wash);
  border: 1px solid rgba(245,158,11,0.20);
}

.csv-validation-banner.error {
  background: var(--error-wash);
  border: 1px solid rgba(239,68,68,0.20);
}

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

.csv-validation-banner.success .csv-validation-icon {
  background: rgba(16,185,129,0.12);
  color: var(--success);
}

.csv-validation-banner.warning .csv-validation-icon {
  background: rgba(245,158,11,0.12);
  color: var(--warning);
}

.csv-validation-banner.error .csv-validation-icon {
  background: rgba(239,68,68,0.12);
  color: var(--error);
}

.csv-validation-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.csv-validation-text strong {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-800);
}

.csv-validation-text span {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* Preview table */
.csv-preview-wrap {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
}

.csv-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.csv-preview-table thead {
  background: var(--gray-50);
  position: sticky;
  top: 0;
  z-index: 1;
}
.csv-preview-table th {
  text-align: left;
  padding: var(--s-2) var(--s-3);
  font-weight: 600;
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.csv-preview-table td {
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  white-space: nowrap;
}
.csv-preview-table tbody tr:last-child td { border-bottom: none; }

.csv-preview-table .row-dup { background: var(--warning-wash); }
.csv-preview-table .row-error { background: var(--error-wash); }
.csv-preview-table .row-dup td:first-child,
.csv-preview-table .row-error td:first-child {
  position: relative;
  padding-left: var(--s-5);
}
.csv-preview-table .row-dup td:first-child::before,
.csv-preview-table .row-error td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}
.csv-preview-table .row-dup td:first-child::before { background: var(--warning); }
.csv-preview-table .row-error td:first-child::before { background: var(--error); }

.csv-row-tag {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: var(--r-sm);
  font-size: var(--text-2xs);
  font-weight: 600;
  margin-left: var(--s-2);
}
.csv-row-tag.dup  { background: var(--warning-wash); color: var(--warning); }
.csv-row-tag.err  { background: var(--error-wash); color: var(--error); }
.csv-row-tag.new  { background: var(--success-wash); color: var(--success); }

/* Stats bar */
.csv-stats {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  font-size: var(--text-sm);
}
.csv-stat {
  display: flex;
  align-items: center;
  gap: var(--s-1-5);
  font-weight: 500;
  color: var(--gray-600);
}
.csv-stat .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}
.csv-stat .dot.new   { background: var(--success); }
.csv-stat .dot.dup   { background: var(--warning); }
.csv-stat .dot.error { background: var(--error); }
.csv-stat .count {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gray-800);
}

/* Queue step — idle property list */
.csv-queue-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  max-height: 280px;
  overflow-y: auto;
}

.csv-queue-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--gray-200);
  transition: all var(--t-fast);
}
.csv-queue-item:hover { border-color: var(--gray-300); }

.csv-queue-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}

.csv-queue-item .addr {
  font-weight: 500;
  color: var(--gray-800);
  font-size: var(--text-sm);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.csv-queue-item .city-state {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.csv-select-all {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding-bottom: var(--s-2);
  margin-bottom: var(--s-1);
  border-bottom: 1px solid var(--gray-200);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
}
.csv-select-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* Result feedback */
.csv-result {
  text-align: center;
  padding: var(--s-6) 0;
}
.csv-result-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s-4);
}
.csv-result-icon.success { background: var(--success-wash); color: var(--success); }
.csv-result-icon.error   { background: var(--error-wash); color: var(--error); }
.csv-result-icon i { width: 28px; height: 28px; }
.csv-result h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--s-2);
}
.csv-result p {
  font-size: var(--text-sm);
  color: var(--gray-500);
  line-height: 1.6;
}


/* ========== 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); min-width: 0; overflow: hidden; }
/* Fix for Acquisitions Dashboard settings page (uses .set-content not .settings-content) */
.set-content { min-width: 0; overflow-x: auto; }

.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); }

/* CSS Spinner (avoids Lucide/Preact DOM mutation conflict) */
.css-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: cssSpin 0.8s linear infinite;
}
@keyframes cssSpin { to { transform: rotate(360deg); } }

/* 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 { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 80px 24px; color: var(--gray-400); }
.tasks-empty .css-spinner { width: 48px; height: 48px; margin-bottom: var(--s-4); opacity: 0.4; }
.tasks-empty-title { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.tasks-empty-text { font-size: 14px; color: var(--gray-500); max-width: 360px; line-height: 1.6; }
.tasks-empty .empty-state-icon {
  width: 64px; height: 64px; border-radius: var(--r-full);
  background: var(--gray-100); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.tasks-empty .empty-state-icon i { width: 28px; height: 28px; }
.tasks-empty .empty-state-icon.gray { color: var(--gray-400); }

/* ========== TASKS V2 — TABLE VIEWS ========== */

/* ── Section header (Properties I Manage / My Assigned Tasks) ── */
.tasks-section-header {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-5) 0 var(--s-2);
}
.tsh-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gray-500);
}
.tsh-count {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--gray-400); background: var(--gray-100);
  padding: 2px 8px; border-radius: var(--r-full);
}

/* ── Section divider (between admin & assignee sections) ── */
.tasks-section-divider {
  margin: var(--s-6) var(--s-8) var(--s-2);
  border: none; height: 2px;
  background: var(--gray-200); border-radius: 1px;
}

/* ── Self-approval notice (admin + assignee combined view) ── */
.tasks-self-approval-notice {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  margin: 0 var(--s-8) var(--s-2);
  background: var(--warning-wash, rgba(245,158,11,0.08));
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: var(--r-md);
  font-size: 12px; color: var(--gray-600); line-height: 1.4;
}
.tasks-self-approval-notice i {
  width: 14px; height: 14px;
  color: var(--warning, #F59E0B);
  flex-shrink: 0;
}
.tasks-self-approval-notice strong {
  color: var(--gray-800); font-weight: 600;
}

/* ── Summary strip ── */
.tv2-summary {
  display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-3) 0; margin-bottom: var(--s-2);
}
.tv2-summary-dot {
  display: flex; align-items: center; gap: var(--s-1-5);
  font-size: 13px; font-weight: 500; color: var(--gray-600);
  cursor: pointer; transition: opacity var(--t-fast);
}
.tv2-summary-dot:hover { opacity: 0.7; }
.tv2-summary-dot .dot {
  width: 8px; height: 8px; border-radius: var(--r-full); flex-shrink: 0;
}
.tv2-summary-dot .num {
  font-family: var(--font-mono); font-weight: 700; font-size: 14px;
}
.tv2-summary-dot .lbl { color: var(--gray-500); }
.tv2-summary-total {
  margin-left: auto; font-size: 13px; color: var(--gray-500); font-weight: 500;
}

/* ── Filter pills ── */
.tv2-filter-bar {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-4); flex-wrap: wrap;
}
.tv2-filter-pill {
  display: flex; align-items: center; gap: var(--s-1-5);
  padding: var(--s-1) 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); white-space: nowrap;
}
.tv2-filter-pill:hover { border-color: var(--gray-400); background: var(--gray-50); }
.tv2-filter-pill.active {
  border-color: var(--brand); background: var(--brand-wash);
  color: var(--brand); font-weight: 600;
}
.tv2-filter-pill .cnt {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  background: var(--gray-200); color: var(--gray-600);
  border-radius: var(--r-full); min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.tv2-filter-pill.active .cnt { background: var(--brand); color: var(--white); }

/* ── Table wrapper ── */
.tv2-table-wrap {
  width: 100%; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-xs);
}

/* ── Table head ── */
.tv2-table-head {
  gap: 0; padding: 0 var(--s-4);
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
.tv2-table-head .th {
  padding: var(--s-2) var(--s-3);
  font-size: 11px; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: var(--s-1);
}

/* ── Grid templates ── */
.tv2-admin-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) 120px 160px 110px 60px 60px;
  gap: 0;
}
.tv2-assignee-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.5fr) minmax(130px, 1fr) 120px 170px 100px 80px;
  gap: 0;
}

/* ── Table row ── */
.tv2-row {
  position: relative; cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--t-fast), box-shadow var(--t-fast);
  animation: tv2SlideUp 0.25s ease both;
  animation-delay: calc(var(--index, 0) * 0.03s);
}
.tv2-row:last-child { border-bottom: none; }
.tv2-row:hover { background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--gray-200); }

/* Stage accent bar (left edge) */
.tv2-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 0 2px 2px 0;
}
.tv2-row[data-stage="screening"]::before { background: var(--stage-3); }
.tv2-row[data-stage="uw_l1"]::before { background: var(--stage-4); }
.tv2-row[data-stage="negotiation"]::before { background: var(--stage-5); }
.tv2-row[data-stage="contract"]::before { background: var(--stage-6); }
.tv2-row[data-stage="under_contract"]::before { background: var(--stage-7); }
.tv2-row[data-stage="closing"]::before { background: var(--stage-8); }

.tv2-row-main {
  padding: 0 var(--s-4); align-items: center;
}
.tv2-row-main .td { padding: var(--s-3) var(--s-3); }
.tv2-row-main .td-center { text-align: center; display: flex; align-items: center; justify-content: center; }

/* ── Property cell (admin view) ── */
.tv2-row .td-property .address { font-size: 14px; font-weight: 600; color: var(--gray-800); line-height: 1.3; }
.tv2-row .td-property .city { font-size: 12px; color: var(--gray-500); font-weight: 400; margin-top: 1px; }

/* ── Task title cell (assignee view) ── */
.tv2-row .td-title .title-text { font-size: 14px; font-weight: 600; color: var(--gray-800); line-height: 1.3; }
.tv2-row .td-property-name { font-size: 13px; color: var(--gray-600); font-weight: 400; }

/* ── Stage badge ── */
.tv2-stage-badge {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: var(--r-full); letter-spacing: 0.01em;
}
.tv2-stage-badge[data-s="screening"] { color: var(--stage-3); background: var(--stage-3-badge); }
.tv2-stage-badge[data-s="uw_l1"] { color: var(--stage-4); background: var(--stage-4-badge); }
.tv2-stage-badge[data-s="negotiation"] { color: var(--stage-5); background: var(--stage-5-badge); }
.tv2-stage-badge[data-s="contract"] { color: var(--stage-6); background: var(--stage-6-badge); }
.tv2-stage-badge[data-s="under_contract"] { color: var(--stage-7); background: var(--stage-7-badge); }
.tv2-stage-badge[data-s="closing"] { color: var(--stage-8); background: var(--stage-8-badge); }

/* ── Status pill (inline-styled via JS, but base structure here) ── */
.tv2-status-pill {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: var(--r-full);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.tv2-status-pill[style*="cursor:pointer"]:hover,
.tv2-status-pill[style*="cursor: pointer"]:hover {
  filter: brightness(0.92);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.tv2-status-pill .pill-dot {
  width: 6px; height: 6px; border-radius: var(--r-full); flex-shrink: 0;
}

/* ── Status pill dropdown menu ── */
.tv2-pill-menu {
  position: absolute; top: 32px; left: 0; z-index: 50;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 4px; min-width: 170px;
  animation: tv2SlideUp 0.15s ease;
}
/* CSS arrow pointing up */
.tv2-pill-menu::before {
  content: ''; position: absolute; top: -5px; left: 16px;
  width: 8px; height: 8px; background: var(--white);
  border-left: 1px solid var(--gray-200); border-top: 1px solid var(--gray-200);
  transform: rotate(45deg);
}
.tv2-pill-option {
  display: flex; align-items: center; gap: var(--s-2);
  width: 100%; padding: 7px 12px; border: none; background: none;
  font-size: 12px; font-weight: 500; color: var(--gray-700);
  border-radius: var(--r-md); cursor: pointer; text-align: left;
  transition: background var(--t-fast);
}
.tv2-pill-option:hover { background: var(--gray-50); }
.tv2-pill-option .pill-dot {
  width: 6px; height: 6px; border-radius: var(--r-full); flex-shrink: 0;
}
.tv2-pill-option .tv2-pill-label { flex: 1; }
.tv2-pill-option .check-icon {
  width: 14px; height: 14px; margin-left: auto;
}
.tv2-pill-option.current {
  background: var(--brand-wash); font-weight: 600;
}
.tv2-pill-option.current:hover { background: var(--brand-wash); }
.tv2-pill-option.disabled {
  opacity: 0.4; cursor: not-allowed;
}
.tv2-pill-option.disabled:hover { background: transparent; }
.tv2-pill-divider {
  border-top: 1px solid var(--gray-100); margin: var(--s-1) 0;
}
.tv2-pill-hint {
  padding: var(--s-1-5) var(--s-3);
  font-size: 11px; color: var(--gray-400); font-style: italic;
}
/* Arrow handled by .tv2-pill-menu::before — the .tv2-pill-menu-arrow div is hidden */
.tv2-pill-menu-arrow { display: none; }

/* ── Progress bar (admin view) ── */
.tv2-progress { display: flex; align-items: center; gap: var(--s-2); }
.tv2-progress-track {
  width: 56px; height: 4px; background: var(--gray-200);
  border-radius: var(--r-full); overflow: hidden; flex-shrink: 0;
}
.tv2-progress-fill {
  height: 100%; border-radius: var(--r-full);
  background: var(--brand); transition: width 0.4s ease;
}
.tv2-progress-fill.complete { background: var(--sub-approved); }
.tv2-progress-text {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--gray-500); white-space: nowrap;
}
.tv2-progress-text.complete { color: var(--sub-approved); }

/* ── Lead avatar (admin view) ── */
.tv2-lead-avatar {
  width: 24px; height: 24px; border-radius: var(--r-full);
  background: var(--brand); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.tv2-no-lead { color: var(--gray-400); }

/* ── Days badge (admin view) ── */
.tv2-days {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}
.tv2-days.neutral { color: var(--gray-500); }
.tv2-days.warning { color: var(--warning); }
.tv2-days.urgent { color: var(--error); }

/* ── Due date (assignee view) ── */
.tv2-due { font-size: 13px; font-weight: 500; }
.tv2-due.overdue { color: var(--error); }
.tv2-due.soon { color: var(--warning); }
.tv2-due.normal { color: var(--gray-600); }
.tv2-due.none { color: var(--gray-400); }

/* ── Attachment count badge (assignee view) ── */
.tv2-attach-badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--gray-100);
  color: var(--gray-500); transition: all var(--t-fast);
}
.tv2-row:hover .tv2-attach-badge { background: var(--gray-200); color: var(--gray-600); }

/* ── Description row (admin — below main row) ── */
.tv2-row-desc {
  padding: 0 var(--s-4) var(--s-3);
  padding-left: calc(var(--s-4) + var(--s-3) + 3px);
}
.tv2-row-desc .desc-text {
  font-size: 12px; color: var(--gray-500); font-style: italic; line-height: 1.4;
}
.tv2-row-desc .desc-text .arrow {
  font-style: normal; margin-right: var(--s-1); color: var(--gray-400);
}

/* ── Feedback row (assignee — below Changes Requested tasks) ── */
.tv2-row-feedback {
  padding: 0 var(--s-4) var(--s-3);
  padding-left: calc(var(--s-4) + var(--s-3) + 3px);
}
.tv2-row-feedback .desc-text {
  font-size: 12px; color: var(--gray-500); font-style: italic; line-height: 1.4;
}
.tv2-row-feedback .desc-text .arrow {
  font-style: normal; margin-right: var(--s-1); color: var(--gray-400);
}
.tv2-row-feedback .feedback-quote { color: var(--gray-600); }
.tv2-row-feedback .feedback-author { color: var(--gray-400); font-style: normal; }

/* ── Group section headers (assignee view) ── */
.tv2-group-header {
  position: relative;
  padding: var(--s-2) var(--s-4);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; display: flex; align-items: center; gap: var(--s-2);
  border-bottom: 1px solid var(--gray-100);
}
.tv2-group-header::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 0 2px 2px 0;
}
.tv2-group-header i { width: 13px; height: 13px; }

.tv2-group-header[data-group="changes_requested"] {
  color: var(--sub-hold); background: var(--sub-hold-wash);
}
.tv2-group-header[data-group="changes_requested"]::before { background: var(--sub-hold); }

.tv2-group-header[data-group="to_do"] {
  color: var(--gray-600); background: var(--gray-50);
}
.tv2-group-header[data-group="to_do"]::before { background: var(--sub-assigned); }

.tv2-group-header[data-group="working"] {
  color: var(--sub-progress); background: var(--sub-progress-wash);
}
.tv2-group-header[data-group="working"]::before { background: var(--sub-progress); }

.tv2-group-header[data-group="done"] {
  color: var(--sub-review); background: var(--sub-review-wash);
}
.tv2-group-header[data-group="done"]::before { background: var(--sub-review); }

.tv2-group-count {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  background: rgba(0,0,0,0.06); border-radius: var(--r-full);
  min-width: 18px; height: 18px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Animations ── */
@keyframes tv2SlideUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* ========== 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); }

.slot-progress-track {
  width: 100%; height: 5px; background: var(--gray-200);
  border-radius: var(--r-full); overflow: hidden; display: block;
}
.slot-progress-fill {
  display: block; height: 100%; background: var(--brand);
  border-radius: var(--r-full); transition: width 500ms ease;
}

.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: 4px;
  padding: 5px 10px; border-radius: var(--r-md);
  border: 1px solid var(--brand); background: var(--white);
  color: var(--brand); font: 600 12px/1 var(--font-sans);
  cursor: pointer; transition: all var(--t-fast); white-space: nowrap;
}
.btn-add-pipeline i { width: 13px; height: 13px; }
.btn-add-pipeline:hover { background: var(--brand-wash); }

.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; }

  /* Tasks V2 mobile */
  .tv2-summary { flex-wrap: wrap; gap: var(--s-3); }
  .tv2-admin-grid {
    grid-template-columns: 1fr 100px 130px;
  }
  .tv2-admin-grid .td:nth-child(4),
  .tv2-admin-grid .td:nth-child(5),
  .tv2-admin-grid .td:nth-child(6) { display: none; }
  .tv2-admin-grid .th:nth-child(4),
  .tv2-admin-grid .th:nth-child(5),
  .tv2-admin-grid .th:nth-child(6) { display: none; }
  .tv2-assignee-grid {
    grid-template-columns: 1fr 120px 80px;
  }
  .tv2-assignee-grid .td:nth-child(2),
  .tv2-assignee-grid .td:nth-child(3),
  .tv2-assignee-grid .td:nth-child(6) { display: none; }
  .tv2-assignee-grid .th:nth-child(2),
  .tv2-assignee-grid .th:nth-child(3),
  .tv2-assignee-grid .th:nth-child(6) { display: none; }

  .notif-dropdown { width: calc(100vw - 32px); right: -8px; }
  .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); }
}

/* ========== VIOLATION BADGE ========== */

.violation-badge {
    display: inline-flex;
    align-items: center;
    color: var(--warning);
    margin-left: var(--s-1);
    cursor: help;
}
.violation-badge i {
    width: 13px;
    height: 13px;
}
