/* ==========================================================================
   ATS Discovery & Evaluation Dashboard - Modern Dark Glassmorphic Design System
   ========================================================================== */

:root {
  --bg-main: #0a0d14;
  --bg-surface: #111726;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 54, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --badge-green-bg: rgba(16, 185, 129, 0.15);
  --badge-green-text: #34d399;
  --badge-green-border: rgba(52, 211, 153, 0.3);

  --badge-amber-bg: rgba(245, 158, 11, 0.15);
  --badge-amber-text: #fbbf24;
  --badge-amber-border: rgba(251, 191, 36, 0.3);

  --badge-red-bg: rgba(239, 68, 68, 0.15);
  --badge-red-text: #f87171;
  --badge-red-border: rgba(248, 113, 113, 0.3);

  --badge-neutral-bg: rgba(148, 163, 184, 0.12);
  --badge-neutral-text: #cbd5e1;
  --badge-neutral-border: rgba(203, 213, 225, 0.25);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: -150px;
  left: 10%;
}
.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: -200px;
  right: 5%;
}
.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
  top: 40%;
  right: 35%;
  opacity: 0.18;
}

/* Glassmorphism Card Utility */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-lg);
}

/* App Layout Grid */
.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
  background: rgba(13, 17, 28, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  gap: 20px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 12px 6px;
  border-bottom: 1px solid var(--border-glass);
}
.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}
.brand-text {
  min-width: 0;
  flex: 1;
}
.brand-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status Widget */
.status-widget {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
}
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.status-label {
  color: var(--text-secondary);
}
.badge-count {
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
}
.count-green {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  border: 1px solid var(--badge-green-border);
}

/* Nav Menu */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
  width: 100%;
}
.nav-item-bottom {
  margin-top: auto;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateX(3px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.15));
  color: #60a5fa;
  font-weight: 600;
  border: 1px solid rgba(96, 165, 250, 0.3);
}
.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  margin-left: auto;
  box-shadow: 0 0 8px #34d399;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}
.desync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  margin-left: auto;
  flex-shrink: 0;
  display: inline-block;
  animation: pulse-amber 2s infinite ease-in-out;
}
@keyframes pulse-amber {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 8px 10px;
  margin-top: auto;
}
.candidate-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}
.candidate-mini:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass);
}
.candidate-mini.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}
.candidate-mini .avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  max-width: 38px;
  max-height: 38px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}
.candidate-mini:hover .avatar {
  box-shadow: 0 0 0 2px var(--accent-cyan), 0 0 10px rgba(6, 182, 212, 0.4);
}
.candidate-mini.active .avatar {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  box-shadow: 0 0 0 2px var(--accent-blue), 0 0 12px rgba(59, 130, 246, 0.5);
}
.candidate-mini .info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.candidate-mini .info .name {
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.candidate-mini .info .sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.candidate-mini.active .info .name {
  color: var(--accent-blue);
}

/* ==========================================================================
   Main Content & Top Header
   ========================================================================== */
.main-content {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.top-header {
  position: relative;
  z-index: 500;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-header:has(.is-open),
.top-header:has(.popover-active),
.top-header:has(.ai-quota-widget-wrapper:hover) {
  z-index: 100002;
}
.header-title-group h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.header-title-group p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-action-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}
.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}
.btn-apply {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-apply:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Actions Column & Stacked Action Controls */
.col-actions {
  min-width: 96px;
  width: 96px;
  text-align: center;
}

.actions-cell-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 88px;
  max-width: 96px;
}

.actions-cell-wrapper .btn-apply {
  width: 100%;
  justify-content: center;
  padding: 4px 8px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  box-sizing: border-box;
}

.action-sub-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 4px;
}

.action-sub-btn {
  background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-muted, #94a3b8);
  border-radius: var(--radius-sm, 5px);
  padding: 3px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
  height: 22px;
}

.action-sub-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #f8fafc);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.action-sub-btn.btn-action-ignore:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.action-sub-btn.btn-action-copy:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

