.job-card-v275 {
  position: relative;
  overflow: hidden;
}

.job-card-v275::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
  opacity: .9;
}

.job-card-v275 .job-title {
  font-size: 1.28rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.job-card-v275 .job-company {
  font-size: .98rem;
  overflow-wrap: anywhere;
}

.job-card-v275 .job-card-heading-row > div:first-child {
  min-width: 0;
}

.job-card-v275 .match-status {
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.job-card-v275 .job-match-reason,
.job-card-v275 .job-missing-skills,
.job-card-v275 .job-match-reason p,
.job-card-v275 .job-missing-skills p {
  white-space: normal;
  overflow-wrap: anywhere;
}

.job-card-v275 .match-ring {
  box-shadow: 0 0 0 8px rgba(37, 99, 235, .06), 0 16px 34px rgba(0, 0, 0, .16);
}

.company-logo-v275 {
  position: relative;
}

.company-logo-v275::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.22);
  opacity: .65;
}

@media (max-width: 800px) {
  .job-card-v275 .job-card-heading-row {
    align-items: flex-start;
  }
}

/* Sprint 18 profile layout refinements. */
.profile-page {
  max-width: 1240px !important;
}

.profile-form {
  display: block !important;
  column-count: 2;
  column-gap: 1rem;
}

.profile-form > .profile-error-summary,
.profile-form > .profile-save-bar {
  column-span: all;
  width: 100% !important;
}

.profile-form > section.profile-card {
  display: inline-block;
  width: 100% !important;
  margin: 0 0 1rem !important;
  break-inside: avoid;
  page-break-inside: avoid;
  vertical-align: top;
}

.profile-form > section.profile-card:nth-of-type(4) {
  break-before: column;
}

.profile-card,
.profile-card.full {
  padding: 1.1rem 1.25rem !important;
}

.profile-card h2 {
  margin-bottom: 1rem !important;
}

.profile-field {
  min-width: 0;
  margin-bottom: .8rem !important;
}

.profile-grid-2,
.profile-grid-location,
.profile-grid-career,
.profile-grid-salary {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  align-items: start !important;
}

.profile-grid-2 > .profile-field,
.profile-grid-location > .profile-field,
.profile-grid-career > .profile-field,
.profile-grid-salary > .profile-field {
  margin-bottom: 0 !important;
}

.profile-grid-salary > .profile-field:nth-child(3) {
  grid-column: 1 !important;
}

.profile-grid-location label,
.profile-grid-2 label,
.profile-grid-career label,
.profile-grid-salary label {
  min-height: 1.35rem;
  display: flex;
  align-items: flex-end;
}

.compact-country,
.compact-state,
.compact-years {
  max-width: none !important;
}

.profile-grid-salary select {
  width: 100% !important;
  min-width: 0 !important;
  padding-right: 2.2rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-grid-salary option {
  white-space: normal;
}

.profile-status-row {
  margin-bottom: .85rem !important;
}

.profile-save-bar {
  position: sticky;
  bottom: .5rem !important;
  margin-top: 0 !important;
}

/* Keep paired Telephone and LinkedIn fields on the exact same baseline. */
.profile-grid-2 {
  align-items: start !important;
}

.profile-grid-2 > .profile-field {
  display: grid !important;
  grid-template-rows: 24px 44px minmax(38px, auto) !important;
  row-gap: 6px !important;
  align-content: start !important;
  padding: 0 !important;
}

.profile-grid-2 > .profile-field > label {
  display: flex !important;
  align-items: center !important;
  height: 24px !important;
  min-height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 24px !important;
}

.profile-grid-2 > .profile-field > input {
  display: block !important;
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  align-self: start !important;
}

.profile-grid-2 > .profile-field > .profile-help {
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.35 !important;
  align-self: start !important;
}

/* Shared chip UI for industries, skills, and certifications. */
.profile-picker-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: stretch;
}

.profile-picker-entry-row input {
  min-width: 0;
}

.profile-entry-tags,
.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .55rem;
}

.profile-entry-chip,
.industry-tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 38px;
  padding: .42rem .65rem;
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8;
  line-height: 1.15;
}

