:root {
    --primary:     #5082f7;
    --muted:       #697287;
    --bg:          #f5f7fa;
    --secondary:   #4f39f3;
    --card:        #fff;
    --sel:         #4f46e5;
    --danger:      #ef4444;
    --sidebar-bg:  #f0f0f0;
    --success:     #34D399;
    --text-secondary: #312c85; /* Dark grey for primary headings/nav */
    --text-tertiary:  #737373; /* Lighter grey for sub-headings */
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    height: 100vh;
    overflow: hidden;
  }
  
  .app-container {
  display: flex;
  height: 100%;
}

/* Hide mobile login header on desktop */
.mobile-login-header {
  display: none;
}
  
  /* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  flex-shrink: 0;
}
  
/* styles.css */

.login-panel {
    margin-top: auto;
    text-align: center;
    /* optional extra space below button */
    padding-bottom: 1rem;
  }
  
/* Job Match Analysis Styles */
.loading {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  margin: 1rem 0;
}

.error {
  color: var(--danger);
  padding: 10px;
  border-radius: 4px;
  background-color: rgba(239, 68, 68, 0.1);
}

/* Consistent button styling across the application */
.view-match-details-btn,
.search-button,
.add-source-btn,
.generate-email-btn,
.rewrite-cv-btn,
.open-email-btn,
button[id$="SearchJobs"] {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Travel Range Styles */
.travel-range-button {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 5px 0;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Map Container Styles */
#map-container {
  width: 100%;
  margin-bottom: 20px;
}

#map {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  border: 1px solid #ddd;
  position: relative;
  overflow: hidden;
}

/* Fallback map styling */
.fallback-map {
  width: 100%;
  height: 100%;
  background-color: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.fallback-map-inner {
  text-align: center;
  padding: 2rem;
  max-width: 80%;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fallback-map-icon {
  margin-bottom: 1rem;
  color: var(--primary);
}

.fallback-location {
  color: #333;
  line-height: 1.5;
}

.fallback-location p {
  margin: 0.5rem 0;
}

/* Notification styling - DEPRECATED and replaced by div.notification styles below */

.travel-range-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.range-slider-container {
  display: flex;
  flex-direction: column;

}

.range-slider-container label {
  font-weight: 500;
}

/* Range Slider Base Styles - with high specificity */
.travel-range-controls .range-slider-container input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: #e0e0e0 !important;
  outline: none !important;
  border-radius: 3px !important;
  margin: 10px 0 !important;
  accent-color: #896bcf !important;
  border: none !important;
  color: #896bcf !important;
}

/* Thumb styles with maximum specificity */
.travel-range-controls .range-slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  background: #896bcf !important; /* Purple theme color */
  border-radius: 50% !important;
  cursor: pointer !important;
  border: 2px solid white !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
  margin-top: -7px !important;
}

.travel-range-controls .range-slider-container input[type="range"]::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
  background: #896bcf !important; /* Purple theme color */
  border-radius: 50% !important;
  cursor: pointer !important;
  border: 2px solid white !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

/* Track progress styling with higher specificity */
.travel-range-controls .range-slider-container input[type="range"]::-webkit-slider-runnable-track {
  height: 6px !important;
  background: linear-gradient(to right, #896bcf 0%, #896bcf var(--range-progress, 50%), #e0e0e0 var(--range-progress, 50%)) !important;
  border-radius: 3px !important;
  border: none !important;
}

.travel-range-controls .range-slider-container input[type="range"]::-moz-range-track {
  height: 6px !important;
  background: #e0e0e0 !important;
  border-radius: 3px !important;
  border: none !important;
}

.travel-range-controls .range-slider-container input[type="range"]::-moz-range-progress {
  height: 6px !important;
  background-color: #896bcf !important; /* Purple theme color */
  border-radius: 3px !important;
}

/* Ensure all browsers have the correct color */
.travel-range-controls .range-slider-container input[type="range"]::-ms-thumb {
  background: #896bcf !important;
  border: 2px solid white !important;
}

.travel-range-controls .range-slider-container input[type="range"]::-ms-fill-lower {
  background: #896bcf !important;
}

/* Ensures Chrome and Safari show the purple */
.travel-range-controls .range-slider-container input[type="range"]:focus {
  outline: none !important;
}

.travel-range-controls .range-slider-container input[type="range"]:focus::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #896bcf 0%, #896bcf var(--range-progress, 50%), #e0e0e0 var(--range-progress, 50%)) !important;
}

.buttons-container {
  display: flex;
  justify-content: flex-end;

  margin-top: 15px;
}

.save-button {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.save-button:hover {
  background-color: var(--primary);
}

/* Ensure Upload CV and Search Saved buttons have the same size */
#uploadCvBtn,
#searchJobsBtn {
  line-height: 1.5; /* match input line height */
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 140px;
}

.view-match-details-btn:hover,
.search-button:hover,
.add-source-btn:hover,
button[id$="SearchJobs"]:hover,
#uploadCvBtn:hover,
#searchJobsBtn:hover {
  background-color: var(--primary);
}

.match-details-container {
  margin-top: 12px;
}

.match-details-content {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: rgba(80, 130, 247, 0.1);
  border: 1px solid rgba(80, 130, 247, 0.2);
}

.match-summary {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e5e5;
}

.summary-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.match-summary p {
  flex: 1;
  margin-right: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

/* Match score in the match details view */
.match-summary .match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  position: static;
  width: auto;
  height: auto;
  background-color: transparent;
  border-radius: 0;
  margin-top: 0;
  padding-right: 0;
}

/* Inline match score in the match details view */
.inline-match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  text-align: center;
}

/* Match score value styling */
.match-score-value {
  font-size: 42px;
  font-weight: bold;
  color: var(--primary);
  line-height: 1;
}

/* Inline match score value styling */
.inline-match-score .match-score-value {
  font-size: 35px;
  font-weight: bold;
  color: var(--primary) !important;
  line-height: 1;
}

/* Additional specificity for match details view */
.match-summary .summary-content .inline-match-score .match-score-value {
  color: var(--primary) !important;
  font-size: 35px;
}

.match-score-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: normal;
  text-transform: uppercase;
}

/* Match score value in job listings */
.job-entry .match-score-value,
.cv-entry .match-score-value {
  color: white;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.match-score-label {
  font-size: 12px;
  color: var(--muted);
}

.match-details {
  display: flex;
  gap: 30px;
}

@media (max-width: 768px) {
  .match-details {
    flex-direction: column;
  }
}

.matches-section, .mismatches-section {
  flex: 1;
}

.matches-section h4, .mismatches-section h4 {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.matches-list, .mismatches-list {
  list-style: none;
  padding: 0;
}

.matches-list .match-item, .mismatches-list .mismatch-item {
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}

.matches-list .match-item {
  background-color: rgba(52, 211, 153, 0.1);
  border-left: 4px solid #34D399;
}

.mismatches-list .mismatch-item {
  background-color: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #EF4444;
}

.match-category, .mismatch-category {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.match-category {
  color: #047857;
}

.mismatch-category {
  color: #B91C1C;
}

.match-detail, .mismatch-detail {
  display: block;
  color: #4B5563;
}

/* Candidate selection styles */
/* Consistent search box styling */
.semantic-search {
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 20px;
  background: transparent;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  border: none;
}


#searchJobsInput {
  flex-grow: 1; /* Input takes available space */
  box-sizing: border-box;
  padding: 50 1rem; /* 50px height total */
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#searchJobsBtn {
  line-height: 1.5; /* match input line height */
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 0.9rem; /* adjust for 50px height */
  height: 50px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  /* Add other button styles like background, color, border as needed */
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#searchJobsBtn i {
  margin-right: 0px; /* Space between icon and text */
}

/* Ensure text in confirm modal wraps */
.confirm-modal p {
  white-space: normal;
  word-break: break-word;
}

/* Ensure identical height for search controls */
.semantic-search #searchJobsInput,
.semantic-search #searchJobsBtn {
  height: 52px;
  line-height: 52px;
  /* narrower horizontal padding for button */
  padding: 0 1rem;
}

.semantic-search #searchJobsBtn {
  padding-left: 0.3rem; /* Smaller left padding for magnifying glass */
}

/* Settings page styles */
.centered-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Dashboard page gets wider layout */
#dashboardPage .centered-container {
  max-width: 1400px;
  padding: 20px 40px;
}

.page h2 {
  color: var(--text-secondary); /* Secondary heading color */
  margin: 24px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  max-width: 1400px;
  padding: 20px 40px;
}

.page h2 i {
  color: var(--primary); /* Keep icons purple */
}

/* Typography & spacing tweaks */
.sidebar .nav-link {
  color: var(--text-secondary);
  font-size: 14px;
}

.page h3 {
  color: var(--text-tertiary);
  margin-top: 24px;
}

.page h4 {
  margin-top: 16px;
}

/* Consistent card styling across the application */
.settings-section,
.cv-entry,
.job-entry {
  box-sizing: border-box; /* ADDED */
  width: 100%; /* ADDED */
  background-color: var(--card);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cv-entry:hover,
.job-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Consistent job and CV entry styling */
.job-entry,
.cv-entry {
  position: relative;
  border-left: 3px solid var(--primary);
}

/* Match score badge in job and CV listings */
.job-entry .match-score,
.cv-entry .match-score {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: white;
  border-radius: 15px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.job-entry-title,
.cv-entry-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  padding-right: 50px; /* Make room for the score */
}

.job-entry-details,
.cv-entry-details {
  display: flex;
  flex-wrap: wrap;

  margin-bottom: 15px;
  font-size: 14px;
  color: var(--muted);
}

.job-entry-details span,
.cv-entry-details span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.job-entry-details i,
.cv-entry-details i {
  color: var(--primary);
  font-size: 14px;
}

.settings-section h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Data Sources styles */
.data-sources-container {
  margin-top: 15px;
}

.data-sources-list {
  margin-bottom: 20px;
}

.data-source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background-color: #f9f9f9;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 3px solid var(--primary);
}

.data-source-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.data-source-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.data-source-url {
  font-size: 13px;
  color: var(--muted);
  word-break: break-all;
}

.data-source-controls {
  display: flex;
  align-items: center;

}

.toggle-source {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-source input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-source-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-source-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-source-slider {
  background-color: var(--success);
}

input:checked + .toggle-source-slider:before {
  transform: translateX(20px);
}

.delete-source-btn {
  background-color: transparent;
  color: var(--danger);
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  transition: color 0.2s;
}

.delete-source-btn:hover {
  color: #cc0000;
}

.add-data-source form {
  display: flex;
  flex-wrap: wrap;

  align-items: center;
}

/* Writing Style styles */
.settings-description {
  color: var(--muted);
  margin-bottom: 15px;
  font-size: 14px;
}

.writing-style-container {
  margin-top: 15px;
}

.example-letters-list {
  margin-bottom: 20px;
}

.example-letter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background-color: #f9f9f9;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 3px solid var(--primary);
}

.example-letter-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.example-letter-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.example-letter-preview {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.example-letter-controls {
  display: flex;
  align-items: center;

}

.view-letter-btn,
.delete-letter-btn {
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  transition: color 0.2s;
}

.view-letter-btn {
  color: var(--primary);
}

.view-letter-btn:hover {
  color: var(--primary);
}

.delete-letter-btn {
  color: var(--danger);
}

.delete-letter-btn:hover {
  color: #cc0000;
}

.add-example-letter form {
  display: flex;
  flex-direction: column;

}

.form-row {
  display: flex;

  align-items: center;
}

.add-example-letter textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  width: 100%;
}

.add-letter-btn {
  display: inline-block;
  padding: 10px 16px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
  white-space: nowrap;
}

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

/* Brand Logo Section */
.brand-logo-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.current-logo-display {
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.current-logo-display.has-logo {
  border-style: solid;
  border-color: var(--primary);
  background: white;
}

.no-logo-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #6b7280;
}

.no-logo-message i {
  font-size: 24px;
  color: #9ca3af;
}

.current-logo-img {
  max-width: 200px;
  max-height: 100px;
  object-fit: contain;
  border-radius: 4px;
}

.logo-upload-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logo-url-option {
  display: flex;
  gap: 8px;
  align-items: center;
}

.logo-url-option input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
}

.upload-logo-btn,
.remove-logo-btn,
.add-logo-url-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.upload-logo-btn {
  background: var(--primary);
  color: white;
}

.upload-logo-btn:hover {
  background: var(--secondary);
  transform: translateY(-1px);
}

.remove-logo-btn {
  background: #ef4444;
  color: white;
}

.remove-logo-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.add-logo-url-btn {
  background: #10b981;
  color: white;
}

.add-logo-url-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Email and Copy buttons reuse the CV action styles */
.match-details-content .cv-actions-container {
  display: flex;
  justify-content: flex-end;

  margin-top: 15px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .match-details-content .cv-actions-container {
    justify-content: stretch;
  }
  
  .generate-email-btn,
  .rewrite-cv-btn {
    flex: 1;
    min-width: 120px;
  }
}