.action-sub-btn.btn-action-details:hover {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

.action-sub-btn.copied {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   Tab Content Routing
   ========================================================================== */
.tab-content {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.25s ease forwards;
}
.tab-content.active {
  display: flex;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Metrics KPI Grid */
/* Keywords Summary Grid (Top of Opportunities Feed) */
.keywords-top-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 4px;
}
@media (max-width: 900px) {
  .keywords-top-grid {
    grid-template-columns: 1fr;
  }
}

.keyword-card {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--radius-lg);
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  min-height: 125px;
}

.keyword-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.keyword-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.keyword-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.keyword-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.keyword-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.keyword-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.keyword-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 32px;
}

.keyword-empty-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
}

.keyword-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.keyword-tag-pill .tag-label {
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.keyword-tag-pill .tag-label:hover {
  text-decoration: underline;
}

.keyword-tag-rec {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: #c4b5fd;
}
.keyword-tag-rec:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}

.keyword-tag-custom {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #6ee7b7;
}
.keyword-tag-custom:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.btn-tag-action {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.65;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  font-size: 0.72rem;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-tag-action:hover {
  opacity: 1;
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.15);
}

.add-keyword-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.add-keyword-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.add-keyword-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.add-keyword-btn {
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
  border-radius: var(--radius-sm) !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

/* Filter Controls Bar */
.filter-bar {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  flex: 1;
  min-width: 280px;
  color: var(--text-muted);
}
.search-input-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  width: 100%;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.select-dropdown {
  background: rgba(18, 24, 38, 0.9);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.count-pill {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Data Tables & Heatmap Rules
   ========================================================================== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  position: relative;
  max-height: 680px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}
.data-table thead {
  position: sticky;
  top: 0;
  background: rgba(15, 21, 35, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10;
  border-bottom: 1px solid var(--border-glass);
}
.data-table th {
  padding: 10px 10px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}
.data-table th.sortable:hover {
  color: #60a5fa;
}
.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.72rem;
  color: #60a5fa;
}
.data-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.data-table tbody tr {
  transition: background-color 0.15s ease;
}
.data-table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

/* Badges for 14-Column Specification */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  border: 1px solid var(--badge-green-border);
}
.badge-amber {
  background: var(--badge-amber-bg);
  color: var(--badge-amber-text);
  border: 1px solid var(--badge-amber-border);
}
.badge-red {
  background: var(--badge-red-bg);
  color: var(--badge-red-text);
  border: 1px solid var(--badge-red-border);
}
.badge-neutral {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
  border: 1px solid var(--badge-neutral-border);
}

.col-date, .date-cell {
  min-width: 105px;
  width: 105px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #94a3b8;
}
.job-title-cell {
  font-weight: 600;
  color: #fff;
  min-width: 190px;
  max-width: 310px;
  line-height: 1.35;
}
.job-title-link {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  color: #fff;
  text-decoration: none;
}
.job-title-link:hover {
  color: #60a5fa;
  text-decoration: underline;
}
.jobid-cell {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  max-width: 95px;
  width: 95px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
  color: #cbd5e1;
}
.location-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  max-width: 200px;
}
.location-stack .badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  white-space: nowrap;
  line-height: 1.35;
}
.col-location {
  min-width: 125px;
  max-width: 200px;
  vertical-align: middle;
}
.col-company, .company-cell {
  width: 140px;
  max-width: 170px;
  min-width: 110px;
  font-weight: 600;
  color: #93c5fd;
  vertical-align: middle;
  line-height: 1.35;
}
.company-name-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.3;
}
.col-priority {
  width: 110px;
  min-width: 105px;
  max-width: 120px;
  text-align: center;
  white-space: nowrap;
}
.col-priority .badge {
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
}
.notes-cell {
  max-width: 320px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-pill {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* ==========================================================================
   Company Favorites & Monitored Targets
   ========================================================================== */
.section-action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.section-action-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}
.section-action-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Favorites & Keyword Search Toolbar */
.favorites-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.favorites-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 300px;
}
.favorites-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.favorites-search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.7;
  pointer-events: none;
}
.favorites-search-wrapper input {
  padding-left: 36px;
  width: 100%;
}
.favorites-pill-filters {
  display: flex;
  gap: 6px;
}
.favorites-pill-filters .filter-pill {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.favorites-pill-filters .filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.favorites-pill-filters .filter-pill.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.6);
  color: #a5b4fc;
}
.favorites-pill-filters .filter-pill.pill-fav.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

.favorites-sweep-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 320px;
}
.favorites-sweep-group .sweep-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fbbf24;
}
.favorites-sweep-group .sweep-input-wrapper {
  display: flex;
  gap: 8px;
}
.favorites-sweep-group .sweep-input-wrapper input {
  flex: 1;
}

