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

:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --primary: #4a6cf7;
  --primary-hover: #3b5de7;
  --text: #2d3436;
  --text-light: #636e72;
  --border: #e0e3eb;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --info: #74b9ff;
  --saved: #a29bfe;
}

body {
  font-family: 'Segoe UI', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: #1a1a2e;
  color: #fff;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar h1 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.sidebar .subtitle {
  font-size: 0.75rem;
  color: #a0a0b8;
  margin-bottom: 1.5rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: none;
  background: transparent;
  color: #c0c0d8;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}

.nav-btn:hover,
.nav-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-btn .icon {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
}

/* Main content */
.main {
  padding: 2rem;
  overflow-y: auto;
  max-height: 100vh;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.stat-card .value.primary { color: var(--primary); }
.stat-card .value.success { color: var(--success); }
.stat-card .value.warning { color: var(--warning); }
.stat-card .value.danger { color: var(--danger); }
.stat-card .value.info { color: var(--info); }
.stat-card .value.saved { color: var(--saved); }

/* Section header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.3rem;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #00a383;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* Table */
.app-table {
  width: 100%;
  background: var(--card);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  border-collapse: collapse;
  overflow: hidden;
}

.app-table th,
.app-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.app-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  background: #fafbfc;
}

.app-table tr:last-child td {
  border-bottom: none;
}

.app-table tr:hover td {
  background: #f8f9ff;
}

/* Status badge */
.status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-saved { background: #ede7f6; color: #7c4dff; }
.status-applied { background: #e3f2fd; color: #1976d2; }
.status-interviewing { background: #fff3e0; color: #f57c00; }
.status-offered { background: #e8f5e9; color: #388e3c; }
.status-rejected { background: #fce4ec; color: #d32f2f; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--card);
  border-radius: 0.75rem;
  padding: 2rem;
  width: 90%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 {
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-family: inherit;
}

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

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

.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* Search page */
.search-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.search-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: box-shadow 0.15s;
}

.search-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-card h4 {
  margin-bottom: 0.5rem;
}

.search-card a {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.search-card a:hover {
  text-decoration: underline;
}

/* Search filters */
.search-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.search-filters select {
  flex: 1;
  min-width: 140px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  background: var(--card);
  color: var(--text);
}

/* Loading state */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-light);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* Insights banner */
.insights-bar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Filter Review Panel */
.filter-review {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.filter-review-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
}

.filter-review-back,
.filter-review-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.25rem;
  line-height: 1;
}

.filter-review-body {
  max-height: 320px;
  overflow-y: auto;
}

.filter-review-category {
  padding: 0.5rem 1.25rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

.filter-review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.filter-review-item:hover {
  background: var(--bg);
}

.filter-review-item.active {
  background: rgba(74, 108, 247, 0.06);
}

.filter-review-item-label {
  font-size: 0.95rem;
  font-weight: 500;
}

.filter-review-item-count {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  background: var(--bg);
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  min-width: 2rem;
  text-align: center;
}

.filter-review-recs {
  padding: 0;
}

.filter-review-rec {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 193, 7, 0.08);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

.filter-review-rec-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.filter-review-rec-action {
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.filter-review-actions {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.filter-review-actions .btn {
  flex: 1;
}

.filter-review-all {
  background: var(--card);
  border: 2px solid var(--text);
  font-weight: 600;
}

/* Job board channels toggle */
.channels-section {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.channels-section summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-light);
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.channels-section summary:hover {
  color: var(--primary);
}

.channels-section .search-results {
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .search-filters {
    flex-direction: column;
  }

  .search-filters select {
    min-width: 100%;
  }
}

/* Profile form */
.profile-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.chip-input {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.25rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.8rem;
}

.chip button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: inherit;
}

.entry-card {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.entry-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* Resume preview */
.resume-frame {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #fff;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar input {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.85rem;
  flex: 1;
  min-width: 200px;
}

.filter-bar select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

/* Onboarding Wizard */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.onboarding-container {
  width: 90%;
  max-width: 600px;
  padding: 2rem 0;
}

.onboarding-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.onboarding-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.onboarding-step {
  display: none;
  color: #fff;
  animation: fadeIn 0.3s ease;
}

.onboarding-step.active {
  display: block;
}

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

.onboarding-emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.onboarding-step h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.onboarding-step h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.onboarding-tagline {
  font-size: 1.15rem;
  color: #a0c4ff;
  margin-bottom: 1rem;
}

.onboarding-sub {
  color: #b0b8d0;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.onboarding-form {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.onboarding-form .form-group label {
  color: #c0c8e0;
}

.onboarding-form .form-group input,
.onboarding-form .form-group select,
.onboarding-form .form-group textarea {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.onboarding-form .form-group input::placeholder,
.onboarding-form .form-group textarea::placeholder {
  color: #7080a0;
}

.onboarding-form .form-group select option {
  background: #1a1a2e;
  color: #fff;
}

.onboarding-form .chip {
  background: rgba(74, 108, 247, 0.3);
  color: #a0c4ff;
}

.onboarding-form .entry-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.onboarding-form .entry-card strong {
  color: #e0e4f0;
}

.onboarding-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.05rem;
}

/* Upload area */
.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1rem;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: rgba(74, 108, 247, 0.08);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.upload-text {
  color: #d0d4e8;
  margin-bottom: 0.25rem;
}

.upload-hint {
  font-size: 0.8rem;
  color: #7080a0;
  margin-bottom: 0.75rem;
}

.upload-protip {
  font-size: 0.82rem;
  color: #a0c4ff;
  background: rgba(74, 108, 247, 0.1);
  border: 1px solid rgba(74, 108, 247, 0.2);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.upload-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: #7080a0;
  font-size: 0.85rem;
}

.upload-divider::before,
.upload-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.upload-status-success {
  background: rgba(0, 184, 148, 0.15);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: #00b894;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

.upload-status-error {
  background: rgba(225, 112, 85, 0.15);
  border: 1px solid rgba(225, 112, 85, 0.3);
  color: #e17055;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

.upload-status-loading {
  color: #a0c4ff;
  padding: 0.75rem;
  font-size: 0.85rem;
}

/* Extracted CV summary */
.extracted-summary {
  background: rgba(74, 108, 247, 0.1);
  border: 1px solid rgba(74, 108, 247, 0.25);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.extracted-summary h3 {
  font-size: 0.9rem;
  color: #a0c4ff;
  margin-bottom: 0.75rem;
}

.extracted-item {
  padding: 0.3rem 0;
  font-size: 0.85rem;
  color: #c0c8e0;
}

.extracted-label {
  display: inline-block;
  min-width: 5.5rem;
  font-weight: 600;
  color: #e0e3eb;
}

/* Bubble suggestions */
.bubble-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bubble-btn {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  background: transparent;
  color: #c0c8e0;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}

.bubble-btn:hover {
  border-color: var(--primary);
  color: #fff;
  background: rgba(74, 108, 247, 0.15);
}

.bubble-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-open-to-all {
  margin-top: 0.5rem;
  width: 100%;
  text-align: center;
  opacity: 0.8;
}

/* Remote scale */
.remote-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.remote-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background: transparent;
  color: #a0a8c0;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
}

.remote-option:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #e0e4f0;
}

.remote-option.active {
  border-color: var(--primary);
  background: rgba(74, 108, 247, 0.15);
  color: #fff;
}

.remote-icon {
  font-size: 1.5rem;
}

/* Salary slider */
.salary-hint {
  font-size: 0.8rem;
  color: #7080a0;
  margin-bottom: 0.5rem;
}

.salary-slider-container {
  padding: 0.5rem 0;
}

.salary-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #c0c8e0;
  margin-bottom: 0.25rem;
}

.salary-labels span:first-child {
  font-weight: 600;
  color: #a0c4ff;
}

.salary-labels span:last-child {
  font-weight: 600;
  color: #a0c4ff;
}

.salary-range {
  position: relative;
  height: 2rem;
  margin: 0.5rem 0;
}

.salary-range input[type="range"] {
  position: absolute;
  width: 100%;
  height: 4px;
  top: 50%;
  transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.salary-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.salary-range input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  cursor: pointer;
  pointer-events: auto;
}

.salary-range input[type="range"]:first-child {
  z-index: 1;
}

/* Discover / Swipe */
.swipe-counter {
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.swipe-card-container {
  display: flex;
  justify-content: center;
  perspective: 1000px;
  margin-bottom: 1.5rem;
}

.swipe-card {
  width: 100%;
  max-width: 500px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.4s ease, opacity 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.swipe-card.swiping-left {
  transform: translateX(-120%) rotate(-8deg);
  opacity: 0;
}

.swipe-card.swiping-right {
  transform: translateX(120%) rotate(8deg);
  opacity: 0;
}

.swipe-card-body {
  padding: 2rem;
}

.swipe-card-body h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.swipe-company {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.swipe-details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.swipe-detail {
  background: #f0f2f8;
  padding: 0.3rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.swipe-desc {
  color: var(--text-light);
  line-height: 1.6;
}

.swipe-actions {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.swipe-btn {
  padding: 0.75rem 2rem;
  border: 2px solid;
  border-radius: 3rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.swipe-pass {
  border-color: var(--danger);
  color: var(--danger);
}

.swipe-pass:hover {
  background: var(--danger);
  color: #fff;
}

.swipe-like {
  border-color: var(--success);
  color: var(--success);
}

.swipe-like:hover {
  background: var(--success);
  color: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.75rem;
    gap: 0.25rem;
  }

  .sidebar h1,
  .sidebar .subtitle {
    display: none;
  }

  .nav-btn {
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
  }

  .main {
    padding: 1rem;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .apply-layout {
    grid-template-columns: 1fr;
  }

  .apply-actions {
    flex-wrap: wrap;
  }
}

/* ===========================
   Apply Page
   =========================== */

.apply-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.apply-header h2 {
  font-size: 1.2rem;
  margin: 0;
}

.apply-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.apply-left,
.apply-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.apply-job-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.apply-job-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.apply-company {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.apply-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

.apply-meta span:not(:empty)::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-light);
  margin-right: 0.5rem;
  vertical-align: middle;
}

.apply-meta span:first-child::before {
  display: none;
}

.apply-mode-toggle {
  display: flex;
  gap: 0.5rem;
}

.apply-mode-toggle .btn {
  flex: 1;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

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

.apply-cv-header h3 {
  font-size: 1rem;
}

.apply-skills-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.apply-skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.skill-chip {
  padding: 0.25rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.skill-chip.excluded {
  background: transparent;
  color: var(--text-light);
  border-color: var(--border);
}

.skill-chip:hover {
  opacity: 0.85;
}

#apply-cv-frame {
  min-height: 500px;
}

.apply-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Contact Intelligence Panel */
.apply-contacts-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.contacts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.contacts-header h4 {
  font-size: 0.95rem;
  margin: 0;
}

.contacts-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}

.contact-item .contact-label {
  color: var(--text-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 50px;
}

.contact-item a {
  color: var(--primary);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-item .use-btn {
  padding: 0.15rem 0.4rem;
  font-size: 0.72rem;
  border-radius: 0.25rem;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.contacts-guessed-emails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.guessed-email {
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  background: #f0f0f5;
  border: 1px solid var(--border);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
}

.guessed-email:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.contact-search-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.contact-search-links a {
  padding: 0.25rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.78rem;
  background: #f0f0f5;
  border: 1px solid var(--border);
  color: var(--primary);
  text-decoration: none;
  transition: all 0.15s;
}

.contact-search-links a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===========================
   Toast Notifications
   =========================== */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  opacity: 0;
  transform: translateY(1rem) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  max-width: 400px;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-success {
  background: linear-gradient(135deg, #00b894, #00a381);
}

.toast-error {
  background: linear-gradient(135deg, #e17055, #d63031);
}

.toast-warning {
  background: linear-gradient(135deg, #fdcb6e, #e17055);
  color: #2d3436;
}

.toast-info {
  background: linear-gradient(135deg, #74b9ff, #4a6cf7);
}

/* ===========================
   Enhanced Focus & Interaction
   =========================== */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.filter-bar input:focus,
.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

.btn-success:hover {
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 4px 12px rgba(225, 112, 85, 0.3);
}

/* ===========================
   Page Transitions
   =========================== */
.page {
  animation: none;
}

.page.active {
  display: block;
  animation: pageIn 0.25s ease-out;
}

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

/* ===========================
   Stat Card Hover
   =========================== */
.stat-card {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ===========================
   App Table Row Interactions
   =========================== */
.app-table tr td {
  transition: background 0.15s;
}

.status-select {
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: capitalize;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23636e72'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  padding-right: 1.2rem;
}

.status-select.status-saved { background-color: #ede7f6; color: #7c4dff; }
.status-select.status-applied { background-color: #e3f2fd; color: #1976d2; }
.status-select.status-interviewing { background-color: #fff3e0; color: #f57c00; }
.status-select.status-offered { background-color: #e8f5e9; color: #388e3c; }
.status-select.status-rejected { background-color: #fce4ec; color: #d32f2f; }

/* ===========================
   Empty State Enhancements
   =========================== */
.empty-state {
  padding: 4rem 2rem;
}

.empty-state .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-state p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state .btn {
  margin-top: 1rem;
}

/* ===========================
   Milestone Celebration
   =========================== */
@keyframes confettiBurst {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.milestone-toast {
  animation: confettiBurst 0.4s ease-out;
}

/* ===========================
   Delete Confirmation
   =========================== */
.confirm-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.confirm-dialog {
  background: var(--card);
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.confirm-dialog h3 {
  margin-bottom: 0.5rem;
}

.confirm-dialog p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.confirm-dialog .form-actions {
  justify-content: center;
}

/* ===========================
   Apply Feedback Box
   =========================== */
/* ===========================
   Job Description Display
   =========================== */
.apply-job-desc-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.apply-job-desc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.apply-job-desc-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.job-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.job-highlight {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: #f0f4ff;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  min-width: 100px;
}

.job-highlight-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.job-highlight-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.apply-job-desc-display {
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light);
}

.apply-job-desc-display p {
  margin: 0.4rem 0;
}

.apply-job-desc-display strong {
  color: var(--text);
}

.apply-job-desc-display ul {
  margin: 0.25rem 0 0.5rem 1.25rem;
  padding: 0;
}

.apply-job-desc-display li {
  margin: 0.2rem 0;
}

.apply-no-desc-panel {
  margin-bottom: 1rem;
}

.apply-no-desc-empty {
  background: #f8f9ff;
  border: 2px dashed var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.apply-no-desc-empty p {
  margin: 0 0 0.5rem;
}

.apply-no-desc-empty textarea {
  width: 100%;
  text-align: left;
  margin: 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.apply-no-desc-empty .btn {
  margin-top: 0.5rem;
}

.apply-feedback-box {
  background: #f8f9ff;
  border: 1px dashed var(--primary);
  border-radius: 0.75rem;
  padding: 1rem;
}

.apply-feedback-box label {
  color: var(--primary) !important;
  font-weight: 600 !important;
}

.apply-feedback-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.apply-feedback-row textarea {
  flex: 1;
  min-height: 2.5rem;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.apply-feedback-row .btn {
  flex-shrink: 0;
  align-self: stretch;
}

/* ===========================
   Keyboard Shortcut Hints
   =========================== */
.keyboard-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: #fafbfc;
  font-family: monospace;
  font-size: 0.7rem;
  box-shadow: 0 1px 0 var(--border);
}

/* ===========================
   Mobile Enhancements
   =========================== */
@media (max-width: 768px) {
  .nav-btn span:not(.icon) {
    font-size: 0.75rem;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
  }

  #toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 5rem;
  }

  .toast {
    max-width: 100%;
  }

  .confirm-dialog {
    margin: 0 1rem;
  }
}

/* Job Detail Modal & Jokes */
.joke-text {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.85rem;
}

.salary-joke {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.8rem;
  max-width: 200px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-desc-text {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

#detail-modal .modal {
  max-width: 700px;
}

#detail-meta {
  font-size: 0.9rem;
  line-height: 1.8;
}

#detail-meta a {
  color: var(--primary);
}

/* Job Feed Grid */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.feed-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: box-shadow 0.15s;
  position: relative;
}

.feed-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feed-card h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.feed-card .feed-company {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.feed-card .feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.feed-card .feed-meta span {
  background: var(--bg);
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
}

.feed-card .feed-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-card .feed-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.feed-card .feed-actions a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.feed-card .feed-actions a:hover {
  text-decoration: underline;
}

.feed-card .feed-new-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--success);
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Quick Links Grid */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.quick-link-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.quick-link-card .ql-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--primary);
}

.quick-link-card a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.quick-link-card a:hover {
  color: var(--primary);
}

.quick-link-card .ql-tip {
  font-size: 0.8rem;
  color: var(--text-light);
}

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

/* Outreach Pipeline */
.outreach-pipeline { display: flex; gap: 1rem; overflow-x: auto; padding: 1rem 0; }
.pipeline-column { min-width: 220px; flex: 1; background: var(--bg-card, #1e1e2e); border-radius: 8px; padding: 1rem; }
.pipeline-column h3 { font-size: 0.85rem; text-transform: uppercase; color: var(--text-light, #a0a0b8); margin-bottom: 0.75rem; }
.pipeline-column .count { background: rgba(255,255,255,0.1); border-radius: 12px; padding: 0.1rem 0.5rem; font-size: 0.75rem; margin-left: 0.5rem; }
.lead-card { background: var(--bg-main, #16161e); border: 1px solid var(--border, #2a2a3a); border-radius: 6px; padding: 0.75rem; margin-bottom: 0.5rem; cursor: pointer; transition: box-shadow 0.2s; }
.lead-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.lead-card .lead-name { font-weight: 600; font-size: 0.9rem; }
.lead-card .lead-category { font-size: 0.8rem; color: var(--text-light, #a0a0b8); }
.stage-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.stage-badge.discovered { background: #1e3a5f; color: #64b5f6; }
.stage-badge.mockups_ready { background: #3a1e5f; color: #ba68c8; }
.stage-badge.email_sent { background: #5f3a1e; color: #ffb74d; }
.stage-badge.opened { background: #1e5f3a; color: #81c784; }
.stage-badge.responded { background: #1e5f2a; color: #66bb6a; }
.stage-badge.paid { background: #2e5f1e; color: #aed581; }
.stage-badge.needs_email { background: #5f1e1e; color: #ef5350; }
.stage-badge.no_response { background: #3a3a3a; color: #999; }
.stage-badge.opted_out { background: #3a3a3a; color: #777; }
.stage-badge.building { background: #1e4a5f; color: #4dd0e1; }
.stage-badge.delivered { background: #2a5f1e; color: #9ccc65; }

.outreach-tab { padding: 0.5rem 1rem; border: 1px solid var(--border, #2a2a3a); border-radius: 6px; cursor: pointer; background: transparent; color: var(--text, #e0e0e0); }
.outreach-tab.active { background: var(--primary, #7c5cfc); color: #fff; border-color: var(--primary, #7c5cfc); }
.outreach-tab-content { display: none; }
.outreach-tab-content.active { display: block; }

/* Lead detail panel */
.lead-detail { background: var(--bg-card, #1e1e2e); border-radius: 8px; padding: 1.5rem; margin-top: 1rem; }
.lead-detail h3 { margin-bottom: 1rem; }
.lead-detail .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lead-detail .detail-field { margin-bottom: 0.75rem; }
.lead-detail .detail-label { font-size: 0.8rem; color: var(--text-light, #a0a0b8); margin-bottom: 0.25rem; }
.lead-detail .mockup-previews { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 1rem 0; }
.lead-detail .mockup-thumb { border: 2px solid transparent; border-radius: 4px; cursor: pointer; text-align: center; padding: 0.5rem; background: var(--bg-main, #16161e); }
.lead-detail .mockup-thumb.preferred { border-color: var(--primary, #7c5cfc); }
.lead-detail .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.lead-detail .timeline { margin-top: 1rem; }
.lead-detail .timeline-item { padding: 0.5rem 0; border-bottom: 1px solid var(--border, #2a2a3a); font-size: 0.85rem; }

/* Campaign cards */
.campaign-card { background: var(--bg-card, #1e1e2e); border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; }
.campaign-card .campaign-info { flex: 1; }
.campaign-card .campaign-actions { display: flex; gap: 0.5rem; }

/* Needs email queue */
.email-queue-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem; background: var(--bg-card, #1e1e2e); border-radius: 6px; margin-bottom: 0.5rem; }
.email-queue-item .queue-info { flex: 1; }
.email-queue-item input { flex: 0 0 250px; }

/* Settings form */
.outreach-settings-form { max-width: 600px; }
.outreach-settings-form .form-section { margin-bottom: 2rem; }
.outreach-settings-form .form-section h3 { margin-bottom: 1rem; font-size: 1rem; }
