@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

:root {
  --burgundy: #971c3b;
  --burgundy-hover: #7a1730;
  --lavender: #9897F3;
  --lavender-hover: #7d7ce6;
  --navy: #161625;
  --navy-light: #1e1e32;
  --navy-border: #2a2a45;
  --text-primary: #f0f0f8;
  --text-secondary: #9090b0;
  --text-muted: #5a5a78;
  --surface: #1e1e32;
  --surface-2: #252540;
  --success: #4caf82;
  --warning: #e8a045;
}

/* ── Light mode ── */
body.light {
  --burgundy: #971c3b;
  --burgundy-hover: #7a1730;
  --lavender: #5f5ed6;
  --lavender-hover: #4a49c0;
  --navy: #f4f4f8;
  --navy-light: #ffffff;
  --navy-border: #dddde8;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888aa;
  --surface: #ffffff;
  --surface-2: #f0f0f6;
  --success: #2d8a5e;
  --warning: #c07820;
}

/* ── Theme toggle button ── */
.btn-theme {
  background: none;
  border: 1px solid var(--navy-border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.3rem 0.5rem;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s;
}

.btn-theme:hover {
  color: var(--text-secondary);
  border-color: var(--text-muted);
}


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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--navy);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Layout ── */
.app-shell {
  display: grid;
  grid-template-rows: 60px 1fr;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--navy-light);
  border-bottom: 1px solid var(--navy-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--lavender);
  letter-spacing: 0.01em;
}

.topbar-nav {
  display: flex;
  gap: 0.25rem;
}

.topbar-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.topbar-nav a:hover,
.topbar-nav a.active {
  color: var(--text-primary);
  background: var(--navy-border);
}

.topbar-nav a.active {
  color: var(--lavender);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-user img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--navy-border);
}

.btn-signout {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--navy-border);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.15s, border-color 0.15s;
}

.btn-signout:hover {
  color: var(--text-secondary);
  border-color: var(--text-muted);
}

.main-content {
  padding: 2.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Page Header ── */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Cards / Surfaces ── */
.card {
  background: var(--surface);
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  padding: 1.5rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

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

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

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

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--navy-border);
}

.btn-secondary:hover { background: var(--navy-border); }

.btn-ghost {
  background: transparent;
  color: var(--lavender);
  border: 1px solid var(--lavender);
}

.btn-ghost:hover {
  background: rgba(152, 151, 243, 0.08);
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
}

/* ── Login Page ── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--navy);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--navy-border);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--lavender);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #1f1f1f;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-google:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-google svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.login-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Search Page ── */
.search-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  align-items: center;
}

.filter-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.25rem;
}

.filter-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chip {
  font-size: 0.78rem;
  font-family: 'DM Sans', sans-serif;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--navy-border);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--lavender);
  color: var(--lavender);
}

.chip.active {
  background: rgba(152, 151, 243, 0.12);
  border-color: var(--lavender);
  color: var(--lavender);
}

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

.search-card {
  background: var(--surface);
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s;
}

.search-card:hover {
  border-color: var(--navy-border);
}

.search-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.search-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.source-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.source-hiringcafe {
  background: rgba(152, 151, 243, 0.12);
  color: var(--lavender);
}

.source-linkedin {
  background: rgba(10, 102, 194, 0.15);
  color: #5ba3d9;
}

.source-indeed {
  background: rgba(43, 110, 230, 0.12);
  color: #7baaf7;
}

.source-ats {
  background: rgba(76, 175, 130, 0.12);
  color: #4caf82;
}

.search-card-titles {
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.search-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Divider ── */
.section-divider {
  height: 1px;
  background: var(--navy-border);
  margin: 2rem 0;
}

/* ── Utility ── */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-lavender { color: var(--lavender); }
.text-sm { font-size: 0.85rem; }

.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .topbar { padding: 0 1rem; }
  .main-content { padding: 1.5rem 1rem; }
  .search-grid { grid-template-columns: 1fr; }
  .topbar-nav { display: none; }
}