/* Favorite Star Button & Badges on Company Cards */
.btn-favorite-star {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.btn-favorite-star:hover {
  transform: scale(1.2);
  color: #fbbf24;
}
.btn-favorite-star.is-fav {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.company-card.is-favorite {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(15, 23, 42, 0.6) 100%);
  box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.08);
}
.badge-fav-pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  white-space: nowrap;
}

/* Runner Query Group */
.runner-query-group {
  flex: 1;
  min-width: 260px;
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.company-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: all 0.2s ease;
}
.company-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}
.company-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.company-name {
  font-size: 1.1rem;
  font-weight: 700;
}
.ats-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag-workday { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.tag-greenhouse { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.tag-ashby { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.tag-custom_portal, .tag-unsupported { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.35); }

.company-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.company-meta-label {
  color: var(--text-muted);
  font-size: 0.72rem;
}
.company-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

/* Target Query Keyword Add Box */
.badge-add-keyword {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1;
  vertical-align: middle;
}
.badge-add-keyword:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.65);
  color: #fff;
  transform: translateY(-1px);
}
.input-inline-keyword {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--accent-blue);
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-family: inherit;
  width: 105px;
  outline: none;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
  margin-right: 4px;
  margin-bottom: 4px;
  vertical-align: middle;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 22px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: #10b981; }
input:checked + .slider:before { transform: translateX(22px); }

/* ==========================================================================
   Configuration & Profile Form
   ========================================================================== */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 20px;
}
.config-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.config-card-full {
  grid-column: 1 / -1;
  width: 100%;
}
.profile-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.auto-gates-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.auto-gate-category-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auto-gate-category-box h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (min-width: 900px) {
  .config-card-tall {
    grid-row: span 2;
  }
}
.card-header {
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 14px;
}
.card-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.card-title-group p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.card-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-link {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}
.btn-link:hover {
  text-decoration: underline;
  color: #93c5fd;
}
.form-input, .form-textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--border-focus);
}
.form-textarea {
  resize: vertical;
  line-height: 1.4;
}
.helper-text {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.input-with-button {
  display: flex;
  gap: 8px;
}
.input-with-button input {
  flex: 1;
}
.separator {
  height: 1px;
  background: var(--border-glass);
  margin: 6px 0;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.status-msg {
  font-size: 0.82rem;
  color: #34d399;
}

/* ==========================================================================
   Runner & Live Terminal
   ========================================================================== */
.runner-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.runner-controls-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
}
.runner-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.runner-input-group .form-input.input-narrow {
  width: 70px;
  padding: 6px 8px;
  text-align: center;
}
.runner-checkbox-group {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.runner-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.runner-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.terminal-window {
  background: #060910;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}
.terminal-header {
  background: #0f1523;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}
.autoscroll-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.terminal-body {
  padding: 16px;
  height: 480px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.5;
}
.terminal-line {
  word-break: break-all;
  white-space: pre-wrap;
}
.system-line {
  color: #38bdf8;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-content {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #111728;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-glass);
}
.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}
.modal-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}
.btn-icon:hover {
  color: #fff;
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.88rem;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Company Discovery Radar */
.discovery-header {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.discovery-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}
.profile-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.profile-pill {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-secondary);
}
.discovery-actions-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.discovery-search-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.discovery-mode-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.discovery-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
}
.discovery-source-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}
.discovery-roles-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}
.discovery-roles-header {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.discovery-role-item {
  font-size: 0.72rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  border-radius: 4px;
  padding: 2px 4px;
  background: rgba(56, 189, 248, 0.05);
  transition: all 0.15s ease;
}
.discovery-role-item:hover {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  text-decoration: none;
}
.discovery-role-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.discovery-role-loc {
  color: var(--text-muted);
  font-size: 0.65rem;
  white-space: nowrap;
}
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.discovery-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all 0.2s ease;
}
.discovery-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}
.discovery-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.discovery-company-title {
  font-size: 1.15rem;
  font-weight: 700;
}
.discovery-category-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.discovery-score-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.competitiveness-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
  width: fit-content;
}
.potent-chips-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 2px 0;
}
.potent-chip {
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-blue);
  padding: 3px 8px;
  border-radius: 0 4px 4px 0;
  line-height: 1.35;
}
.potent-chip-prefix {
  color: #cbd5e1;
  font-weight: 600;
  margin-right: 4px;
}
.discovery-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