.profile-entry-chip-remove,
.industry-tag button {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.profile-entry-chip-remove:hover,
.profile-entry-chip-remove:focus,
.industry-tag button:hover,
.industry-tag button:focus {
  background: rgba(37, 99, 235, .14);
  outline: none;
}

.profile-skills-storage {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.profile-picker-message {
  margin: .4rem 0 0;
  font-size: .8rem;
  color: #475569;
}

.profile-picker-message.is-error {
  color: #dc2626;
  font-weight: 600;
}

/* Profile dark mode follows the blue/purple dashboard visual language. */
html[data-theme="dark"] .profile-status-row,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .profile-card.full,
html[data-theme="dark"] .profile-save-bar {
  border-color: rgba(148, 163, 184, .26) !important;
  background: linear-gradient(145deg, rgba(45, 61, 116, .97), rgba(39, 49, 96, .97)) !important;
  color: #f8fafc !important;
  box-shadow: 0 12px 28px rgba(2, 6, 23, .24) !important;
}

html[data-theme="dark"] .profile-card h2,
html[data-theme="dark"] .profile-card label,
html[data-theme="dark"] .profile-status-row strong,
html[data-theme="dark"] .profile-card p,
html[data-theme="dark"] .profile-card .s7-muted,
html[data-theme="dark"] .profile-status-row .s7-muted,
html[data-theme="dark"] .profile-save-bar {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .profile-card .profile-help,
html[data-theme="dark"] .profile-card > p.s7-muted,
html[data-theme="dark"] .profile-picker-message {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .profile-form input,
html[data-theme="dark"] .profile-form select,
html[data-theme="dark"] .profile-form textarea,
html[data-theme="dark"] .profile-picker-entry-row input {
  border-color: rgba(148, 163, 184, .38) !important;
  background: rgba(15, 23, 42, .62) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

html[data-theme="dark"] .profile-form input::placeholder,
html[data-theme="dark"] .profile-form textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

html[data-theme="dark"] .profile-form input:focus,
html[data-theme="dark"] .profile-form select:focus,
html[data-theme="dark"] .profile-form textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .18) !important;
}

html[data-theme="dark"] .profile-section-number {
  background: linear-gradient(135deg, rgba(37, 99, 235, .35), rgba(14, 165, 233, .24)) !important;
  color: #7dd3fc !important;
}

html[data-theme="dark"] .profile-entry-chip,
html[data-theme="dark"] .industry-tag {
  border-color: rgba(56, 189, 248, .34) !important;
  background: rgba(37, 99, 235, .24) !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] .profile-entry-chip-remove:hover,
html[data-theme="dark"] .profile-entry-chip-remove:focus,
html[data-theme="dark"] .industry-tag button:hover,
html[data-theme="dark"] .industry-tag button:focus {
  background: rgba(125, 211, 252, .18) !important;
}

html[data-theme="dark"] .profile-card .s7-button-secondary,
html[data-theme="dark"] .profile-save-bar .s7-button-secondary {
  border-color: rgba(148, 163, 184, .38) !important;
  background: rgba(15, 23, 42, .52) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .city-dropdown {
  border-color: rgba(148, 163, 184, .38) !important;
  background: #172554 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .city-option {
  border-color: rgba(148, 163, 184, .18) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .city-option:hover,
html[data-theme="dark"] .city-option:focus {
  background: rgba(37, 99, 235, .28) !important;
}

html[data-theme="dark"] .profile-picker-message.is-error,
html[data-theme="dark"] .field-error-message,
html[data-theme="dark"] .required-star {
  color: #fca5a5 !important;
}

html[data-theme="dark"] .profile-form .field-error {
  border-color: #f87171 !important;
  background: rgba(127, 29, 29, .28) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .14) !important;
}

@media (max-width: 1050px) {
  .profile-page {
    max-width: 900px !important;
  }

  .profile-form {
    column-count: 1;
  }

  .profile-form > section.profile-card:nth-of-type(4) {
    break-before: auto;
  }

  .profile-card {
    padding: 1rem 1.1rem !important;
  }
}

@media (max-width: 760px) {
  .profile-grid-2,
  .profile-grid-location,
  .profile-grid-career,
  .profile-grid-salary {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .7rem !important;
  }

  .profile-grid-2 > .profile-field {
    grid-template-rows: 24px 44px auto !important;
  }

  .profile-grid-salary > .profile-field:nth-child(3) {
    grid-column: auto !important;
  }

  .profile-card {
    padding: .9rem !important;
  }

  .profile-picker-entry-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-picker-entry-row button {
    width: 100%;
  }
}