/* ── Jobs Grid ── */
.jobs-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.job-card-review {
  border-color: rgba(232, 160, 69, 0.4);
}

.job-card-declined {
  opacity: 0.65;
  border-color: rgba(90, 90, 120, 0.5);
}

.job-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.job-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.job-card-company {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.job-card-badges {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge-review {
  background: rgba(232, 160, 69, 0.12);
  color: #e8a045;
}

.badge-interviewing {
  background: rgba(76, 175, 130, 0.12);
  color: #4caf82;
}

.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.job-card-activity {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.job-card-notes {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  line-height: 1.5;
}

.job-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1.5rem;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--navy-border);
  border-radius: 14px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.modal-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

/* ── Jobs grouping ── */
.jobs-date-heading {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--text-primary);
  padding: 1.5rem 0 0.25rem;
  border-bottom: 1px solid var(--navy-border);
  margin-bottom: 0.75rem;
}

.jobs-date-heading:first-child {
  padding-top: 0;
}

.jobs-loc-heading {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  margin-top: 0.75rem;
}

.jobs-col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 700px) {
  .jobs-col-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Wide modal (description viewer) ── */
.modal-wide {
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.desc-body {
  flex: 1;
  overflow-y: auto;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--navy-border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.desc-body p {
  margin-bottom: 0.5rem;
}

.desc-body br {
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Modal date picker row ── */
.modal-date-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-date-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-date-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--navy-border);
  background: var(--surface-2);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  cursor: pointer;
}

.modal-date-input:focus {
  border-color: var(--lavender);
}

/* Fix date input calendar icon color in dark mode */
.modal-date-input::-webkit-calendar-picker-indicator {
  filter: invert(0.6);
  cursor: pointer;
}

/* ── Applications controls (search + toggles) ── */
.apps-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.apps-toggles {
  display: flex;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  padding: 3px;
}

.btn-toggle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-toggle:hover {
  color: var(--text-secondary);
}

.btn-toggle.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.apps-search-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--navy-border);
  background: var(--surface);
  color: var(--text-primary);
  width: 260px;
  transition: border-color 0.15s;
  outline: none;
}

.apps-search-input::placeholder {
  color: var(--text-muted);
}

.apps-search-input:focus {
  border-color: var(--lavender);
}

@media (max-width: 640px) {
  .apps-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .apps-search-input {
    width: 100%;
  }
}

/* ── Pagination ── */
.apps-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* ── Interview and Declined action buttons ── */
.btn-interview {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(76, 175, 130, 0.4);
  background: rgba(76, 175, 130, 0.08);
  color: #4caf82;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-interview:hover {
  background: rgba(76, 175, 130, 0.15);
  border-color: rgba(76, 175, 130, 0.65);
}

.btn-interview:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-declined {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(151, 28, 59, 0.35);
  background: rgba(151, 28, 59, 0.08);
  color: #c45070;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-declined:hover {
  background: rgba(151, 28, 59, 0.15);
  border-color: rgba(151, 28, 59, 0.6);
}

.btn-declined:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Profile Page ─────────────────────────────────────────────────────────── */

.profile-section {
  margin-bottom: 0;
}

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

.profile-section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.profile-card {
  margin-bottom: 0;
}

/* ── Contact fields grid ── */
.profile-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
}

.profile-field-wide {
  grid-column: 1 / -1;
}

.profile-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.profile-field-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ── Text blocks ── */
.profile-text-block {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ── Tag list (skills / tools) ── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.profile-tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--navy-border);
  color: var(--text-secondary);
}

.profile-subsection {
  /* spacing handled inline */
}

/* ── Form elements ── */
.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group-wide {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

.form-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--navy-border);
  background: var(--surface-2);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.form-input:focus {
  border-color: var(--lavender);
}

.form-input::placeholder {
  color: var(--text-muted);
}

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

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ── Work Experience cards ── */
.we-card {
  margin-bottom: 0.75rem;
}