/* Notification styles */
div.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 0;
  z-index: 1000;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  width: auto;
  max-width: 340px;
  min-width: 280px;
  height: auto;
}

div.notification.show {
  transform: translateY(0);
  opacity: 1;
}

div.notification .notification-content {
  display: flex;
  align-items: center;
  padding: 12px 15px;

  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

div.notification i {
  margin-right: 8px;
  font-size: 16px;
  flex-shrink: 0;
}

div.notification.success {
  background-color: rgba(236, 253, 245, 0.95);
  border-left: 2px solid #10b981;
}

div.notification.success i {
  color: #10b981 !important;
}



/* Ensure Font Awesome circle-check icon matches */
.fa-circle-check {
  color: #10b981 !important;
}

div.notification.error {
  background-color: rgba(254, 242, 242, 0.95);
  border-left: 2px solid #ef4444;
}

div.notification.error i {
  color: #ef4444;
}

div.notification.info {
  background: #e8dff5;
  border: 1px solid #c7b3e5;
  color: var(--primary);
}

div.notification.info i {
  color: var(--primary);
}

/* Modal styles for viewing letters */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--bg);
  box-sizing: border-box;
  margin: 20px auto;
  padding: 0;
  border-radius: 8px;
  width: min(90vw, 1000px);
  max-width: 1000px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Smaller modal content for confirmations */
.confirm-modal {
  overflow-x: hidden; /* no horizontal scroll */
}
.confirm-modal .modal-content {
  overflow-x: hidden;
  max-width: 400px;
  width: 80%;
}

/* Button styling for modal actions */
.primary-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  margin: 5px 0;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  font-weight: 500;
}

.primary-btn:hover {
  background-color: #5f43b2;
}

.secondary-btn {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 8px 16px;
  margin: 5px 0;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  font-weight: 500;
}

.secondary-btn:hover {
  background-color: #e5e7eb;
}

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

.modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg);
  border-radius: 8px 8px 0 0;
}

.modal-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
}

.close-modal {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  background: none;
  border: none;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--text);
  text-decoration: none;
}

.modal-body {
  padding: 20px;
  overflow-x: auto;
  overflow-y: auto;
  flex: 1;
  max-height: calc(90vh - 120px);
  color: var(--text);
  white-space: nowrap;
}

.email-content {
  margin-bottom: 30px;
}

.email-field {
  margin-bottom: 20px;
}

.email-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 600;
}

.email-subject {
  background-color: #f8f9fa;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 0;
  font-weight: 500;
  border: 1px solid #e5e7eb;
}

.email-textarea {
  width: 100%;
  height: 300px;
  max-height: calc(90vh - 250px);
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background-color: #f8f9fa;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  box-sizing: border-box;
  overflow-y: auto !important;
  word-break: break-word;
  overflow-wrap: break-word;
}



.email-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.copy-email-btn,
.open-email-btn {
  padding: 12px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border: 2px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  min-width: 140px;
  justify-content: center;
}

.copy-email-btn:hover,
.open-email-btn:hover {
  background: rgba(80, 130, 247, 0.1);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.open-email-btn i { 
  color: #fff !important;
}

/* ensure consistent purple hover for open email btn */
.open-email-btn:hover {
  background: var(--primary) !important;
  color:#fff !important;
  border-color: var(--primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .modal-header,
  .modal-body {
    padding: 20px;
  }
  
  .email-actions {
    justify-content: stretch;
  }
  
  .copy-email-btn,
  .open-email-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Consistent input field styling across the application */
.add-data-source input,
.search-input,
input[type="search"],
input[type="text"],
input[type="url"],
select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  flex: 1;
  min-width: 150px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.add-data-source input:focus,
.search-input:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="url"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(137, 107, 207, 0.2);
}

.add-source-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

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

.no-sources-message {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  font-style: italic;
  background-color: #f9f9f9;
  border-radius: 6px;
}

.no-letters-message {
  text-align: center;
  color: #a1a5b3;
  padding: 20px;
  font-style: italic;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  font-size: 14px;
}

.no-letters-message p {
  margin: 0;

}

.no-cvs-message {
  text-align: center;
  color: #a1a5b3;
  padding: 20px;
  font-style: italic;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  font-size: 14px;
}

.no-cvs-message p {
  margin: 0;

}

.candidate-selection {
  margin-bottom: 20px;
  border: 1px solid #e5e5e5;
  padding: 12px;
  border-radius: 6px;
  background-color: #f5f5f5;
}

.candidate-selection label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--primary);
}

#candidateSelect {
  width: 100%;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#candidateSelect:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(137, 107, 207, 0.25);
}


  .login-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
  }

  /* outline it instead */
    .login-btn {
        border: 2px solid var(--primary);
        background: transparent;
        color: var(--primary);
    }


  .logo {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background .2s, color .2s;
  }
  .nav-link.selected,
  .nav-link:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
  }
  
  /* ── Page Layout ─────────────────────────────────────────────────────── */
  .page {
    display: none;
    padding: 2rem;
  }
  .page.active {
    display: block;
  }
  .centered-container {
    max-width: 600px;
    margin: 0 auto;
  }
  
  /* ── Main Content Scroll ─────────────────────────────────────────────── */
  .main-content {
    flex: 1;
    overflow-y: auto;
  }
  
  /* ── Retained Styles Below ───────────────────────────────────────────── */
  
  /* Source Picker & Search Box */
  .sources {
    display: flex;
    gap: 1em;
    width: 100%;
    max-width: 600px;
  }
  .source-card {
    flex: 1;
    padding: 1em;
    text-align: center;
    background: var(--card);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    transition: border .2s, background .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .source-card.selected {
    border-color: var(--sel);
    background: rgba(79,70,229,0.1);
  }
  .source-card img {
    width: 60px;
    height: 50px;
    margin-bottom: .4em;
    object-fit: contain;
  }



  .search-box {
    margin-top: 1em;
    display: flex;
    width: 100%;
    max-width: 600px;
    background: var(--card);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
  }
  .search-box.loading::after {
    content:'';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg,transparent,rgba(255,255,255,0.7),transparent);
    animation: shine 1s infinite;
  }
  @keyframes shine { to { left:100%; } }
  
  .search-input,
  .location-input {
    flex: 1;
    border: none;
    padding: 1em;
    font-size: 1rem;
    outline: none;
  }
  .search-button {
    padding: 0 1.5em;
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
  }
  .search-button:hover { background: var(--primary); }
  
  /* Results & Saved */
  .results {
    margin-top: 1em;
    width: 100%;
    max-width: 1000px;
    display: grid;
    gap: 1.5em;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    /* center in screen */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
  
  /* Card styles */
  .result-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    position: relative;
  }
  
  /* New emblem styles - inline version */
  .new-emblem-inline {
    display: inline-block;
    margin-left: 0px;
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  }
  
  .new-emblem-inline.fade-out {
    opacity: 0;
    transform: scale(0.8);
  }
  
  /* Ensure job-entry has relative positioning for emblem */
  .job-entry {
    position: relative;
  }
  .result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
  }
  .result-title {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-title::before {
    content: "💼";
    font-size: 1.1rem;
  }
  .result-company {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-company::before {
    content: "🏢";
    font-size: 1rem;
  }
  .result-location {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-location::before {
    content: "📍";
    font-size: 0.9rem;
  }
  .result-education {
    background: rgba(137, 107, 207, 0.1);
    color: var(--primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-education::before {
    content: "🎓";
    font-size: 0.9rem;
  }
  .result-job-history,
  .result-requirements {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.5rem;
  }
  .result-job-history h4,
  .result-requirements h4 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-job-history h4::before {
    content: "📅";
    font-size: 1rem;
  }
  .result-requirements h4::before {
    content: "📋";
    font-size: 1rem;
  }
  .result-job-history ul,
  .result-requirements ul {
    list-style: none;
    padding-left: 0;
  }
  .result-job-history li,
  .result-requirements li {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .result-job-history li::before,
  .result-requirements li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
  }
  .save-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  .save-btn::before {
    content: "��";
    font-size: 0.9rem;
  }
  .save-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
  }
  .result-relevancy {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-relevancy::before {
    content: "📊";
    font-size: 0.8rem;
  }
  
  /* Chat Panel */
  #chatContainer {
    margin-top: 1rem;
    width: 100%;
    max-width: 600px;
    background: var(--card);
    border: 2px solid #ddd;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #chatWindow {
    flex: 1;
    padding: 1em;
    overflow-y: auto;
    max-height: 300px;
  }
  .chat-message { margin-bottom: 1em; display: flex; }
  .chat-message.user      { justify-content: flex-end; }
  .chat-message.assistant { justify-content: flex-start; }
  .bubble {
    max-width: 80%;
    padding: .5em 1em;
    border-radius: 1rem;
  }
  .user .bubble {
    background: var(--primary);
    color: #fff;
    border-radius: 1rem 1rem 0 1rem;
  }
  .assistant .bubble {
    background: #eee;
    color: #333;
    border-radius: 1rem 1rem 1rem 0;
  }
  
  #chatInputBox {
    display: flex;
    border-top: 1px solid #ddd;
    position: relative;
  }
  #chatInputBox.loading::after {
    content:'';
    position:absolute; top:0; left:-100%;
    width:100%; height:100%;
    background:linear-gradient(120deg,transparent,rgba(255,255,255,0.7),transparent);
    animation:shine 1s infinite;
  }
  #chatInput {
    flex:1;
    border:none;
    padding:1em;
    font-size:1rem;
    outline:none;
  }
  #chatSend {
    padding:0 1em;
    background:var(--primary);
    color:#fff;
    border:none;
    cursor:pointer;
    transition:background .2s;
  }
  #chatSend:hover { background: var(--primary); }
  
  /* Environment Toggle */
  .env-toggle {
    position: fixed;
    bottom: 1em;
    right: 1em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: var(--card);
    padding: 0.5em 1em;
    border-radius: 0.5em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.8rem;
    z-index: 100;
  }
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
  }
  .toggle-switch input {
    opacity: 0; width: 0; height: 0;
  }
  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
  }
  .toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 2px; bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }
  input:checked + .toggle-slider {
    background-color: var(--primary);
  }
  input:checked + .toggle-slider:before {
    transform: translateX(20px);
  }
  .using-cloud {
    color: var(--primary);
    font-weight: 600;
  }
  .using-local {
    color: var(--danger);
    font-weight: 600;
  }
  
  /* Logo image + text */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
  }
  
  .logo-img {
    width: 120px;
    height: auto;
    max-width: 100%;
  }
  
  .logo-text {
    font-family: 'Inter', sans-serif;  /* or swap in another font */
    font-weight: 700;                  /* nice bold */
    font-size: 1.5rem;                 /* matches the old size */
    color: #333;                       /* dark, legible */
  }



  /* ── Full-screen AI Chat ─────────────────────────────────────────── */

/* Make the chat page itself fill the available area */
/* Only make the chat page full-screen when it has .active */
.page#chatPage.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4rem);
    padding: 2rem;
    box-sizing: border-box;
  }
  
  /* Let chatContainer grow to fill the space, and remove its max-width */
  #chatContainer {
    flex: 1;
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
  }
  
  /* Make the message window scroll and fill all but the input */
  #chatWindow {
    flex: 1;
    max-height: none;
    overflow-y: auto;
  }
  
  /* Keep the input box stuck to the bottom */
  #chatInputBox {
    margin-top: 1rem;
    flex-shrink: 0;
  }

/* Bench Page and Jobs Page Styles */
#benchPage,
#jobsPage {
  padding: 2rem;
  background: var(--bg);
}

#benchPage .centered-container,
#jobsPage .centered-container,
#settingsPage .centered-container {
  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto;
  background: var(--card);
  padding: 20px; /* reduced left padding for tighter title alignment */
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}





/* Unified section & page title style */
#benchPage h2,
#jobsPage h2,
#settingsPage h2,
#benchPage h3,
#jobsPage h3,
#settingsPage h3 {
  /* title aligned with default padding */ /* nudge text left while border remains */
  margin: 0 0 24px 0;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}


/* Unified left-aligned page titles */
#dashboardPage h2,
#benchPage h2,
#jobsPage h2,
#settingsPage h2 {
  position: relative;
  padding-left: 20px; /* space for stripe */
}

/* Icon styling in page headers */
#benchPage h2 i,
#jobsPage h2 i,
#settingsPage h2 i {
  font-size: 1.5rem;
  width: 1.5rem;
  text-align: center;
  color: var(--primary);
}


#cvUpload {
  display: none;
}

#uploadCvBtn,
#fetchJobsBtn,
#searchJobsBtn {
  line-height: 1.5; /* match input line height */
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.95rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#uploadCvBtn:hover,
#fetchJobsBtn:hover,
#searchJobsBtn:hover {
  background: var(--primary);
  transform: translateY(-1px);
}