/* ==========================================================================
   Configuration Toolbar & Portfolio Manager
   ========================================================================== */
.config-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}
.config-toolbar-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.config-toolbar-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.config-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  padding: 18px 22px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 10px);
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.portfolio-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.6);
}

.portfolio-item.is-editing {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.12);
}

/* Header: Title, Category & Actions */
.portfolio-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-header-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.portfolio-display-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-cyan, #38bdf8);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-category-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.portfolio-name-input {
  font-weight: 600;
  color: var(--accent-cyan, #38bdf8) !important;
  flex: 1;
  max-width: 380px;
}

.portfolio-category-select {
  width: 170px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
  color: var(--text-primary, #f8fafc);
  padding: 7px 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Toggle visibility between view and edit modes */
.portfolio-item:not(.is-editing) .portfolio-name-input,
.portfolio-item:not(.is-editing) .portfolio-category-select {
  display: none;
}

.portfolio-item.is-editing .portfolio-display-title,
.portfolio-item.is-editing .portfolio-category-badge {
  display: none;
}

/* Header Action Buttons */
.portfolio-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-edit-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-edit-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: translateY(-1px);
}

.btn-save-item {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
}

.btn-save-item:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
}

.btn-save-item:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-cancel-item {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.btn-cancel-item:hover {
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.25);
}

.portfolio-item:not(.is-editing) .btn-save-item,
.portfolio-item:not(.is-editing) .btn-cancel-item {
  display: none !important;
}

.portfolio-item.is-editing .btn-edit-item {
  display: none !important;
}

/* Side-by-Side Portfolio Item Body (User Notes Left, Files Right) */
.portfolio-item-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .portfolio-item-body {
    grid-template-columns: 1fr;
  }
}

.portfolio-col-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portfolio-col-summary {
  display: flex;
  flex-direction: column;
}

/* User Notes */
.portfolio-notes-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.portfolio-notes-display {
  font-size: 0.84rem;
  line-height: 1.55;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 8px 12px;
  min-height: 52px;
  white-space: pre-wrap;
}

.portfolio-notes-display.empty {
  color: var(--text-muted, #64748b);
  font-style: italic;
}

.portfolio-desc-input {
  font-size: 0.84rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 64px;
}

.portfolio-item:not(.is-editing) .portfolio-desc-input {
  display: none;
}

.portfolio-item.is-editing .portfolio-notes-display {
  display: none;
}

/* Attached Documentation Files Section */
.portfolio-files-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.portfolio-files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portfolio-item:not(.is-editing) .portfolio-upload-btn-label {
  display: none !important;
}

.portfolio-item:not(.is-editing) .portfolio-file-chip .btn-remove-file {
  display: none !important;
}

.portfolio-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}

.portfolio-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-primary, #f8fafc);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  transition: all 0.15s ease;
}

.portfolio-file-chip:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(30, 41, 59, 0.9);
}

.portfolio-file-chip .file-link {
  color: #60a5fa;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.portfolio-file-chip .file-link:hover {
  text-decoration: underline;
}

.portfolio-file-chip .file-size {
  color: var(--text-muted, #94a3b8);
  font-size: 0.7rem;
}

.portfolio-file-chip .btn-remove-file {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.85rem;
  line-height: 1;
}

.portfolio-file-chip .btn-remove-file:hover {
  color: #f87171;
}

.portfolio-upload-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 9px;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px dashed rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portfolio-upload-btn-label:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: #60a5fa;
  color: #bfdbfe;
}

/* AI Technical Summary Card (Right Column) */
.portfolio-ai-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.45) 0%, rgba(15, 23, 42, 0.65) 100%);
  border: 1px solid rgba(139, 92, 246, 0.32);
  border-radius: var(--radius-sm, 8px);
  position: relative;
  height: 100%;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.portfolio-ai-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.portfolio-ai-summary-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #c084fc;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portfolio-ai-summary-content {
  flex: 1;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #f1f5f9;
  font-style: italic;
  padding: 4px 0;
}