.we-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.we-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.we-card-company {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.we-card-dates {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.we-card-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.we-card-desc {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--navy-border);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.we-card-desc p {
  margin-bottom: 0.35rem;
}

/* ── Q&A cards ── */
.qa-card {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.qa-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.qa-card-question {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.qa-card-answer {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--navy-border);
}

/* ── Empty states ── */
.profile-empty {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 1.5rem 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .profile-fields-grid,
  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-field-wide,
  .form-group-wide {
    grid-column: 1;
  }

  .we-card-header {
    flex-direction: column;
  }
}

/* ── Settings Page ────────────────────────────────────────────────────────── */

.settings-section {
  margin-bottom: 2.5rem;
}

.settings-section-header {
  margin-bottom: 1.25rem;
}

.settings-tabs {
  display: flex;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.settings-tab {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.settings-tab:hover {
  color: var(--text-secondary);
}

.settings-tab.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ── Template cards (settings page) ──────────────────────────────────────── */

.tpl-card {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tpl-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tpl-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.tpl-card-meta {
  margin-top: 0.15rem;
}

.tpl-card-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.tpl-subjects {
  padding-top: 0.75rem;
  border-top: 1px solid var(--navy-border);
}

.tpl-subject-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.tpl-subject-num {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}

.tpl-subject-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tpl-body-preview {
  padding-top: 0.75rem;
  border-top: 1px solid var(--navy-border);
}

.tpl-body-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  padding: 0.65rem 0.85rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--navy-border);
  margin-top: 0.4rem;
}

/* ── Template picker rows (email modal) ───────────────────────────────────── */

.tpl-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.tpl-picker-row:hover {
  border-color: var(--lavender);
  background: rgba(152, 151, 243, 0.05);
}

.tpl-picker-row.selected {
  border-color: var(--lavender);
  background: rgba(152, 151, 243, 0.1);
}

.tpl-picker-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tpl-picker-meta {
  font-size: 0.78rem;
}

.tpl-subject-picker {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  justify-content: flex-start;
}

/* ── Contact emailed badge ────────────────────────────────────────────────── */

.contact-emailed-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #4caf82;
  background: rgba(76, 175, 130, 0.1);
  border: 1px solid rgba(76, 175, 130, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  width: fit-content;
}

/* ── Settings Page ────────────────────────────────────────────────────────── */

.settings-section {
  margin-bottom: 2.5rem;
}

.settings-section-header {
  margin-bottom: 1.25rem;
}

.settings-tabs {
  display: flex;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.settings-tab {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.settings-tab:hover {
  color: var(--text-secondary);
}

.settings-tab.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ── Template cards (settings page) ──────────────────────────────────────── */

.tpl-card {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tpl-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tpl-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.tpl-card-meta {
  margin-top: 0.15rem;
}

.tpl-card-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.tpl-subjects {
  padding-top: 0.75rem;
  border-top: 1px solid var(--navy-border);
}

.tpl-subject-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.tpl-subject-num {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}

.tpl-subject-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tpl-body-preview {
  padding-top: 0.75rem;
  border-top: 1px solid var(--navy-border);
}

.tpl-body-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  padding: 0.65rem 0.85rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--navy-border);
  margin-top: 0.4rem;
}

/* ── Template picker rows (email modal) ───────────────────────────────────── */

.tpl-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.tpl-picker-row:hover {
  border-color: var(--lavender);
  background: rgba(152, 151, 243, 0.05);
}

.tpl-picker-row.selected {
  border-color: var(--lavender);
  background: rgba(152, 151, 243, 0.1);
}

.tpl-picker-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tpl-picker-meta {
  font-size: 0.78rem;
}

.tpl-subject-picker {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  justify-content: flex-start;
}

/* ── Contact emailed badge ────────────────────────────────────────────────── */

.contact-emailed-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #4caf82;
  background: rgba(76, 175, 130, 0.1);
  border: 1px solid rgba(76, 175, 130, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  width: fit-content;
}

/* ── Email opens tracking display ─────────────────────────────────────────── */

.contact-opens {
  padding: 0.65rem 0.85rem;
  background: rgba(152, 151, 243, 0.06);
  border: 1px solid rgba(152, 151, 243, 0.2);
  border-radius: 8px;
}

.contact-opens-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--lavender);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.contact-opens-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.opens-timestamp {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.opens-num {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}

/* ── Settings Page ────────────────────────────────────────────────────────── */

.settings-section {
  margin-bottom: 2.5rem;
}

.settings-section-header {
  margin-bottom: 1.25rem;
}

.settings-tabs {
  display: flex;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.settings-tab {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.settings-tab:hover {
  color: var(--text-secondary);
}

.settings-tab.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ── Template cards (settings page) ──────────────────────────────────────── */

.tpl-card {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tpl-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tpl-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.tpl-card-meta {
  margin-top: 0.15rem;
}

.tpl-card-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.tpl-subjects {
  padding-top: 0.75rem;
  border-top: 1px solid var(--navy-border);
}

.tpl-subject-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.tpl-subject-num {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}

.tpl-subject-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tpl-body-preview {
  padding-top: 0.75rem;
  border-top: 1px solid var(--navy-border);
}

.tpl-body-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  padding: 0.65rem 0.85rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--navy-border);
  margin-top: 0.4rem;
}

/* ── Template picker rows (email modal) ───────────────────────────────────── */

.tpl-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--navy-border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.tpl-picker-row:hover {
  border-color: var(--lavender);
  background: rgba(152, 151, 243, 0.05);
}

.tpl-picker-row.selected {
  border-color: var(--lavender);
  background: rgba(152, 151, 243, 0.1);
}

.tpl-picker-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tpl-picker-meta {
  font-size: 0.78rem;
}

.tpl-subject-picker {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  justify-content: flex-start;
}

/* ── Contact emailed badge ────────────────────────────────────────────────── */

.contact-emailed-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #4caf82;
  background: rgba(76, 175, 130, 0.1);
  border: 1px solid rgba(76, 175, 130, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  width: fit-content;
}

/* ── Email opens tracking display ─────────────────────────────────────────── */

.contact-opens {
  padding: 0.65rem 0.85rem;
  background: rgba(152, 151, 243, 0.06);
  border: 1px solid rgba(152, 151, 243, 0.2);
  border-radius: 8px;
}

.contact-opens-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--lavender);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.contact-opens-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.opens-timestamp {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.opens-num {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 14px;
  flex-shrink: 0;
}

/* ── Contact card stat rows ───────────────────────────────────────────────── */

.contact-stats {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 0.8rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--navy-border);
}

.contact-stat-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.contact-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 110px;
}

.contact-stat-value {
  font-size: 0.82rem;
  color: var(--text-primary);
}

/* ── Email Log modal entries ──────────────────────────────────────────────── */

.email-log-entry {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--navy-border);
}

.email-log-entry:last-child {
  border-bottom: none;
}

.email-log-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 18px;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.email-log-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.email-log-subject {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.email-log-sent {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.email-log-opens {
  margin-top: 0.35rem;
  padding: 0.5rem 0.7rem;
  background: rgba(76, 175, 130, 0.08);
  border: 1px solid rgba(76, 175, 130, 0.2);
  border-radius: 6px;
}

.email-log-opens-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #4caf82;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.email-log-open-time {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.email-log-not-opened {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Match Score Badges ── */
.badge-score-strong {
  background: rgba(45, 138, 94, 0.15);
  color: #2d8a5e;
  border: 1px solid rgba(45, 138, 94, 0.3);
}

.badge-score-moderate {
  background: rgba(180, 140, 30, 0.15);
  color: #b48c1e;
  border: 1px solid rgba(180, 140, 30, 0.3);
}

.badge-score-weak {
  background: rgba(180, 100, 30, 0.15);
  color: #b4641e;
  border: 1px solid rgba(180, 100, 30, 0.3);
}

.badge-score-low {
  background: rgba(180, 50, 50, 0.15);
  color: #b43232;
  border: 1px solid rgba(180, 50, 50, 0.3);
}

.score-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

/* Prevent other badges from stretching to match score-block height */
.job-card-badges {
  align-items: flex-start;
}

.score-block .source-badge {
  font-size: 0.7rem;
}

.score-breakdown {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}