#fetchJobsBtn::before {
  content: "🌐";
  font-size: 1.1rem;
}

/* Removed emoji from searchJobsBtn as we now use Font Awesome icon */
#searchJobsBtn::before {
  content: "";
}

#cvList,
#jobsList {
  box-sizing: border-box; /* ADDED */
  width: 100%;
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#cvList li {
  background: var(--bg);
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
}

#cvList li:hover {
  transform: none;
  box-shadow: none;
  border-color: #e5e7eb;
}

#cvList li::before {
  content: none;
}

#jobsList li::before {
  content: none;
}

/* CV entry actions container */
.cv-actions-container {
  display: flex;
  gap: 8px; /* space between action buttons */
  align-items: center;
}

/* CV entry action buttons */
.cv-download-link, .cv-config-link, .cv-delete-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  color: var(--muted);
  text-decoration: none;
}

.cv-download-link:hover,
.cv-config-link:hover,
.cv-delete-link:hover {
  background-color: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Clean up nested icon styling */
.cv-download-link .cv-entry-icon,
.cv-config-link .cv-entry-icon,
.cv-delete-link .cv-entry-icon {
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-download-link .cv-entry-icon i,
.cv-config-link .cv-entry-icon i,
.cv-delete-link .cv-entry-icon i {
  font-size: 16px;

}

/* Override modal button styles when used as action buttons in job details */
.cv-delete-link.copy-email-btn,
.cv-download-link.email-match-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 0;
  gap: 0;
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-delete-link.copy-email-btn:hover,
.cv-download-link.email-match-btn:hover {
  background-color: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Disable icon transitions and hover effects within action buttons */
.cv-delete-link.copy-email-btn .cv-entry-icon,
.cv-download-link.email-match-btn .cv-entry-icon {
  transition: none;
  background: none !important;
  transform: none !important;
}

.cv-delete-link.copy-email-btn:hover .cv-entry-icon,
.cv-download-link.email-match-btn:hover .cv-entry-icon {
  background: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Job entry styling to match CV entries */
.job-entry {
  background: #ffffff;
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.job-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}

.job-entry-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.job-entry-title {
  flex: 1;
  margin-right: 8px;
}

.job-similarity-score {
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* New score container and breakdown styles */
.job-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.job-final-score {
  background: linear-gradient(135deg, #5082f7 0%, #4f39f3 100%);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 45px;
  text-align: center;
}

.score-breakdown {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.score-breakdown small {
  display: flex;
  gap: 0.25rem;
}

.score-breakdown span {
  background-color: #f5f5f5;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

/* Match status info styling */
.match-status-info {
  background-color: #f8f9fa;
  color: var(--muted);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
}

.match-status-info i {
  color: var(--primary);
}

.job-entry-details {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.job-entry-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-details-container {
  margin-top: 0.5rem;
}

.view-match-details-btn,
.open-job-link-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}

.open-job-link-btn {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.view-match-details-btn:hover,
.generate-email-btn:hover,
.rewrite-cv-btn:hover,
.open-email-btn:hover {
  background: rgba(80, 130, 247, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(80, 130, 247, 0.2);
}

.generate-email-btn i,
.rewrite-cv-btn i { color:#fff !important; }

.open-job-link-btn:hover {
  background: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(80, 130, 247, 0.2);
}

.view-match-details-btn:active,
.open-job-link-btn:active {
  transform: translateY(0);
}

/* Semantic Search Box */
.semantic-search {
  margin: 2rem 0;
  display: flex;
  width: 100%;
}

.semantic-search .search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  /* Remove the default search input styling with the arrow */
  -webkit-appearance: none;
  appearance: none;
}

/* Remove the clear button (x) from search inputs in webkit browsers */
.semantic-search .search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.semantic-search .search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(137, 107, 207, 0.1);
}

/* Job Result Card Additional Sections */
.result-summary {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg);
  border-radius: 0.5rem;
  border-left: 3px solid var(--primary);
}

.result-summary h4 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-summary h4::before {
  content: "📝";
  font-size: 1rem;
}

.result-summary p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.result-similarity {
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(137, 107, 207, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.result-similarity::before {
  content: "🔍";
  font-size: 1.1rem;
}

.similarity-score {
  font-weight: 600;
  color: var(--primary);
}

.similarity-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-links {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.result-link:hover {
  background: rgba(137, 107, 207, 0.1);
  transform: translateY(-1px);
}

.result-link::before {
  content: "🔗";
  font-size: 0.9rem;
}

.result-link.linkedin::before {
  content: "💼";
}

.result-link.indeed::before {
  content: "📋";
}

.result-link.google::before {
  content: "🔍";
}

/* Additional Job Details */
.result-details {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.result-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 0.5rem;
}

.result-detail-item::before {
  font-size: 1rem;
}

.result-detail-item.salary::before {
  content: "💰";
}

.result-detail-item.type::before {
  content: "⏱️";
}

.result-detail-item.experience::before {
  content: "📈";
}

.result-detail-item.posted::before {
  content: "📅";
}

.result-detail-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.result-detail-value {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
}

/* CV Entries Styling */
#cvList {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.cv-entry {
  box-sizing: border-box; /* ADDED */
  width: 100%; /* ADDED */
  background-color: #ffffff !important;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  border: 1px solid rgba(137, 107, 207, 0.1);
  position: relative;
}

/* Hide all document emoji icons */
.cv-entry > img,
.cv-entry img,
.cv-entry-content + img,
li.cv-entry > img:first-child,
.cv-entry > .emoji,
.cv-entry-content ~ .emoji,
.cv-entry-content img,
.cv-entry-content ~ img,
.cv-entry-role ~ img,
.cv-entry-content + *,
.cv-entry > *:nth-child(1):not(.cv-entry-content),
.cv-entry > *:nth-child(2):not(.cv-entry-content) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  opacity: 0 !important;
  left: -9999px !important;
  pointer-events: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.cv-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  border-color: rgba(137, 107, 207, 0.3);
}

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

.cv-entry-icon {
  font-size: 1.5rem;
  color: var(--primary);
  background-color: rgba(137, 107, 207, 0.1);
  border-radius: 0.5rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cv-download-link {
  text-decoration: none;
  cursor: pointer;
}

.cv-entry-content {
  flex: 1;
}

.cv-entry-title {
  font-size: 1.2rem;
  color: #000;
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.cv-entry-filename {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: capitalize;
}

.cv-entry-role {
  background-color: rgba(137, 107, 207, 0.07);
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.75rem;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.4;
  border-left: 3px solid var(--primary);
  max-width: 100%;
}

.cv-entry-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.cv-entry-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.cv-entry-detail i {
  color: var(--primary);
  width: 1rem;
  text-align: center;
}

.cv-entry-actions {
  display: flex;
  justify-content: flex-end;
}

/* Fix for mobile responsiveness */
@media (max-width: 640px) {
  .cv-entry-role {
    max-width: 100%;
  }
  
  .cv-entry-detail {
    width: 100%;
  }
  
  .search-by-description-btn {
    width: 100%;
    justify-content: center;
  }
}

.search-by-description-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-by-description-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-by-description-btn:active {
  transform: translateY(0);
}

.search-by-description-btn i {
  margin-right: 0px; /* Space between icon and text - smaller spacing */
}

/* Button Styles for Bench and Jobs Pages */
.file-upload-container {  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 1rem 0;
  background-color: var(--card);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 200px;
  position: relative;
}

.file-upload-container.drag-over {
  border-color: var(--primary);
  background-color: rgba(137, 107, 207, 0.05);
}

.drop-message {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--muted);
  text-align: center;
}

.semantic-search {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.file-upload-label,
#uploadCvBtn,
.search-by-description-btn,
#fetchJobsBtn,
#searchJobsBtn {
  line-height: 1.5; /* match input line height */
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: var(--primary);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-label:hover,
#uploadCvBtn:hover,
.search-by-description-btn:hover,
#fetchJobsBtn:hover,
#searchJobsBtn:hover {
  background: rgba(80, 130, 247, 0.1);
  border-color: var(--primary);
  transform: translateY(-0.5px);
}

.file-upload-label i,
#uploadCvBtn i,
#fetchJobsBtn i,
#searchJobsBtn i {
  font-size: 1.1rem;
}

#uploadCvBtn i {
  margin-right: 2px; /* Consistent 2px spacing with other buttons */
}

/* Similarity Score Styling */
.similarity-score-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background-color: rgba(137, 107, 207, 0.1);
  width: fit-content;
}

.similarity-score-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.similarity-score-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.25rem 0.5rem;
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.job-url {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
  background-color: rgba(137, 107, 207, 0.08);
  border-radius: 0.4rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.job-url:hover {
  background-color: rgba(137, 107, 207, 0.15);
  border-color: rgba(137, 107, 207, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.job-url i {
  margin-right: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Filter stats and no results message */
.filter-stats {
  background-color: #f9f9f9;
  border-left: 3px solid var(--primary);
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--muted);
}

.no-results-message {
  background-color: #f9f9f9;
  border-left: 3px solid #e67e22;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  text-align: center;
}

.no-results-message p {
  margin: 5px 0;
  color: var(--text);
}

.no-results-message p:first-child {
  font-weight: 600;
  font-size: 16px;
}

/* Go to Settings button styling */
.go-to-settings-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.go-to-settings-btn:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.go-to-settings-btn:active {
  transform: translateY(0);
}

/* Candidate Selection Styling */
label[for="candidateSelect"] {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

#candidateSelect {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #ddd;
  font-size: 14px;
  background-color: white;
  color: #333;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23896bcf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#candidateSelect:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(137, 107, 207, 0.25);
}


  .login-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
  }

  /* outline it instead */
    .login-btn {
        border: 2px solid var(--primary);
        background: transparent;
        color: var(--primary);
    }


  .logo {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background .2s, color .2s;
  }
  .nav-link.selected,
  .nav-link:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
  }
  
  /* ── Page Layout ─────────────────────────────────────────────────────── */
  .page {
    display: none;
    padding: 2rem;
  }
  .page.active {
    display: block;
  }
  .centered-container {
    max-width: 600px;
    margin: 0 auto;
  }
  
  /* ── Main Content Scroll ─────────────────────────────────────────────── */
  .main-content {
    flex: 1;
    overflow-y: auto;
  }
  
  /* ── Retained Styles Below ───────────────────────────────────────────── */
  
  /* Source Picker & Search Box */
  .sources {
    display: flex;
    gap: 1em;
    width: 100%;
    max-width: 600px;
  }
  .source-card {
    flex: 1;
    padding: 1em;
    text-align: center;
    background: var(--card);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    transition: border .2s, background .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .source-card.selected {
    border-color: var(--sel);
    background: rgba(79,70,229,0.1);
  }
  .source-card img {
    width: 60px;
    height: 50px;
    margin-bottom: .4em;
    object-fit: contain;
  }



  .search-box {
    margin-top: 1em;
    display: flex;
    width: 100%;
    max-width: 600px;
    background: var(--card);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
  }
  .search-box.loading::after {
    content:'';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg,transparent,rgba(255,255,255,0.7),transparent);
    animation: shine 1s infinite;
  }
  @keyframes shine { to { left:100%; } }
  
  .search-input,
  .location-input {
    flex: 1;
    border: none;
    padding: 1em;
    font-size: 1rem;
    outline: none;
  }
  .search-button {
    padding: 0 1.5em;
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
  }
  .search-button:hover { background: var(--primary); }
  
  /* Results & Saved */
  .results {
    margin-top: 1em;
    width: 100%;
    max-width: 1000px;
    display: grid;
    gap: 1.5em;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    /* center in screen */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
  
  /* Card styles */
  .result-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    position: relative;
  }
  
  /* New emblem styles - inline version */
  .new-emblem-inline {
    display: inline-block;
    margin-left: 0px;
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  }
  
  .new-emblem-inline.fade-out {
    opacity: 0;
    transform: scale(0.8);
  }
  
  /* Ensure job-entry has relative positioning for emblem */
  .job-entry {
    position: relative;
  }
  .result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
  }
  .result-title {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-title::before {
    content: "💼";
    font-size: 1.1rem;
  }
  .result-company {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-company::before {
    content: "🏢";
    font-size: 1rem;
  }
  .result-location {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-location::before {
    content: "📍";
    font-size: 0.9rem;
  }
  .result-education {
  background: rgba(137, 107, 207, 0.1);
    color: var(--primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-education::before {
    content: "🎓";
    font-size: 0.9rem;
  }
  .result-job-history,
  .result-requirements {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.5rem;
  }
  .result-job-history h4,
  .result-requirements h4 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-job-history h4::before {
    content: "📅";
    font-size: 1rem;
  }
  .result-requirements h4::before {
    content: "📋";
    font-size: 1rem;
  }
  .result-job-history ul,
  .result-requirements ul {
    list-style: none;
    padding-left: 0;
  }
  .result-job-history li,
  .result-requirements li {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .result-job-history li::before,
  .result-requirements li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
  }
  .save-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  .save-btn::before {
    content: "��";
    font-size: 0.9rem;
  }
  .save-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
  }
  .result-relevancy {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-relevancy::before {
    content: "📊";
    font-size: 0.8rem;
  }
  
  /* Chat Panel */
  #chatContainer {
    margin-top: 1rem;
    width: 100%;
    max-width: 600px;
    background: var(--card);
    border: 2px solid #ddd;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #chatWindow {
    flex: 1;
    padding: 1em;
    overflow-y: auto;
    max-height: 300px;
  }
  .chat-message { margin-bottom: 1em; display: flex; }
  .chat-message.user      { justify-content: flex-end; }
  .chat-message.assistant { justify-content: flex-start; }
  .bubble {
    max-width: 80%;
    padding: .5em 1em;
    border-radius: 1rem;
  }
  .user .bubble {
    background: var(--primary);
    color: #fff;
    border-radius: 1rem 1rem 0 1rem;
  }
  .assistant .bubble {
    background: #eee;
    color: #333;
    border-radius: 1rem 1rem 1rem 0;
  }
  
  #chatInputBox {
    display: flex;
    border-top: 1px solid #ddd;
    position: relative;
  }
  #chatInputBox.loading::after {
    content:'';
    position:absolute; top:0; left:-100%;
    width:100%; height:100%;
    background:linear-gradient(120deg,transparent,rgba(255,255,255,0.7),transparent);
    animation:shine 1s infinite;
  }
  #chatInput {
    flex:1;
    border:none;
    padding:1em;
    font-size:1rem;
    outline:none;
  }
  #chatSend {
    padding:0 1em;
    background:var(--primary);
    color:#fff;
    border:none;
    cursor:pointer;
    transition:background .2s;
  }
  #chatSend:hover { background: var(--primary); }
  
  /* Environment Toggle */
  .env-toggle {
    position: fixed;
    bottom: 1em;
    right: 1em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: var(--card);
    padding: 0.5em 1em;
    border-radius: 0.5em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.8rem;
    z-index: 100;
  }
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
  }
  .toggle-switch input {
    opacity: 0; width: 0; height: 0;
  }
  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
  }
  .toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 2px; bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }
  input:checked + .toggle-slider {
    background-color: var(--primary);
  }
  input:checked + .toggle-slider:before {
    transform: translateX(20px);
  }
  .using-cloud {
    color: var(--primary);
    font-weight: 600;
  }
  .using-local {
    color: var(--danger);
    font-weight: 600;
  }
  
  /* Logo image + text */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
  }
  
  .logo-img {
    width: 120px;
    height: auto;
    max-width: 100%;
  }
  
  .logo-text {
    font-family: 'Inter', sans-serif;  /* or swap in another font */
    font-weight: 700;                  /* nice bold */
    font-size: 1.5rem;                 /* matches the old size */
    color: #333;                       /* dark, legible */
  }



  /* ── Full-screen AI Chat ─────────────────────────────────────────── */

/* Make the chat page itself fill the available area */
/* Only make the chat page full-screen when it has .active */
.page#chatPage.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4rem);
    padding: 2rem;
    box-sizing: border-box;
  }
  
  /* Let chatContainer grow to fill the space, and remove its max-width */
  #chatContainer {
    flex: 1;
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
  }
  
  /* Make the message window scroll and fill all but the input */
  #chatWindow {
    flex: 1;
    max-height: none;
    overflow-y: auto;
  }
  
  /* Keep the input box stuck to the bottom */
  #chatInputBox {
    margin-top: 1rem;
    flex-shrink: 0;
  }