.portfolio-ai-summary-content.empty {
  color: var(--text-muted, #94a3b8);
  font-style: normal;
}

.portfolio-summary-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-summary-footer svg {
  color: #10b981;
}

.portfolio-summary-timestamp {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

@keyframes pulseHighlight {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; color: #a855f7; }
}

.portfolio-generating-pulse {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c084fc;
  animation: pulseHighlight 1.5s infinite;
  padding: 10px 0;
}

/* ==========================================================================
   Onboarding Setup Wizard Modal
   ========================================================================== */
.wizard-modal {
  max-width: 880px !important;
  width: 92vw;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
}
.wizard-header {
  padding: 22px 28px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.12) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-glass);
}
.wizard-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 6px;
}
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-glass);
  gap: 6px;
  overflow-x: auto;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.step-item.active {
  color: var(--text-primary);
  font-weight: 600;
}
.step-item.active .step-number {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}
.step-item.completed {
  color: var(--accent-green);
}
.step-item.completed .step-number {
  background: var(--badge-green-bg);
  color: var(--accent-green);
  border-color: var(--badge-green-border);
}
.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.step-connector {
  flex: 1;
  min-width: 12px;
  height: 2px;
  background: var(--border-glass);
  margin: 0 4px;
  transition: background 0.3s ease;
}
.step-connector.completed {
  background: var(--accent-green);
}

.wizard-body {
  padding: 24px 28px;
  min-height: 380px;
  max-height: 70vh;
  overflow-y: auto;
}
.wizard-step-pane {
  animation: fadeIn 0.25s ease-out;
}
.wizard-form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pane-header {
  margin-bottom: 16px;
}
.pane-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  color: var(--text-primary);
}
.pane-header p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.pane-title-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-req {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  margin-left: 8px;
}
.badge-opt {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  margin-left: 8px;
}
.tag-opt {
  font-size: 0.65rem;
  opacity: 0.6;
  margin-left: 2px;
}
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-glass);
}
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-top: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.2);
}
.wizard-footer-left, .wizard-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Opportunities Status Dropdown & Badges
   ========================================================================== */
.col-status {
  min-width: 124px;
  width: 124px;
}

.status-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 22px 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  transition: all 0.2s ease;
  white-space: nowrap;
  outline: none;
  border: 1px solid var(--border-glass);
}

.status-select:focus {
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.4);
}

.status-select.status-discovered {
  background-color: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.status-select.status-applied {
  background-color: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.4);
}

.status-select.status-screening {
  background-color: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.4);
}

.status-select.status-interviewing {
  background-color: rgba(249, 115, 22, 0.16);
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.4);
}