/* Bench Page and Jobs Page Styles */
#benchPage,
#jobsPage {
  padding: 2rem;
  background: var(--bg);
}

#benchPage .centered-container,
#jobsPage .centered-container,
#settingsPage .centered-container {
  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto;
  background: var(--card);
  padding: 20px; /* reduced left padding for tighter title alignment */
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}





/* Unified section & page title style */
#benchPage h2,
#jobsPage h2,
#settingsPage h2,
#benchPage h3,
#jobsPage h3,
#settingsPage h3 {
  /* title aligned with default padding */ /* nudge text left while border remains */
  margin: 0 0 24px 0;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}


/* Unified left-aligned page titles */
#dashboardPage h2,
#benchPage h2,
#jobsPage h2,
#settingsPage h2 {
  position: relative;
  padding-left: 20px; /* space for stripe */
}

/* Icon styling in page headers */
#benchPage h2 i,
#jobsPage h2 i,
#settingsPage h2 i {
  font-size: 1.5rem;
  width: 1.5rem;
  text-align: center;
  color: var(--primary);
}


#cvUpload {
  display: none;
}

#uploadCvBtn,
#fetchJobsBtn,
#searchJobsBtn {
  line-height: 1.5; /* match input line height */
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.95rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#uploadCvBtn:hover,
#fetchJobsBtn:hover,
#searchJobsBtn:hover {
  background: var(--primary);
  transform: translateY(-1px);
}


#fetchJobsBtn::before {
  content: "🌐";
  font-size: 1.1rem;
}

/* Removed emoji from searchJobsBtn as we now use Font Awesome icon */
#searchJobsBtn::before {
  content: "";
}

#cvList,
#jobsList {
  box-sizing: border-box; /* ADDED */
  width: 100%;
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#cvList li {
  background: var(--bg);
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
}

#cvList li:hover {
  transform: none;
  box-shadow: none;
  border-color: #e5e7eb;
}

#cvList li::before {
  content: none;
}

#jobsList li::before {
  content: none;
}

/* CV entry actions container */
.cv-actions-container {
  display: flex;
  gap: 8px; /* space between action buttons */
  align-items: center;
}

/* CV entry action buttons */
.cv-download-link, .cv-config-link, .cv-delete-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  color: var(--muted);
  text-decoration: none;
}