.status-select.status-offer {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.status-select.status-rejected {
  background-color: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.status-select.status-archived {
  background-color: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.3);
}

.status-select option {
  background-color: #0f172a;
  color: #f1f5f9;
  font-weight: 500;
  padding: 6px 10px;
}

.status-saved-flash {
  animation: statusPulse 0.5s ease;
}

.status-cell-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.status-date-subtext {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
  padding: 1px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.status-date-subtext:hover {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
}

.status-date-icon {
  opacity: 0.65;
  flex-shrink: 0;
}

.status-date-inline-input {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  padding: 1px 4px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid var(--accent-blue);
  border-radius: 4px;
  outline: none;
}

.modal-status-wrapper {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.modal-status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-timeline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

.status-chip.active {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

@keyframes statusPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); filter: brightness(1.2); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 240px;
  max-width: 380px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.toast-show {
  transform: translateY(0);
  opacity: 1;
}

.toast-item.toast-success {
  border-left: 3px solid #10b981;
}

.toast-item.toast-error {
  border-left: 3px solid #ef4444;
}

.toast-item.toast-info {
  border-left: 3px solid #3b82f6;
}

/* 3-Tier Model Cascade Badge & Flow Styles */
.cascade-badge-container {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.cascade-flow {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flow-line {
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.flow-stage {
  color: #94a3b8;
  font-weight: 700;
  min-width: 52px;
}
.c-step {
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.c-step.tp {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.c-step.ft {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.c-step.local {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.c-step.heur {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Authentication & Multi-User Styles */
.btn-logout {
  transition: all 0.2s ease;
  opacity: 0.6;
}
.btn-logout:hover {
  opacity: 1;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  transform: scale(1.08);
}
.auth-tab-btn {
  transition: all 0.2s ease;
}
.auth-tab-btn:hover:not(.active) {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Company Cell & Preferences Inline Controls */
.company-cell-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  min-width: 0;
}
.company-pref-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-company-pref {
  background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-muted, #94a3b8);
  border-radius: var(--radius-sm, 5px);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  box-sizing: border-box;
}
.btn-company-pref svg {
  pointer-events: none;
}
.btn-company-pref:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #f8fafc);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.btn-company-pref.btn-fav-comp:hover {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
  border-color: rgba(234, 179, 8, 0.4);
}
.btn-company-pref.btn-fav-comp.is-fav {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.25);
}
.btn-company-pref.btn-ignore-comp:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-company-pref.btn-ignore-comp.is-ignored {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.25);
}
.company-fav-text {
  font-weight: 700;
  color: #fbbf24;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin-animation {
  animation: spin 0.8s linear infinite;
}

#btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

#btn-refresh:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ==========================================================================
   Profile Redesign Concept 1: Sub-Nav Anchor Bar & Elevated Section Cards
   ========================================================================== */

/* Sticky Sub-Navigation Bar */
.card-glass-sub {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.card-glass-sub:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.salary-preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.salary-preset-btn:hover {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.salary-preset-btn.active {
  background: rgba(52, 211, 153, 0.2);
  border-color: #34d399;
  color: #34d399;
  font-weight: 600;
}

/* Interactive Tag Chip Input Boxes */
.tag-input-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 6px;
  cursor: text;
  transition: all 0.2s ease;
  box-sizing: border-box;
  width: 100%;
}

.tag-input-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.tag-input-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  background: rgba(0, 0, 0, 0.45);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  user-select: none;
  animation: tagPopIn 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.15s ease;
}

@keyframes tagPopIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Skills: Indigo/Cyan tint */
.tag-chip-skill {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}
.tag-chip-skill:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.22);
}

/* Locations: Emerald tint */
.tag-chip-location {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}
.tag-chip-location:hover {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.22);
}

/* Domains: Violet/Purple tint */
.tag-chip-domain {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #e9d5ff;
}
.tag-chip-domain:hover {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.22);
}

.tag-chip .tag-chip-remove {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.65;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.tag-chip .tag-chip-remove:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.tag-inline-input {
  flex: 1 1 140px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  padding: 4px 6px;
  min-width: 120px;
}

.tag-inline-input::placeholder {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.profile-subnav-sticky {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  margin: -8px -12px 24px -12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
}

.profile-nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.profile-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.profile-pill-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.profile-pill-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.28));
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.25);
  font-weight: 600;
}

.profile-hero-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.04));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  margin-bottom: 20px;
}

.profile-hero-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.profile-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-hero-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-hero-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Elevated Timeline Repeaters for Education & Work Experience */
.timeline-card-item {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.timeline-card-item .form-input,
.timeline-card-item .select-dropdown,
.timeline-card-item .form-textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.education-item.timeline-card-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.experience-item.timeline-card-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.experience-item .exp-responsibilities {
  flex: 1;
  min-height: 68px;
  resize: vertical;
}

.timeline-card-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.2);
}

.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timeline-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Modern Glowing Switch Cards for Auto-Gates */
.toggle-switch-tile {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-switch-tile:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.toggle-switch-tile.is-active {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.12);
}

.toggle-switch-tile .tile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.toggle-switch-tile .tile-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-switch-tile .tile-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Custom CSS Switch Pill */
.switch-control {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-track {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.switch-track:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #cbd5e1;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.switch-control input:checked + .switch-track {
  background-color: #6366f1;
  border-color: #818cf8;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.45);
}

.switch-control input:checked + .switch-track:before {
  transform: translateX(18px);
  background-color: #ffffff;
}

/* AI Synthesized Discovery Suite Cards */
.ai-suites-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .ai-suites-grid {
    grid-template-columns: 1fr;
  }
}