.cv-download-link:hover,
.cv-config-link:hover,
.cv-delete-link:hover {
  background-color: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Clean up nested icon styling */
.cv-download-link .cv-entry-icon,
.cv-config-link .cv-entry-icon,
.cv-delete-link .cv-entry-icon {
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-download-link .cv-entry-icon i,
.cv-config-link .cv-entry-icon i,
.cv-delete-link .cv-entry-icon i {
  font-size: 16px;

}

/* Override modal button styles when used as action buttons in job details */
.cv-delete-link.copy-email-btn,
.cv-download-link.email-match-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 0;
  gap: 0;
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-delete-link.copy-email-btn:hover,
.cv-download-link.email-match-btn:hover {
  background-color: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Disable icon transitions and hover effects within action buttons */
.cv-delete-link.copy-email-btn .cv-entry-icon,
.cv-download-link.email-match-btn .cv-entry-icon {
  transition: none;
  background: none !important;
  transform: none !important;
}

.cv-delete-link.copy-email-btn:hover .cv-entry-icon,
.cv-download-link.email-match-btn:hover .cv-entry-icon {
  background: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Job entry styling to match CV entries */
.job-entry {
  background: #ffffff;
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.job-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}

.job-entry-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.job-entry-title {
  flex: 1;
  margin-right: 8px;
}

.job-similarity-score {
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* New score container and breakdown styles */
.job-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.job-final-score {
  background: linear-gradient(135deg, #5082f7 0%, #4f39f3 100%);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 45px;
  text-align: center;
}

.score-breakdown {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.score-breakdown small {
  display: flex;
  gap: 0.25rem;
}

.score-breakdown span {
  background-color: #f5f5f5;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

/* Match status info styling */
.match-status-info {
  background-color: #f8f9fa;
  color: var(--muted);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
}

.match-status-info i {
  color: var(--primary);
}

.job-entry-details {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.job-entry-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-details-container {
  margin-top: 0.5rem;
}

.view-match-details-btn,
.open-job-link-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}

.open-job-link-btn {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.view-match-details-btn:hover,
.generate-email-btn:hover,
.rewrite-cv-btn:hover,
.open-email-btn:hover {
  background: rgba(80, 130, 247, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(80, 130, 247, 0.2);
}

.generate-email-btn i,
.rewrite-cv-btn i { color:#fff !important; }

.open-job-link-btn:hover {
  background: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(80, 130, 247, 0.2);
}

.view-match-details-btn:active,
.open-job-link-btn:active {
  transform: translateY(0);
}

/* Semantic Search Box */
.semantic-search {
  margin: 2rem 0;
  display: flex;
  width: 100%;
}

.semantic-search .search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  /* Remove the default search input styling with the arrow */
  -webkit-appearance: none;
  appearance: none;
}

/* Remove the clear button (x) from search inputs in webkit browsers */
.semantic-search .search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.semantic-search .search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(137, 107, 207, 0.1);
}

/* Job Result Card Additional Sections */
.result-summary {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg);
  border-radius: 0.5rem;
  border-left: 3px solid var(--primary);
}

.result-summary h4 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-summary h4::before {
  content: "📝";
  font-size: 1rem;
}

.result-summary p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.result-similarity {
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(137, 107, 207, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.result-similarity::before {
  content: "🔍";
  font-size: 1.1rem;
}

.similarity-score {
  font-weight: 600;
  color: var(--primary);
}

.similarity-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-links {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.result-link:hover {
  background: rgba(137, 107, 207, 0.1);
  transform: translateY(-1px);
}

.result-link::before {
  content: "🔗";
  font-size: 0.9rem;
}

.result-link.linkedin::before {
  content: "💼";
}

.result-link.indeed::before {
  content: "📋";
}

.result-link.google::before {
  content: "🔍";
}

/* Additional Job Details */
.result-details {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.result-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 0.5rem;
}

.result-detail-item::before {
  font-size: 1rem;
}

.result-detail-item.salary::before {
  content: "💰";
}

.result-detail-item.type::before {
  content: "⏱️";
}

.result-detail-item.experience::before {
  content: "📈";
}

.result-detail-item.posted::before {
  content: "📅";
}

.result-detail-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.result-detail-value {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
}

/* CV Entries Styling */
#cvList {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.cv-entry {
  box-sizing: border-box; /* ADDED */
  width: 100%; /* ADDED */
  background-color: #ffffff !important;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  border: 1px solid rgba(137, 107, 207, 0.1);
  position: relative;
}

/* Hide all document emoji icons */
.cv-entry > img,
.cv-entry img,
.cv-entry-content + img,
li.cv-entry > img:first-child,
.cv-entry > .emoji,
.cv-entry-content ~ .emoji,
.cv-entry-content img,
.cv-entry-content ~ img,
.cv-entry-role ~ img,
.cv-entry-content + *,
.cv-entry > *:nth-child(1):not(.cv-entry-content),
.cv-entry > *:nth-child(2):not(.cv-entry-content) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  opacity: 0 !important;
  left: -9999px !important;
  pointer-events: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.cv-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  border-color: rgba(137, 107, 207, 0.3);
}

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

.cv-entry-icon {
  font-size: 1.5rem;
  color: var(--primary);
  background-color: rgba(137, 107, 207, 0.1);
  border-radius: 0.5rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cv-download-link {
  text-decoration: none;
  cursor: pointer;
}

.cv-entry-content {
  flex: 1;
}

.cv-entry-title {
  font-size: 1.2rem;
  color: #000;
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.cv-entry-filename {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: capitalize;
}

.cv-entry-role {
  background-color: rgba(137, 107, 207, 0.07);
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.75rem;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.4;
  border-left: 3px solid var(--primary);
  max-width: 100%;
}

.cv-entry-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.cv-entry-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.cv-entry-detail i {
  color: var(--primary);
  width: 1rem;
  text-align: center;
}

.cv-entry-actions {
  display: flex;
  justify-content: flex-end;
}

/* Fix for mobile responsiveness */
@media (max-width: 640px) {
  .cv-entry-role {
    max-width: 100%;
  }
  
  .cv-entry-detail {
    width: 100%;
  }
  
  .search-by-description-btn {
    width: 100%;
    justify-content: center;
  }
}

.search-by-description-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-by-description-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-by-description-btn:active {
  transform: translateY(0);
}

.search-by-description-btn i {
  margin-right: 0px; /* Space between icon and text - smaller spacing */
}

/* Button Styles for Bench and Jobs Pages */
.file-upload-container {  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 1rem 0;
  background-color: var(--card);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 200px;
  position: relative;
}

.file-upload-container.drag-over {
  border-color: var(--primary);
  background-color: rgba(137, 107, 207, 0.05);
}

.drop-message {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--muted);
  text-align: center;
}

.semantic-search {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.file-upload-label,
#uploadCvBtn,
.search-by-description-btn,
#fetchJobsBtn,
#searchJobsBtn {
  line-height: 1.5; /* match input line height */
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: var(--primary);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-label:hover,
#uploadCvBtn:hover,
.search-by-description-btn:hover,
#fetchJobsBtn:hover,
#searchJobsBtn:hover {
  background: rgba(80, 130, 247, 0.1);
  border-color: var(--primary);
  transform: translateY(-0.5px);
}

.file-upload-label i,
#uploadCvBtn i,
#fetchJobsBtn i,
#searchJobsBtn i {
  font-size: 1.1rem;
}

#uploadCvBtn i {
  margin-right: 2px; /* Consistent 2px spacing with other buttons */
}

/* Similarity Score Styling */
.similarity-score-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background-color: rgba(137, 107, 207, 0.1);
  width: fit-content;
}

.similarity-score-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.similarity-score-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.25rem 0.5rem;
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.job-url {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
  background-color: rgba(137, 107, 207, 0.08);
  border-radius: 0.4rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.job-url:hover {
  background-color: rgba(137, 107, 207, 0.15);
  border-color: rgba(137, 107, 207, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.job-url i {
  margin-right: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Filter stats and no results message */
.filter-stats {
  background-color: #f9f9f9;
  border-left: 3px solid var(--primary);
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--muted);
}

.no-results-message {
  background-color: #f9f9f9;
  border-left: 3px solid #e67e22;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  text-align: center;
}

.no-results-message p {
  margin: 5px 0;
  color: var(--text);
}

.no-results-message p:first-child {
  font-weight: 600;
  font-size: 16px;
}

/* Go to Settings button styling */
.go-to-settings-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.go-to-settings-btn:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.go-to-settings-btn:active {
  transform: translateY(0);
}

/* Candidate Selection Styling */
label[for="candidateSelect"] {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

#candidateSelect {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #ddd;
  font-size: 14px;
  background-color: white;
  color: #333;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23896bcf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#candidateSelect:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(137, 107, 207, 0.25);
}


  .login-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
  }

  /* outline it instead */
    .login-btn {
        border: 2px solid var(--primary);
        background: transparent;
        color: var(--primary);
    }


  .logo {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background .2s, color .2s;
  }
  .nav-link.selected,
  .nav-link:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
  }
  
  /* ── Page Layout ─────────────────────────────────────────────────────── */
  .page {
    display: none;
    padding: 2rem;
  }
  .page.active {
    display: block;
  }
  .centered-container {
    max-width: 600px;
    margin: 0 auto;
  }
  
  /* ── Main Content Scroll ─────────────────────────────────────────────── */
  .main-content {
    flex: 1;
    overflow-y: auto;
  }
  
  /* ── Retained Styles Below ───────────────────────────────────────────── */
  
  /* Source Picker & Search Box */
  .sources {
    display: flex;
    gap: 1em;
    width: 100%;
    max-width: 600px;
  }
  .source-card {
    flex: 1;
    padding: 1em;
    text-align: center;
    background: var(--card);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    transition: border .2s, background .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .source-card.selected {
    border-color: var(--sel);
    background: rgba(79,70,229,0.1);
  }
  .source-card img {
    width: 60px;
    height: 50px;
    margin-bottom: .4em;
    object-fit: contain;
  }



  .search-box {
    margin-top: 1em;
    display: flex;
    width: 100%;
    max-width: 600px;
    background: var(--card);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
  }
  .search-box.loading::after {
    content:'';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg,transparent,rgba(255,255,255,0.7),transparent);
    animation: shine 1s infinite;
  }
  @keyframes shine { to { left:100%; } }
  
  .search-input,
  .location-input {
    flex: 1;
    border: none;
    padding: 1em;
    font-size: 1rem;
    outline: none;
  }
  .search-button {
    padding: 0 1.5em;
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
  }
  .search-button:hover { background: var(--primary); }
  
  /* Results & Saved */
  .results {
    margin-top: 1em;
    width: 100%;
    max-width: 1000px;
    display: grid;
    gap: 1.5em;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    /* center in screen */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
  
  /* Card styles */
  .result-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    position: relative;
  }
  
  /* New emblem styles - inline version */
  .new-emblem-inline {
    display: inline-block;
    margin-left: 0px;
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  }
  
  .new-emblem-inline.fade-out {
    opacity: 0;
    transform: scale(0.8);
  }
  
  /* Ensure job-entry has relative positioning for emblem */
  .job-entry {
    position: relative;
  }
  .result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
  }
  .result-title {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-title::before {
    content: "💼";
    font-size: 1.1rem;
  }
  .result-company {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-company::before {
    content: "🏢";
    font-size: 1rem;
  }
  .result-location {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-location::before {
    content: "📍";
    font-size: 0.9rem;
  }
  .result-education {
  background: rgba(137, 107, 207, 0.1);
    color: var(--primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-education::before {
    content: "🎓";
    font-size: 0.9rem;
  }
  .result-job-history,
  .result-requirements {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.5rem;
  }
  .result-job-history h4,
  .result-requirements h4 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-job-history h4::before {
    content: "📅";
    font-size: 1rem;
  }
  .result-requirements h4::before {
    content: "📋";
    font-size: 1rem;
  }
  .result-job-history ul,
  .result-requirements ul {
    list-style: none;
    padding-left: 0;
  }
  .result-job-history li,
  .result-requirements li {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .result-job-history li::before,
  .result-requirements li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
  }
  .save-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  .save-btn::before {
    content: "��";
    font-size: 0.9rem;
  }
  .save-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
  }
  .result-relevancy {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-relevancy::before {
    content: "📊";
    font-size: 0.8rem;
  }
  
  /* Chat Panel */
  #chatContainer {
    margin-top: 1rem;
    width: 100%;
    max-width: 600px;
    background: var(--card);
    border: 2px solid #ddd;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #chatWindow {
    flex: 1;
    padding: 1em;
    overflow-y: auto;
    max-height: 300px;
  }
  .chat-message { margin-bottom: 1em; display: flex; }
  .chat-message.user      { justify-content: flex-end; }
  .chat-message.assistant { justify-content: flex-start; }
  .bubble {
    max-width: 80%;
    padding: .5em 1em;
    border-radius: 1rem;
  }
  .user .bubble {
    background: var(--primary);
    color: #fff;
    border-radius: 1rem 1rem 0 1rem;
  }
  .assistant .bubble {
    background: #eee;
    color: #333;
    border-radius: 1rem 1rem 1rem 0;
  }
  
  #chatInputBox {
    display: flex;
    border-top: 1px solid #ddd;
    position: relative;
  }
  #chatInputBox.loading::after {
    content:'';
    position:absolute; top:0; left:-100%;
    width:100%; height:100%;
    background:linear-gradient(120deg,transparent,rgba(255,255,255,0.7),transparent);
    animation:shine 1s infinite;
  }
  #chatInput {
    flex:1;
    border:none;
    padding:1em;
    font-size:1rem;
    outline:none;
  }
  #chatSend {
    padding:0 1em;
    background:var(--primary);
    color:#fff;
    border:none;
    cursor:pointer;
    transition:background .2s;
  }
  #chatSend:hover { background: var(--primary); }
  
  /* Environment Toggle */
  .env-toggle {
    position: fixed;
    bottom: 1em;
    right: 1em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: var(--card);
    padding: 0.5em 1em;
    border-radius: 0.5em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.8rem;
    z-index: 100;
  }
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
  }
  .toggle-switch input {
    opacity: 0; width: 0; height: 0;
  }
  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
  }
  .toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 2px; bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }
  input:checked + .toggle-slider {
    background-color: var(--primary);
  }
  input:checked + .toggle-slider:before {
    transform: translateX(20px);
  }
  .using-cloud {
    color: var(--primary);
    font-weight: 600;
  }
  .using-local {
    color: var(--danger);
    font-weight: 600;
  }
  
  /* Logo image + text */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
  }
  
  .logo-img {
    width: 120px;
    height: auto;
    max-width: 100%;
  }
  
  .logo-text {
    font-family: 'Inter', sans-serif;  /* or swap in another font */
    font-weight: 700;                  /* nice bold */
    font-size: 1.5rem;                 /* matches the old size */
    color: #333;                       /* dark, legible */
  }



  /* ── Full-screen AI Chat ─────────────────────────────────────────── */

/* Make the chat page itself fill the available area */
/* Only make the chat page full-screen when it has .active */
.page#chatPage.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 4rem);
    padding: 2rem;
    box-sizing: border-box;
  }
  
  /* Let chatContainer grow to fill the space, and remove its max-width */
  #chatContainer {
    flex: 1;
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
  }
  
  /* Make the message window scroll and fill all but the input */
  #chatWindow {
    flex: 1;
    max-height: none;
    overflow-y: auto;
  }
  
  /* Keep the input box stuck to the bottom */
  #chatInputBox {
    margin-top: 1rem;
    flex-shrink: 0;
  }

/* Bench Page and Jobs Page Styles */
#benchPage,
#jobsPage {
  padding: 2rem;
  background: var(--bg);
}

#benchPage .centered-container,
#jobsPage .centered-container,
#settingsPage .centered-container {
  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto;
  background: var(--card);
  padding: 20px; /* reduced left padding for tighter title alignment */
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}





/* Unified section & page title style */
#benchPage h2,
#jobsPage h2,
#settingsPage h2,
#benchPage h3,
#jobsPage h3,
#settingsPage h3 {
  /* title aligned with default padding */ /* nudge text left while border remains */
  margin: 0 0 24px 0;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}


/* Unified left-aligned page titles */
#dashboardPage h2,
#benchPage h2,
#jobsPage h2,
#settingsPage h2 {
  position: relative;
  padding-left: 20px; /* space for stripe */
}

/* Icon styling in page headers */
#benchPage h2 i,
#jobsPage h2 i,
#settingsPage h2 i {
  font-size: 1.5rem;
  width: 1.5rem;
  text-align: center;
  color: var(--primary);
}


#cvUpload {
  display: none;
}

#uploadCvBtn,
#fetchJobsBtn,
#searchJobsBtn {
  line-height: 1.5; /* match input line height */
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.95rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#uploadCvBtn:hover,
#fetchJobsBtn:hover,
#searchJobsBtn:hover {
  background: var(--primary);
  transform: translateY(-1px);
}


#fetchJobsBtn::before {
  content: "🌐";
  font-size: 1.1rem;
}

/* Removed emoji from searchJobsBtn as we now use Font Awesome icon */
#searchJobsBtn::before {
  content: "";
}

#cvList,
#jobsList {
  box-sizing: border-box; /* ADDED */
  width: 100%;
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#cvList li {
  background: var(--bg);
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
}

#cvList li:hover {
  transform: none;
  box-shadow: none;
  border-color: #e5e7eb;
}

#cvList li::before {
  content: none;
}

#jobsList li::before {
  content: none;
}

/* CV entry actions container */
.cv-actions-container {
  display: flex;
  gap: 8px; /* space between action buttons */
  align-items: center;
}

/* CV entry action buttons */
.cv-download-link, .cv-config-link, .cv-delete-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  color: var(--muted);
  text-decoration: none;
}