.ai-suite-item {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-suite-item:hover {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(0, 0, 0, 0.42);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   AI Quota Widget & Popover
   ========================================================================== */
.ai-quota-widget-wrapper {
  position: relative;
  display: inline-block;
  z-index: 501;
}

.ai-quota-widget-wrapper:hover,
.ai-quota-widget-wrapper:focus-within,
.ai-quota-widget-wrapper:has(.is-open),
.ai-quota-widget-wrapper.popover-active {
  z-index: 100005;
}

.ai-quota-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ai-quota-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.quota-sparkle {
  color: #fbbf24;
  font-size: 0.9rem;
  line-height: 1;
}

.quota-pill-label {
  color: var(--text-secondary);
}

.quota-pill-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  letter-spacing: 0.02em;
}

.quota-pill-badge.quota-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

.quota-pill-badge.quota-exhausted {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.quota-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #0b1120 !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(99, 102, 241, 0.35), 0 8px 24px rgba(0, 0, 0, 0.75);
  z-index: 100005;
  display: none;
  animation: quotaPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes quotaPopIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-quota-widget-wrapper:hover .quota-popover,
.quota-popover.is-open {
  display: block;
}

.quota-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.quota-popover-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.quota-popover-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.quota-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  flex-shrink: 0;
}

.quota-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quota-item-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.76rem;
}

.quota-item-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.quota-item-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.quota-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
}

.quota-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 9999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.quota-fill.quota-fill-warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.quota-fill.quota-fill-low {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.quota-popover-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

/* ==========================================================================
   Walkthrough Product Tour Overlay & Floating Spotlight Card
   ========================================================================== */
.walkthrough-overlay {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  z-index: 100000;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 24px;
}

@keyframes wtFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.walkthrough-card {
  pointer-events: auto;
  width: 100%;
  max-width: 620px;
  background: #0b1120 !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(99, 102, 241, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(99, 102, 241, 0.35), 0 0 35px rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: wtSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100001;
}

@keyframes wtSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.walkthrough-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.walkthrough-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 3px 10px;
  border-radius: 9999px;
}

.walkthrough-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.walkthrough-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.walkthrough-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.walkthrough-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.walkthrough-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  white-space: pre-line;
}

.walkthrough-subtip {
  font-size: 0.76rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 4px;
}

.walkthrough-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.walkthrough-progress-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.wt-dot.active {
  width: 20px;
  border-radius: 9999px;
  background: #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

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

/* ==========================================================================
   Job & Company Catalog Styles
   ========================================================================== */

.catalog-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.catalog-subview-toggle {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.catalog-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.catalog-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.catalog-toggle-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.catalog-filter-card {
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.catalog-search-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .catalog-search-row {
    grid-template-columns: 1fr;
  }
}

.catalog-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.catalog-search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.catalog-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.catalog-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.catalog-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.catalog-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.catalog-filter-pills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.catalog-pills-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.catalog-pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.catalog-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.catalog-pill-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
  font-weight: 600;
}

.catalog-summary-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Job Cards Grid */
.catalog-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.catalog-job-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.catalog-job-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.catalog-job-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.catalog-company-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-ats-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-job-title {
  margin: 6px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.catalog-job-title a {
  color: inherit;
  text-decoration: none;
}

.catalog-job-title a:hover {
  color: #a5b4fc;
}

.catalog-job-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.80rem;
  color: var(--text-muted);
}

.catalog-job-eval-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.catalog-job-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Company Cards Grid */
.catalog-companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.catalog-company-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.25s ease;
}

.catalog-company-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.company-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.company-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(139, 92, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
}

.company-tags-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.company-tag-pill {
  font-size: 0.70rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
}

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 0;
}

.pagination-info {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Multi-token Search Highlighting */
.search-highlight {
  background: rgba(245, 158, 11, 0.28);
  color: #fbbf24;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
  border-bottom: 1px solid rgba(251, 191, 36, 0.4);
}

.catalog-search-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

.catalog-search-hint code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  color: #93c5fd;
}

/* ==========================================================================
   Public Landing Page & Auth State Modes
   ========================================================================== */
body.public-mode #nav-tab-opportunities,
body.public-mode #nav-tab-profile,
body.public-mode #nav-tab-ai-summary,
body.public-mode #nav-tab-settings,
body.public-mode .status-widget,
body.public-mode .sidebar-footer,
body.public-mode #ai-quota-widget,
body.public-mode .header-action-group,
body.public-mode .catalog-filter-ai-status-group,
body.public-mode .catalog-job-eval-box,
body.public-mode #btn-modal-reevaluate {
  display: none !important;
}

body.public-mode #public-header-actions {
  display: flex !important;
}

body.authenticated-mode #public-header-actions {
  display: none !important;
}

.auth-modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.auth-modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