.cv-download-link:hover,
.cv-config-link:hover,
.cv-delete-link:hover {
  background-color: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Clean up nested icon styling */
.cv-download-link .cv-entry-icon,
.cv-config-link .cv-entry-icon,
.cv-delete-link .cv-entry-icon {
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-download-link .cv-entry-icon i,
.cv-config-link .cv-entry-icon i,
.cv-delete-link .cv-entry-icon i {
  font-size: 16px;

}

/* Override modal button styles when used as action buttons in job details */
.cv-delete-link.copy-email-btn,
.cv-download-link.email-match-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 0;
  gap: 0;
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-delete-link.copy-email-btn:hover,
.cv-download-link.email-match-btn:hover {
  background-color: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Disable icon transitions and hover effects within action buttons */
.cv-delete-link.copy-email-btn .cv-entry-icon,
.cv-download-link.email-match-btn .cv-entry-icon {
  transition: none;
  background: none !important;
  transform: none !important;
}

.cv-delete-link.copy-email-btn:hover .cv-entry-icon,
.cv-download-link.email-match-btn:hover .cv-entry-icon {
  background: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Job entry styling to match CV entries */
.job-entry {
  background: #ffffff;
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.job-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}

.job-entry-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.job-entry-title {
  flex: 1;
  margin-right: 8px;
}

.job-similarity-score {
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* New score container and breakdown styles */
.job-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.job-final-score {
  background: linear-gradient(135deg, #5082f7 0%, #4f39f3 100%);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 45px;
  text-align: center;
}

.score-breakdown {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.score-breakdown small {
  display: flex;
  gap: 0.25rem;
}

.score-breakdown span {
  background-color: #f5f5f5;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

/* Match status info styling */
.match-status-info {
  background-color: #f8f9fa;
  color: var(--muted);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
}

.match-status-info i {
  color: var(--primary);
}

.job-entry-details {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.job-entry-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-details-container {
  margin-top: 0.5rem;
}

.view-match-details-btn,
.open-job-link-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}

.open-job-link-btn {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.view-match-details-btn:hover,
.generate-email-btn:hover,
.rewrite-cv-btn:hover,
.open-email-btn:hover {
  background: rgba(80, 130, 247, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(80, 130, 247, 0.2);
}

.generate-email-btn i,
.rewrite-cv-btn i { color:#fff !important; }

.open-job-link-btn:hover {
  background: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(80, 130, 247, 0.2);
}

.view-match-details-btn:active,
.open-job-link-btn:active {
  transform: translateY(0);
}

/* Semantic Search Box */
.semantic-search {
  margin: 2rem 0;
  display: flex;
  width: 100%;
}

.semantic-search .search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  /* Remove the default search input styling with the arrow */
  -webkit-appearance: none;
  appearance: none;
}

/* Remove the clear button (x) from search inputs in webkit browsers */
.semantic-search .search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.semantic-search .search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(137, 107, 207, 0.1);
}

/* Job Result Card Additional Sections */
.result-summary {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg);
  border-radius: 0.5rem;
  border-left: 3px solid var(--primary);
}

.result-summary h4 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-summary h4::before {
  content: "📝";
  font-size: 1rem;
}

.result-summary p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.result-similarity {
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(137, 107, 207, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.result-similarity::before {
  content: "🔍";
  font-size: 1.1rem;
}

.similarity-score {
  font-weight: 600;
  color: var(--primary);
}

.similarity-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-links {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.result-link:hover {
  background: rgba(137, 107, 207, 0.1);
  transform: translateY(-1px);
}

.result-link::before {
  content: "🔗";
  font-size: 0.9rem;
}

.result-link.linkedin::before {
  content: "💼";
}

.result-link.indeed::before {
  content: "📋";
}

.result-link.google::before {
  content: "🔍";
}

/* Additional Job Details */
.result-details {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.result-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 0.5rem;
}

.result-detail-item::before {
  font-size: 1rem;
}

.result-detail-item.salary::before {
  content: "💰";
}

.result-detail-item.type::before {
  content: "⏱️";
}

.result-detail-item.experience::before {
  content: "📈";
}

.result-detail-item.posted::before {
  content: "📅";
}

.result-detail-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.result-detail-value {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
}

/* CV Entries Styling */
#cvList {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.cv-entry {
  box-sizing: border-box; /* ADDED */
  width: 100%; /* ADDED */
  background-color: #ffffff !important;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  border: 1px solid rgba(137, 107, 207, 0.1);
  position: relative;
}

/* Hide all document emoji icons */
.cv-entry > img,
.cv-entry img,
.cv-entry-content + img,
li.cv-entry > img:first-child,
.cv-entry > .emoji,
.cv-entry-content ~ .emoji,
.cv-entry-content img,
.cv-entry-content ~ img,
.cv-entry-role ~ img,
.cv-entry-content + *,
.cv-entry > *:nth-child(1):not(.cv-entry-content),
.cv-entry > *:nth-child(2):not(.cv-entry-content) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  opacity: 0 !important;
  left: -9999px !important;
  pointer-events: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.cv-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  border-color: rgba(137, 107, 207, 0.3);
}

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

.cv-entry-icon {
  font-size: 1.5rem;
  color: var(--primary);
  background-color: rgba(137, 107, 207, 0.1);
  border-radius: 0.5rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cv-download-link {
  text-decoration: none;
  cursor: pointer;
}

.cv-entry-content {
  flex: 1;
}

.cv-entry-title {
  font-size: 1.2rem;
  color: #000;
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.cv-entry-filename {
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: capitalize;
}

.cv-entry-role {
  background-color: rgba(137, 107, 207, 0.07);
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.75rem;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.4;
  border-left: 3px solid var(--primary);
  max-width: 100%;
}

.cv-entry-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.cv-entry-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.cv-entry-detail i {
  color: var(--primary);
  width: 1rem;
  text-align: center;
}

.cv-entry-actions {
  display: flex;
  justify-content: flex-end;
}

/* Fix for mobile responsiveness */
@media (max-width: 640px) {
  .cv-entry-role {
    max-width: 100%;
  }
  
  .cv-entry-detail {
    width: 100%;
  }
  
  .search-by-description-btn {
    width: 100%;
    justify-content: center;
  }
}

.search-by-description-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-by-description-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-by-description-btn:active {
  transform: translateY(0);
}

.search-by-description-btn i {
  margin-right: 0px; /* Space between icon and text - smaller spacing */
}

/* Button Styles for Bench and Jobs Pages */
.file-upload-container {  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 1rem 0;
  background-color: var(--card);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 200px;
  position: relative;
}

.file-upload-container.drag-over {
  border-color: var(--primary);
  background-color: rgba(137, 107, 207, 0.05);
}

.drop-message {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--muted);
  text-align: center;
}

.semantic-search {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.file-upload-label,
#uploadCvBtn,
.search-by-description-btn,
#fetchJobsBtn,
#searchJobsBtn {
  line-height: 1.5; /* match input line height */
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: var(--primary);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-label:hover,
#uploadCvBtn:hover,
.search-by-description-btn:hover,
#fetchJobsBtn:hover,
#searchJobsBtn:hover {
  background: rgba(80, 130, 247, 0.1);
  border-color: var(--primary);
  transform: translateY(-0.5px);
}

.file-upload-label i,
#uploadCvBtn i,
#fetchJobsBtn i,
#searchJobsBtn i {
  font-size: 1.1rem;
}

#uploadCvBtn i {
  margin-right: 2px; /* Consistent 2px spacing with other buttons */
}

/* Similarity Score Styling */
.similarity-score-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background-color: rgba(137, 107, 207, 0.1);
  width: fit-content;
}

.similarity-score-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.similarity-score-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.25rem 0.5rem;
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.job-url {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
  background-color: rgba(137, 107, 207, 0.08);
  border-radius: 0.4rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.job-url:hover {
  background-color: rgba(137, 107, 207, 0.15);
  border-color: rgba(137, 107, 207, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.job-url i {
  margin-right: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Filter stats and no results message */
.filter-stats {
  background-color: #f9f9f9;
  border-left: 3px solid var(--primary);
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--muted);
}

.no-results-message {
  background-color: #f9f9f9;
  border-left: 3px solid #e67e22;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  text-align: center;
}

.no-results-message p {
  margin: 5px 0;
  color: var(--text);
}

.no-results-message p:first-child {
  font-weight: 600;
  font-size: 16px;
}

/* Go to Settings button styling */
.go-to-settings-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.go-to-settings-btn:hover {
  background-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.go-to-settings-btn:active {
  transform: translateY(0);
}

/* Candidate Selection Styling */
label[for="candidateSelect"] {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

#candidateSelect {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #ddd;
  font-size: 14px;
  background-color: white;
  color: #333;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23896bcf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#candidateSelect:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(137, 107, 207, 0.25);
}

.add-data-source {
  display: none !important;
}

/* Candidate Search Label */
.candidate-search-label {
  background-color: rgba(80, 130, 247, 0.1);
  border: 1px solid rgba(80, 130, 247, 0.3);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 15px 0 20px 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  display: none;
  text-align: center;
}

.candidate-search-label i {
  margin-right: 8px;
  color: var(--primary);
}

.candidate-search-label strong {
  color: var(--primary);
  font-weight: 600;
}

/* Generate Email Button */
.generate-email-btn {
  background: linear-gradient(135deg, #5082f7 0%, #4f39f3 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 140px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.generate-email-btn:hover {
  background: linear-gradient(135deg, #5082f7 0%, #4f39f3 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.generate-email-btn:active {
  transform: translateY(0);
}

.generate-email-btn i {
  font-size: 14px;
}

/* Rewrite CV Button */
.rewrite-cv-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 140px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.rewrite-cv-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
  transition: left 0.3s ease;
  z-index: 0;
}

.rewrite-cv-btn:hover::before {
  left: 0;
}

.rewrite-cv-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.rewrite-cv-btn:active {
  transform: translateY(0);
}

.rewrite-cv-btn i,
.rewrite-cv-btn span {
  position: relative;
  z-index: 1;
}

/* Override rewrite CV button to match purple styling */
.rewrite-cv-btn {
  background: linear-gradient(135deg, #5082f7 0%, #4f39f3 100%) !important;
}
.rewrite-cv-btn::before { display:none !important; }

.rewrite-cv-btn i {
  font-size: 14px;
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
  -webkit-background-clip: initial !important;
}

/* Custom Icon Colors */

/* Email Icons - Pastel Blue */
.fa-envelope {
  color: #60a5fa !important; /* Pastel blue */
}

/* Phone Icons - Soft Green */
.fa-phone {
  color: #34d399 !important; /* Soft green */
}

/* Location Icons - Warm Orange */
.fa-map-marker-alt {
  color: #fb923c !important; /* Warm orange */
}

/* PDF Download Icons - Red */
.fa-file-pdf {
  color: #ef4444 !important; /* PDF red */
}

/* Settings/Gear Icons - Gray */
.fa-gear {
  color: #6b7280 !important; /* Gray */
}

/* Trash/Delete Icons - Rose */
.fa-trash {
  color: #f43f5e !important; /* Rose/pink */
}

/* Link Icons - Indigo */
.fa-link {
  color: #6366f1 !important; /* Indigo */
}

/* File Edit Icons - Purple Gradient Effect */
.fa-file-pen {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Filter Icons - Amber */
.fa-filter {
  color: #fb923c !important; /* Orange */
}

/* Check Circle Icons - Emerald */
.fa-check-circle {
  color: #10b981 !important; /* Emerald */
}

/* Clock Icons - Slate */
.fa-clock {
  color: #64748b !important; /* Slate */
}

/* Eye Icons - Cyan */
.fa-eye {
  color: #06b6d4 !important; /* Cyan */
}

/* Exception: Keep certain icons with original primary color for consistency */
.cv-entry-detail i,
.job-entry-details i,
.page h2 i,
.settings-section h3 i,
.modal-header i,
.upload-info-box i,
.notification i,
.match-status-info i {
  color: var(--primary) !important; /* Keep these as primary purple */
}

/* Email indicator specific styling */
.email-indicator {
  background-color: #60a5fa; /* Pastel blue background for email indicators */
}

.email-indicator:hover {
  background-color: #3b82f6; /* Slightly darker blue on hover */
}

.upload-info-box {
  background-color: rgba(137, 107, 207, 0.1);
  border: 1px solid rgba(137, 107, 207, 0.2);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 15px 0 20px 0;
  color: var(--primary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.upload-info-box i {
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
}

.upload-info-box span {
  line-height: 1.4;
}

.email-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: transparent !important;
  color: white;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.email-indicator:hover {
  background-color: var(--secondary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.email-indicator i {
  font-size: 12px;
}

/* Email Modal Styles */
.email-modal .modal-content {
  max-width: 700px;
}

.email-content {
  margin-bottom: 20px;
}

.email-field {
  margin-bottom: 20px;
}

.email-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
}

.email-subject {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.email-body {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 16px;
  line-height: 1.6;
  color: #495057;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.email-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.copy-email-btn,
.open-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.copy-email-btn {
  background-color: #6c757d;
  color: white;
}

.copy-email-btn:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
}

.open-email-btn {
  background-color: var(--primary);
  color: white;
  border: 2px solid var(--primary);
}

.open-email-btn:hover {
  background-color: rgba(137, 107, 207, 0.1);
  border-color: var(--secondary);
  background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
  transform: translateY(-1px);
  
}

/* Custom Icon Colors */
.fa-envelope {
  color: #60a5fa !important; /* Pastel blue */
}

.fa-phone {
  color: #34d399 !important; /* Soft green */
}

.fa-map-marker-alt {
  color: #fb923c !important; /* Warm orange */
}

.fa-file-pdf {
  color: #ef4444 !important; /* Red */
}



.fa-trash {
  color: #374151 !important; /* Dark grey instead of red */
}

.fa-link {
  color: #06b6d4 !important; /* Cyan */
}

.fa-file-pen {
  color: #10b981 !important; /* Emerald */
}



.fa-filter {
  color: #fb923c !important; /* Orange */
}

.fa-check-circle {
  color: #10b981 !important; /* Emerald */
}

.fa-clock {
  color: #f59e0b !important; /* Amber */
}

.fa-eye {
  color: #06b6d4 !important; /* Cyan */
}

/* Custom Icon Colors - More specific selectors to override existing rules */
.cv-entry-detail .fa-envelope,
.fa-envelope {
  color: #60a5fa !important; /* Pastel blue */
}

.cv-entry-detail .fa-phone,
.fa-phone {
  color: #34d399 !important; /* Soft green */
}

.cv-entry-detail .fa-map-marker-alt,
.fa-map-marker-alt {
  color: #fb923c !important; /* Warm orange */
}

.fa-file-pdf {
  color: #ef4444 !important; /* Red */
}



.fa-trash {
  color: #374151 !important; /* Dark grey instead of red */
}

.fa-link,
.job-entry-detail .fa-link,
.job-url .fa-link {
  color: #60a5fa !important; /* Light blue for URL icons */
}

.fa-file-pen {
  color: #10b981 !important; /* Emerald */
}



.fa-filter {
  color: #fb923c !important; /* Orange */
}

.fa-check-circle {
  color: #10b981 !important; /* Emerald */
}

.fa-clock {
  color: #f59e0b !important; /* Amber */
}

.fa-eye {
  color: #06b6d4 !important; /* Cyan */
}

.fa-eye {
  /* Override: brand purple */
  color: var(--secondary) !important;
}

/* Dashboard Styles */
.dashboard-overview {
  display: grid;
  /* Force four cards per row on larger screens */
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.dashboard-card {
  background: var(--card);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: white;
  font-size: 24px;
}

/* Specific icon colors for dashboard cards */
.dashboard-card:nth-child(1) .card-icon {
  color: #3b82f6; /* Blue for users/candidates */
}

.dashboard-card:nth-child(2) .card-icon {
  color: #10b981; /* Green for job matches/briefcase */
}

.dashboard-card:nth-child(3) .card-icon {
  color: #f59e0b; /* Amber for emails */
}

.dashboard-card:nth-child(4) .card-icon {
  color: #8b5cf6; /* Purple for data sources */
}

.card-content h3 {
  margin: 0 0 4px 0;
  font-size: 32px;
  font-weight: 700;
  color: #000; /* black numbers */
}

.card-content p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

/* Dashboard sections layout */
.dashboard-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-top: 20px;
}

.dashboard-section {
  background: var(--card);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.dashboard-section h3,
#benchPage h2,
#jobsPage h2,
#settingsPage h2,
#benchPage h3,
#settingsPage h3,
#jobsPage h3 {
  margin: 0 0 24px 0;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-section h3 i {
  color: var(--primary);
}

.top-matches-container,
.recent-activity-container {
  min-height: 300px;
}

.dashboard-match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 16px;
  border-left: 4px solid var(--primary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.dashboard-match-item:hover {
  background: #f1f3f4;
  transform: translateX(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.match-info {
  flex: 1;
}

.match-candidate {
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  font-size: 16px;
}

.match-job {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

.match-score {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 16px;
  min-width: 60px;
  text-align: center;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}

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

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: var(--primary);
  font-size: 16px;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  font-size: 15px;
}

.activity-time {
  font-size: 13px;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state i {
  font-size: 56px;
  color: #e5e7eb;
  margin-bottom: 20px;
}

/* Mobile responsiveness for dashboard */
@media (max-width: 1200px) {
  #dashboardPage .centered-container {
    max-width: 1200px;
    padding: 20px 30px;
  }
  
  .dashboard-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  #dashboardPage .centered-container {
    max-width: 100%;
    padding: 20px;
  }
  
  .dashboard-overview {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .dashboard-card {
    padding: 20px;
  }
  
  .card-content h3 {
    font-size: 24px;
  }
  
  .dashboard-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .dashboard-match-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .match-score {
    align-self: flex-end;
  }
}

/* Modern Travel Range Controls - Compact Layout */
.travel-range-controls {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin-top: 24px;
  padding: 20px;
  background: rgba(80, 130, 247, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(80, 130, 247, 0.1);
  align-items: flex-end;
}

.sliders-container {
  display: flex;
  flex-direction: row;
  gap: 32px;
  flex: 1;
}

.range-slider-container,
.rate-range-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.range-slider-container label,
.rate-range-container label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.range-slider-container label span,
.rate-range-container label span {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  min-width: 32px;
  text-align: center;
}

.buttons-container {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: none;
}

/* Enhanced Travel Range Button - Compact */
.travel-range-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 8px rgba(80, 130, 247, 0.2);
  min-width: 120px;
  white-space: nowrap;
}

.travel-range-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(80, 130, 247, 0.3);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.travel-range-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(80, 130, 247, 0.2);
}

/* Compact Single Range Slider */
.single-range-slider {
  position: relative;
  height: 48px;
  margin-top: 8px;
  padding: 0 8px;
}

.single-range-slider .slider {
  position: relative;
  z-index: 1;
  height: 6px;
  margin: 0;
  top: 21px;
}

.single-range-slider .slider .track {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: #e8edf7;
  transition: background 0.2s ease;
}

.single-range-slider .slider .progress {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 50%;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  box-shadow: 0 1px 2px rgba(80, 130, 247, 0.2);
}

.single-range-slider .slider .thumb {
  position: absolute;
  z-index: 3;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(80, 130, 247, 0.3), 0 0 0 1px rgba(80, 130, 247, 0.1);
  margin-top: -7px;
  cursor: pointer;
  transition: all 0.2s ease;
  left: 50%;
  transform: translateX(-50%);
}

.single-range-slider .slider .thumb:hover {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 3px 8px rgba(80, 130, 247, 0.4), 0 0 0 2px rgba(80, 130, 247, 0.2);
}

.travel-range-controls .range-slider-container input[type="range"] {
  position: absolute;
  pointer-events: all;
  -webkit-appearance: none;
  appearance: none;
  z-index: 4;
  height: 32px;
  width: 100%;
  opacity: 0;
  margin: 0;
  top: 8px;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
}

.travel-range-controls .range-slider-container input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0 none;
  background-color: transparent;
  -webkit-appearance: none;
  cursor: pointer;
}

.travel-range-controls .range-slider-container input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0 none;
  background-color: transparent;
  cursor: pointer;
}

/* Compact Multi-Range Slider */
.multi-range-slider {
  position: relative;
  height: 48px;
  margin-top: 8px;
  padding: 0 8px;
}

.multi-range-slider .slider {
  position: relative;
  z-index: 1;
  height: 6px;
  margin: 0;
  top: 21px;
}

.multi-range-slider .slider .track {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: #e8edf7;
  transition: background 0.2s ease;
}

.multi-range-slider .slider .range {
  position: absolute;
  z-index: 2;
  left: 25%;
  right: 25%;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  box-shadow: 0 1px 2px rgba(80, 130, 247, 0.2);
}

.multi-range-slider .slider .thumb {
  position: absolute;
  z-index: 3;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(80, 130, 247, 0.3), 0 0 0 1px rgba(80, 130, 247, 0.1);
  margin-top: -7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.multi-range-slider .slider .thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(80, 130, 247, 0.4), 0 0 0 2px rgba(80, 130, 247, 0.2);
}

.multi-range-slider .slider .thumb.left {
  left: 25%;
}

.multi-range-slider .slider .thumb.right {
  right: 25%;
}

.multi-range-slider input[type="range"] {
  position: absolute;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  z-index: 4;
  height: 32px;
  width: 100%;
  opacity: 0;
  margin: 0;
  top: 8px;
  cursor: pointer;
}

.multi-range-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0 none;
  background-color: transparent;
  -webkit-appearance: none;
  cursor: pointer;
}

.multi-range-slider input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0 none;
  background-color: transparent;
  cursor: pointer;
}

/* Responsive adjustments for compact layout */
@media (max-width: 768px) {
  .travel-range-controls {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .sliders-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .buttons-container {
    justify-content: center;
  }
  
  .range-slider-container,
  .rate-range-container {
    min-width: auto;
  }
}

/* Edit contact button styling */
.edit-contact-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.edit-contact-btn:hover {
  background-color: rgba(80, 130, 247, 0.1);
  color: var(--primary);
  transform: translateY(-1px);
}

.edit-contact-btn i {
  font-size: 16px;
}

/* Hide edit button when in editing mode */
.cv-entry-details.editing .edit-contact-btn {
  display: none;
}

/* Editable contact fields styling - all inputs styled identically with higher specificity */
.cv-entry-detail.editing input,
input.edit-email-input,
input.edit-phone-input,
input.edit-location-input {
  background: #fff !important;
  border: 1px solid var(--primary) !important;
  border-radius: 4px !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.95rem !important;
  color: #4b5563 !important;
  width: auto !important;
  min-width: 120px !important;
  font-family: inherit !important;
  line-height: normal !important;
  box-sizing: border-box !important;
  flex: none !important;
}

.cv-entry-detail.editing input:focus,
input.edit-email-input:focus,
input.edit-phone-input:focus,
input.edit-location-input:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(80, 130, 247, 0.2) !important;
}

/* Save and Cancel buttons for edit contact functionality */
.save-contact-btn,
.cancel-contact-btn {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
  min-width: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.save-contact-btn {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

.save-contact-btn:hover {
  background: #4366d9;
  border-color: #4366d9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cancel-contact-btn {
  background: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.cancel-contact-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.save-contact-btn:active,
.cancel-contact-btn:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
/* COMPREHENSIVE MOBILE RESPONSIVENESS */
/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* Mobile-first approach for core layout */
@media (max-width: 768px) {
  /* Reset body overflow for mobile */
  body {
    overflow: auto;
    height: auto;
  }
  
  /* Transform app container to vertical stack */
  .app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
  
  /* Transform sidebar to bottom navigation */
  .sidebar {
    width: 100%;
    height: auto;
    padding: 0.5rem 0;
    order: 2;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sidebar-bg);
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Hide logo on mobile */
  .sidebar .logo {
    display: none;
  }
  
  /* Transform navigation to horizontal */
  .sidebar .nav {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0;
    padding: 0;
  }
  
  /* Mobile navigation links */
  .sidebar .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--muted);
    padding: 0.5rem 0.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    min-width: 0;
    flex: 1;
    text-align: center;
    max-width: 70px;
  }
  
  /* Mobile navigation icons */
  .sidebar .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    display: block;
  }
  
  /* Mobile navigation text */
  .sidebar .nav-link span {
    font-size: 0.65rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }
  
  /* Selected mobile navigation */
  .sidebar .nav-link.selected {
    color: var(--primary);
    background: rgba(80, 130, 247, 0.1);
  }
  
  /* Mobile navigation hover effects */
  .sidebar .nav-link:hover {
    color: var(--primary);
    background: rgba(80, 130, 247, 0.05);
  }
  
  /* Mobile navigation active state */
  .sidebar .nav-link:active {
    transform: scale(0.95);
  }
  
  /* Hide login panel on mobile (move it to top) */
  .sidebar .login-panel {
    display: none;
  }
  
  /* Main content adjustments */
  .main-content {
    flex: 1;
    order: 1;
    padding-bottom: 80px; /* Space for bottom navigation */
    overflow-y: auto;
    height: calc(100vh - 80px);
    box-sizing: border-box;
  }
  
  /* Mobile login header - show on mobile */
  .mobile-login-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--sidebar-bg);
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 999;
  }
  
  .mobile-logo {
    display: flex;
    align-items: center;
  }
  
  .mobile-logo-img {
    height: 32px;
    width: auto;
  }
  
  .mobile-login-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 38px;
  }
  
  .mobile-login-btn:hover {
    background: #4366d9;
    transform: translateY(-1px);
  }
  
  .mobile-login-btn.signed-in {
    background: rgba(80, 130, 247, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
  }
  
  /* Mobile-friendly centered container */
  .centered-container {
    max-width: 100%;
    margin: 0;
    padding: 0 1rem;
    background: transparent !important;
    /* no border */
    border: none !important;
  }
  
  /* Dashboard adjustments */
  #dashboardPage .centered-container {
    max-width: 100%;
    padding: 1rem;
  }
  
  /* Mobile page headers */
  .page h2 {
    font-size: 1.5rem;
    margin: 1rem 0;
    padding: 0 0 0.5rem 0;
    max-width: 100%;
  }
  
  /* Dashboard overview cards - stack on mobile */
  .dashboard-overview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .dashboard-card {
    margin-bottom: 0;
    padding: 1rem;
  }
  
  .dashboard-card .card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
  }
  
  .dashboard-card .card-content h3 {
    font-size: 1.5rem;
    margin: 0.5rem 0 0.25rem 0;
  }
  
  .dashboard-card .card-content p {
    font-size: 0.9rem;
    margin: 0;
  }
  
  /* Dashboard content - stack sections */
  .dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .dashboard-section {
    margin-bottom: 0;
    padding: 1rem;
  }
  
  .dashboard-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  /* Job and CV entries - mobile optimized */
  .job-entry,
  .cv-entry {
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  .job-entry-title,
  .cv-entry-title {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }
  
  .job-entry-details,
  .cv-entry-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .job-entry-detail,
  .cv-entry-detail {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Mobile button adjustments */
  .view-match-details-btn,
  .generate-email-btn,
  .rewrite-cv-btn,
  .search-button,
  .add-source-btn,
  .add-letter-btn,
  .travel-range-button,
  .primary-btn,
  .secondary-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    min-height: 44px; /* Touch-friendly */
    border-radius: 8px;
  }
  
  /* Mobile search adjustments */
  .semantic-search {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .semantic-search .search-input,
  #searchJobsInput {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    height: auto;
    min-height: 44px;
  }
  
  .semantic-search .search-button,
  #searchJobsBtn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    height: auto;
    min-height: 44px;
    border-radius: 8px;
    flex-shrink: 0;
    line-height: 1.2;
  }
  
  /* File upload container mobile */
  .file-upload-container {
    padding: 2rem 1rem;
    text-align: center;
  }
  
  .file-upload-container .drop-message {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  #uploadCvBtn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    min-height: 44px;
    border-radius: 8px;
  }
  
  /* Settings page mobile */
  .settings-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
  }
  
  .settings-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .add-data-source form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .add-data-source input {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    min-height: 44px;
  }
  
  .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .add-example-letter textarea {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    min-height: 120px;
    resize: vertical;
  }
  
  /* Modal mobile adjustments */
  .modal-content {
    width: 95%;
    max-width: 95%;
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
  }
  
  .modal-header {
    padding: 1rem;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-bottom: 1px solid #eee;
  }
  
  .modal-header h3,
  .modal-header h2 {
    font-size: 1.1rem;
    margin: 0;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .close-modal {
    padding: 0.5rem;
    font-size: 1.2rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Email modal mobile */
  .email-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .email-field {
    margin-bottom: 1rem;
  }
  
  .email-field label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .email-subject,
  .email-body,
  .email-textarea {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    min-height: 44px;
  }
  
  .email-body,
  .email-textarea {
    min-height: 120px;
    resize: vertical;
  }
  
  .email-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
  }
  
  .copy-email-btn,
  .open-email-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    min-height: 44px;
    border-radius: 8px;
    text-align: center;
    justify-content: center;
  }
  
  /* Travel range modal mobile */
  .travel-range-controls {
    padding: 1rem 0;
  }
  
  .sliders-container {
    gap: 1.5rem;
  }
  
  .range-slider-container,
  .rate-range-container {
    margin-bottom: 1.5rem;
  }
  
  .range-slider-container label,
  .rate-range-container label {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .buttons-container {
    margin-top: 1.5rem;
  }
  
  .travel-range-button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    min-height: 44px;
    border-radius: 8px;
  }
  
  /* Map mobile adjustments */
  #map {
    height: 300px;
    border-radius: 8px;
  }
  
  /* Data sources mobile */
  .data-source-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  
  .data-source-controls {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .toggle-source {
    margin-bottom: 0.5rem;
  }
  
  .delete-source-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-height: 38px;
    border-radius: 6px;
  }
  
  /* Example letters mobile */
  .example-letter-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  
  .example-letter-controls {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .view-letter-btn,
  .delete-letter-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-height: 38px;
    border-radius: 6px;
  }
  
  /* CV actions mobile */
  .cv-actions-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
  }
  
  .cv-download-link,
  .cv-config-link,
  .cv-delete-link {
    padding: 0.75rem;
    font-size: 0.9rem;
    min-height: 44px;
    border-radius: 8px;
    text-align: center;
    justify-content: center;
  }
  
  .cv-entry-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  
  .edit-contact-btn,
  .save-contact-btn,
  .cancel-contact-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-height: 38px;
    border-radius: 6px;
  }
  
  /* Search by description mobile */
  .search-by-description-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    min-height: 44px;
    border-radius: 8px;
    margin-top: 1rem;
  }
  
  /* Notifications mobile */
  div.notification {
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: calc(100vw - 2rem);
    z-index: 10000;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  div.notification .notification-content {
    padding: 0;
  }
  
  /* Match details mobile */
  .match-details-container {
    padding: 1rem;
  }
  
  .match-details-content {
    padding: 1rem;
  }
  
  .match-summary {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  
  .match-details {
    flex-direction: column;
    gap: 1rem;
  }
  
  .matches-section,
  .mismatches-section {
    padding: 1rem;
    border-radius: 8px;
  }
  
  .matches-section h4,
  .mismatches-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .match-item,
  .mismatch-item {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
  }
  
  /* Touch-friendly improvements */
  button,
  input[type="button"],
  input[type="submit"],
  .clickable {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improve text readability on mobile */
  body {
    font-size: 16px; /* Prevent zoom on iOS */
    line-height: 1.5;
  }
  
  /* Ensure proper touch targets */
  a, button, input, select, textarea {
    touch-action: manipulation;
  }
  
  /* Prevent horizontal scroll */
  * {
    max-width: 100%;
  }
  
  /* Fix any overflow issues */
  .app-container,
  .main-content,
  .page {
    overflow-x: hidden;
  }
}

/* Smaller mobile screens */
@media (max-width: 480px) {
  .sidebar .nav-link {
    font-size: 0.7rem;
    padding: 0.4rem 0.2rem;
  }
  
  .sidebar .nav-link i {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }
  
  .sidebar .nav-link span {
    font-size: 0.6rem;
  }
  
  .centered-container {
    padding: 0.75rem;
  }
  
  .page h2 {
    font-size: 1.3rem;
  }
  
  .dashboard-card {
    padding: 0.75rem;
  }
  
  .dashboard-section {
    padding: 0.75rem;
  }
  
  .job-entry,
  .cv-entry {
    padding: 0.75rem;
  }
  
  .modal-content {
    width: 98%;
    margin: 0.5rem;
  }
  
  .modal-header,
  .modal-body {
    padding: 0.75rem;
  }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .main-content {
    height: calc(100vh - 70px);
    padding-bottom: 70px;
  }
  
  .sidebar {
    padding: 0.25rem 0;
  }
  
  .sidebar .nav-link {
    padding: 0.25rem 0.2rem;
  }
  
  .sidebar .nav-link i {
    font-size: 1rem;
    margin-bottom: 0.15rem;
  }
  
  .sidebar .nav-link span {
    font-size: 0.6rem;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 200px;
    padding: 1.5rem 0.75rem;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .centered-container {
    padding: 1rem;
  }
  
  #dashboardPage .centered-container {
    max-width: 1200px;
    padding: 1rem 2rem;
  }
  
  .dashboard-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-content {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 80%;
    max-width: 600px;
  }
}

/* CV Template Selection Modal Styles */
.template-modal {
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.template-description {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 16px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.template-card {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.template-card:hover {
  border-color: #5082f7;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(80, 130, 247, 0.2);
}

.template-card.selected {
  border-color: #5082f7;
  background: #f8faff;
  box-shadow: 0 4px 16px rgba(80, 130, 247, 0.3);
}

.template-preview {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: #ffffff;
  min-height: 180px;
  font-family: 'Helvetica', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.template-header {
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.template-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

.template-contact {
  font-size: 10px;
  color: #666;
  margin-bottom: 8px;
}

.template-section {
  margin-bottom: 10px;
}

.template-section-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 6px;
  padding-bottom: 2px;
}

.template-job {
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 2px;
}

.template-company {
  font-size: 10px;
  margin-bottom: 4px;
}

.template-description {
  font-size: 9px;
  color: #666;
  line-height: 1.3;
}

/* Template 1 - Classic Professional */
.template-1 .template-name {
  color: #2C3E50;
}

.template-1 .template-section-title {
  color: #3498DB;
  border-bottom: 1px solid #3498DB;
}

.template-1 .template-job {
  color: #2C3E50;
}

.template-1 .template-company {
  color: #343A40;
}

/* Template 2 - Modern Minimalist */
.template-2 .template-name {
  color: #2E7D32;
}

.template-2 .template-section-title {
  color: #4CAF50;
  border-bottom: 1px solid #4CAF50;
}

.template-2 .template-job {
  color: #2E7D32;
}

.template-2 .template-company {
  color: #424242;
}

.template-2 .template-contact {
  color: #757575;
}

/* Template 3 - Executive Style */
.template-3 .template-name {
  color: #1A237E;
}

.template-3 .template-section-title {
  color: #1A237E;
  border-bottom: 2px solid #FF6F00;
}

.template-3 .template-job {
  color: #3F51B5;
}

.template-3 .template-company {
  color: #212121;
}

/* Template 4 - Creative Modern */
.template-4 .template-name {
  color: #6A1B9A;
}

.template-4 .template-section-title {
  color: #9C27B0;
  border-bottom: 1px solid #E91E63;
}

.template-4 .template-job {
  color: #6A1B9A;
}

.template-4 .template-company {
  color: #333333;
}

.template-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.template-info h3 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.template-info p {
  margin: 0 0 12px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.template-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  background: #f1f3f4;
  color: #5f6368;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.template-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.template-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cancel-btn {
  background: #f1f3f4;
  color: #5f6368;
}

.cancel-btn:hover {
  background: #e8eaed;
}

.select-btn {
  background: linear-gradient(135deg, #5082f7 0%, #4f39f3 100%);
  color: white;
}

.select-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(80, 130, 247, 0.3);
}

.select-btn:disabled {
  background: #ccc;
  color: #999;
  cursor: not-allowed;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .template-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .template-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .template-card {
    padding: 15px;
  }
  
  .template-preview {
    min-height: 150px;
  }
  
  .template-actions {
    flex-direction: column;
  }
  
  .template-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Custom Icon Colors */

/* Email Icons - Pastel Blue */
.fa-envelope {
  color: #60a5fa !important; /* Pastel blue */
}

/* Phone Icons - Soft Green */
.fa-phone {
  color: #34d399 !important; /* Soft green */
}

/* Location Icons - Warm Orange */
.fa-map-marker-alt {
  color: #fb923c !important; /* Warm orange */
}

/* PDF Download Icons - Red */
.fa-file-pdf {
  color: #ef4444 !important; /* PDF red */
}

/* Settings/Gear Icons - Gray */
.fa-gear {
  color: #6b7280 !important; /* Gray */
}

/* Trash/Delete Icons - Rose */
.fa-trash {
  color: #f43f5e !important; /* Rose/pink */
}

.chat-message.assistant.loading .bubble {
  background: var(--bg);
  color: var(--muted);
  position: relative;
  overflow: hidden;
}

.chat-message.assistant.loading .bubble::after {
  content: "Thinking";
  display: block;
  position: relative;
}

.chat-message.assistant.loading .bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(80, 130, 247, 0.2),
    transparent
  );
  animation: loading-glow 1.5s infinite;
}

@keyframes loading-glow {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

#chatSend {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#chatSend:hover {
  background: var(--secondary);
}

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

/* Desktop adjustments for chat */
@media (min-width: 769px) {
  .page#chatPage.active {
    height: calc(100vh - 2rem) !important;
    padding: 1rem 2rem !important;
  }
}

/* Mobile chat header - hidden by default */
.mobile-chat-header {
  display: none;
}

@media (max-width: 768px) {
  #chatPage {
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--card);
  }
  
  #chatPage.active {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-chat-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.25rem;
    background: var(--card);
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .mobile-chat-header span {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    margin-right: 2.5rem;
  }

  .chat-back-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    font-size: 1.2rem;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
  }

  .chat-back-btn:active {
    background: rgba(0, 0, 0, 0.05);
  }

  #chatContainer {
    margin: 0;
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: none;
    overflow: hidden;
  }
  
  #chatWindow {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  
  #chatInputBox {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 0.5rem;
    background: var(--card);
    border-top: 1px solid #ddd;
    margin: 0;
    z-index: 10;
  }

  .mobile-chat-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.25rem;
    background: var(--card);
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .mobile-chat-header {
    display: none; /* Hidden by default on desktop */
  }

  @media (max-width: 768px) {
    .mobile-chat-header {
      display: flex;
      align-items: center;
      padding: 0.5rem 0.25rem;
      background: var(--card);
      border-bottom: 1px solid #ddd;
      position: sticky;
      top: 0;
      z-index: 20;
    }
  }

  .chat-message {
    margin-bottom: 0.5em !important;
  }

  .mobile-chat-header span {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    margin-right: 2.5rem; /* Balance the back button width */
  }

  .chat-back-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    font-size: 1.2rem;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
  }

  .chat-back-btn:active {
    background: rgba(0, 0, 0, 0.05);
  }
  
  #chatContainer {
    margin: 0;
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: none;
    overflow: hidden;
  }
  
  #chatWindow {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 0.125rem;
    -webkit-overflow-scrolling: touch;
  }
  
  #chatInputBox {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.125rem;
    background: var(--card);
    border-top: 1px solid #ddd;
    margin: 0;
    z-index: 10;
  }

  /* Hide sidebar when chat is active on mobile */
  #chatPage.active + .sidebar {
    display: none;
  }
}

/* Info message styles */
.info-message {
  background: rgba(80, 130, 247, 0.1);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-message i {
  color: var(--primary);
  font-size: 16px;
}

/* URL button styling to match app */
.open-job-link-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.open-job-link-btn:hover {
  background: var(--secondary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.open-job-link-btn i {
  font-size: 14px;
}

.quick-actions-container {
  margin-top: 1rem;
}

.quick-action-item {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  background: var(--card);
}

.quick-action-item:last-child {
  margin-bottom: 0;
}

.quick-action-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.quick-action-item:hover .quick-action-icon {
  background: var(--primary);
  color: white;
}

.quick-action-content {
  flex: 1;
}

.quick-action-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.quick-action-description {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}