:root {
  --white: #ffffff;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: rgba(255, 255, 255, 0.98);

  --text-main: #ffffff;
  --text-dark: #20324f;

  --blue-main: #86b8f5;
  --blue-dark: #5f98e6;
  --blue-soft: #edf5ff;
  --blue-soft-2: #f7fbff;
  --blue-border: rgba(156, 192, 241, 0.34);
  --blue-border-strong: rgba(95, 152, 230, 0.28);

  --border-card: rgba(174, 200, 232, 0.34);

  --shadow-hero: 0 16px 36px rgba(28, 59, 106, 0.16);
  --shadow-card: 0 12px 28px rgba(21, 45, 82, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main);
  position: relative;
  overflow-x: hidden;
  overflow-y: hidden;
  background-color: #101c31;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(17, 30, 54, 0.40), rgba(17, 30, 54, 0.50)),
    url("../images/bg.jpg") center center / cover no-repeat;
  transform: scale(1.02);
  filter: blur(4px);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(12, 22, 40, 0.03) 0%, rgba(12, 22, 40, 0.18) 100%);
  z-index: -1;
}

a {
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 18px 28px 0;
  flex: 0 0 auto;
}

.topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-title {
  color: var(--white);
  font-size: 1.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  margin-left: auto;
}

.top-nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.98rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.top-nav-link:hover,
.top-nav-link.active {
  color: var(--white);
}

.hero-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 18px;
  min-height: 0;
}

.hero-container {
  max-width: 1360px;
}

.hero-content {
  max-width: 1320px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 2.9vw, 3.1rem);
  line-height: 1.08;
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.search-panel {
  position: relative;
  width: min(820px, 100%);
  margin: 0 auto 16px;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 9px 10px 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-hero);
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.search-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f1f6fd;
  color: #6f91c4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.search-input {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--text-dark) !important;
  min-height: 46px;
  font-size: 1rem;
  font-weight: 500;
  padding-left: 0;
}

.search-input::placeholder {
  color: #8294b2;
}

.search-btn {
  border: none;
  min-width: 144px;
  min-height: 50px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-main), var(--blue-dark));
  color: var(--white);
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(95, 152, 230, 0.22);
  transition: all 0.22s ease;
  flex-shrink: 0;
}

.search-btn:hover {
  color: var(--white);
  transform: translateY(-1px);
}

.suggestion-box {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: var(--surface-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  z-index: 30;
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.suggestion-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 13px 18px;
  color: #20324f;
  font-weight: 600;
  font-size: 0.96rem;
  transition: background 0.2s ease;
}

.suggestion-item:hover {
  background: #eef5ff;
}

/* KHỐI LĨNH VỰC */
.field-panel {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 38px 36px 34px;
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow-hero);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.field-panel-title {
  text-align: center;
  margin: 0 0 24px;
  color: #6e84a8;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.field-tag {
  border: none;
  background: transparent;
  padding: 0;
}

.field-card {
  border: 1px solid var(--border-card);
  background: linear-gradient(180deg, #fbfcff 0%, #eef4ff 100%);
  border-radius: 24px;
  padding: 28px 22px;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 18px;
  cursor: pointer;
  transition: all 0.24s ease;
}

.field-card:hover,
.field-card.is-active {
  transform: translateY(-3px);
  border-color: var(--blue-border-strong);
  box-shadow: 0 18px 34px rgba(31, 67, 121, 0.10);
  background: linear-gradient(180deg, #fdfefe 0%, #e6f0ff 100%);
}

.field-icon-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1px solid var(--blue-border);
  background: #ffffff;
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(95, 152, 230, 0.14);
}

.field-text {
  color: #243757;
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.45;
  max-width: 220px;
}

.field-preview {
  width: min(1120px, 100%);
  margin: 14px auto 0;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.55);
  text-align: left;
}

.field-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

#fieldPreviewTitle {
  color: #20324f;
  font-size: 1.04rem;
  font-weight: 800;
}

.btn-close-preview {
  border: none;
  background: var(--blue-soft);
  color: var(--blue-dark);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-close-preview:hover {
  background: #deebff;
}

.field-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.preview-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--blue-soft-2);
  border: 1px solid #deebfb;
  color: #243757;
  font-size: 0.94rem;
  font-weight: 600;
}

.preview-list-item i {
  color: var(--blue-dark);
  font-size: 0.98rem;
}

@media (max-width: 991px) {
  html,
  body {
    height: auto;
  }

  body {
    overflow-y: auto;
  }

  .topbar {
    padding: 18px 16px 0;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .top-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 18px;
    margin-left: 0;
  }

  .hero-stage {
    min-height: auto;
    padding: 24px 0 28px;
  }

  .hero-title {
    font-size: 2.1rem;
    white-space: normal;
  }

  .search-wrapper {
    flex-direction: column;
    align-items: stretch;
    border-radius: 24px;
    min-height: auto;
    padding: 14px;
  }

  .search-icon {
    display: none;
  }

  .search-btn {
    width: 100%;
    min-width: unset;
  }

  .field-grid,
  .field-preview-list {
    grid-template-columns: 1fr;
  }

  .field-panel {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .field-card {
    min-height: 170px;
  }

  .field-preview {
    padding: 16px;
  }

  .field-preview-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575px) {
  .brand-title {
    font-size: 1.34rem;
    text-align: center;
  }

  .top-nav-link {
    font-size: 0.94rem;
  }

  .hero-title {
    font-size: 1.76rem;
  }

  .search-input {
    font-size: 0.98rem;
  }

  .field-icon-circle {
    width: 72px;
    height: 72px;
    font-size: 1.8rem;
  }

  .field-card {
    padding: 22px 16px;
  }
}

/* =========================
   HOME -> JOBS PAGE
========================= */

.jobs-page {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 18px;
  min-height: 0;
}

.jobs-stage {
  width: 100%;
}

.jobs-container {
  max-width: 1360px;
  margin: 0 auto;
}

.jobs-content {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.jobs-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 2.7vw, 2.9rem);
  line-height: 1.08;
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  letter-spacing: -0.01em;
}

/* Thanh tìm kiếm trang 2 */
.jobs-search-panel {
  width: min(1060px, 100%);
  margin: 0 auto 14px;
}

.jobs-search-panel .search-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 90px;
  padding: 12px 14px 12px 22px;
  border-radius: 999px;
  background: rgba(244, 245, 248, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 30px rgba(21, 45, 82, 0.12);
}

.jobs-search-panel .search-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  color: #6c91cf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.jobs-search-panel .search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #5f7394 !important;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 0;
  outline: none;
}

.jobs-search-panel .search-input::placeholder {
  color: #8ea0bc;
  font-weight: 600;
}

.jobs-search-panel .search-btn {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 186px;
  min-height: 64px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #84b5f6, #6a9fe8);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(95, 152, 230, 0.24);
  transition: all 0.22s ease;
}

.jobs-search-panel .search-btn:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(95, 152, 230, 0.28);
}

.jobs-result-count {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 600;
}

.jobs-result-panel {
  width: min(920px, 100%);
  margin: 0 auto;
}

.jobs-result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 395px;
  overflow-y: auto;
  padding-right: 4px;
}

.jobs-result-list::-webkit-scrollbar {
  width: 8px;
}

.jobs-result-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.jobs-result-list::-webkit-scrollbar-track {
  background: transparent;
}

.jobs-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(21, 45, 82, 0.10);
}

.jobs-result-info {
  flex: 1;
  min-width: 0;
}

.jobs-item-title {
  margin: 0 0 6px;
  color: #20324f;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
}

.jobs-item-meta {
  margin: 0 0 3px;
  color: #516789;
  font-size: 0.9rem;
  line-height: 1.45;
}

.jobs-result-action {
  flex: 0 0 auto;
}

.jobs-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-main), var(--blue-dark));
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 800;
  transition: all 0.22s ease;
}

.jobs-detail-btn:hover {
  color: var(--white);
  transform: translateY(-1px);
}

.jobs-empty-state {
  display: none;
  padding: 0;
  margin-top: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.jobs-empty-state p {
  margin: 0;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}

@media (max-width: 991px) {
  .jobs-page {
    min-height: auto;
    padding: 24px 0 28px;
  }

  .jobs-title {
    font-size: 2rem;
    white-space: normal;
  }

  .jobs-search-panel {
    width: 100%;
  }

  .jobs-search-panel .search-wrapper {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 14px;
    border-radius: 28px;
  }

  .jobs-search-panel .search-icon {
    display: none;
  }

  .jobs-search-panel .search-btn {
    width: 100%;
    min-width: unset;
    min-height: 56px;
  }

  .jobs-result-list {
    max-height: none;
    overflow-y: visible;
  }

  .jobs-result-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
  }

  .jobs-result-action {
    width: 100%;
  }

  .jobs-detail-btn {
    width: 100%;
  }
}

@media (max-width: 575px) {
  .jobs-title {
    font-size: 1.72rem;
  }

  .jobs-search-panel .search-input {
    font-size: 0.98rem;
  }

  .jobs-result-item {
    padding: 13px;
  }

  .jobs-item-title {
    font-size: 0.96rem;
  }

  .jobs-item-meta {
    font-size: 0.88rem;
  }
}
/* =========================
   JOB DETAIL + MATCH PAGE
========================= */

.job-detail-page {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 18px;
  min-height: 0;
}

.job-detail-stage {
  width: 100%;
}

.job-detail-container {
  max-width: 1360px;
  margin: 0 auto;
}

.job-detail-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  transition: all 0.25s ease;
}

.job-detail-layout.is-match-mode {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: stretch;
}

.job-detail-left,
.job-detail-right {
  min-width: 0;
}

.job-detail-card,
.match-result-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  box-shadow: 0 16px 36px rgba(21, 45, 82, 0.14);
  overflow: hidden;
}

.job-detail-card-scroll,
.match-result-card-scroll {
  max-height: 76vh;
  overflow-y: auto;
  padding: 24px 24px 22px;
}

.job-detail-card-scroll::-webkit-scrollbar,
.match-result-card-scroll::-webkit-scrollbar {
  width: 8px;
}

.job-detail-card-scroll::-webkit-scrollbar-thumb,
.match-result-card-scroll::-webkit-scrollbar-thumb {
  background: rgba(95, 152, 230, 0.28);
  border-radius: 999px;
}

.job-detail-breadcrumb {
  margin: 0 0 14px;
  color: #6d84ab;
  font-size: 0.92rem;
  font-weight: 600;
}

.job-detail-breadcrumb a {
  color: #6d84ab;
}

.job-detail-breadcrumb span {
  margin: 0 6px;
}

.job-detail-title {
  margin: 0 0 16px;
  color: #20324f;
  font-size: clamp(1.6rem, 2.2vw, 2.3rem);
  line-height: 1.22;
  font-weight: 900;
}

.job-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-bottom: 18px;
}

.job-detail-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f6faff;
  border: 1px solid #deebfb;
  color: #31496c;
  font-size: 0.94rem;
  line-height: 1.45;
}

.job-detail-meta-item i {
  color: #6a9fe8;
  font-size: 1rem;
  margin-top: 2px;
}

.job-detail-section {
  margin-top: 18px;
}

.job-detail-section h2 {
  margin: 0 0 10px;
  color: #243757;
  font-size: 1.05rem;
  font-weight: 800;
}

.job-detail-content-block {
  padding: 14px 16px;
  border-radius: 18px;
  background: #fbfdff;
  border: 1px solid #e5eefb;
  color: #304666;
  line-height: 1.65;
  white-space: pre-line;
}

.job-kst-note {
  margin: 0 0 10px;
  color: #6b7fa1;
  font-size: 0.92rem;
}

.job-kst-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.job-kst-box {
  border-radius: 16px;
  padding: 14px;
  background: #f7fbff;
  border: 1px solid #dfebfb;
}

.job-kst-box h4 {
  margin: 0 0 8px;
  color: #28415f;
  font-size: 0.96rem;
  font-weight: 800;
}

.job-kst-box ul {
  margin: 0;
  padding-left: 18px;
  color: #415a7f;
}

.job-kst-box li {
  margin-bottom: 4px;
}

.job-detail-action-bar {
  margin-top: 22px;
  display: flex;
  justify-content: flex-start;
}

.job-primary-btn {
  border: none;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-main), var(--blue-dark));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(95, 152, 230, 0.22);
  cursor: pointer;
  transition: all 0.22s ease;
}

.job-primary-btn:hover {
  transform: translateY(-1px);
}

.profile-upload-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #dceafa;
}

.upload-title {
  margin: 0 0 8px;
  color: #243757;
  font-size: 1rem;
  font-weight: 800;
}

.upload-desc {
  margin: 0 0 14px;
  color: #60779c;
  line-height: 1.55;
  font-size: 0.92rem;
}

.upload-desc code {
  background: #eef5ff;
  border-radius: 8px;
  padding: 2px 6px;
  color: #26405f;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-box input[type="file"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #dce7f7;
  background: #fff;
  color: #334968;
}

.upload-status {
  margin: 12px 0 0;
  color: #5f7394;
  font-size: 0.92rem;
  font-weight: 600;
}

.match-result-card {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.match-result-title {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
}

.match-score-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.match-score-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.match-score-circle span {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 900;
}

.match-score-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
}

#matchScoreLabel {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

#matchScoreSubtext {
  font-size: 0.92rem;
  line-height: 1.5;
}

.match-stat-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.match-stat-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.match-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  line-height: 1.45;
}

.match-stat-item strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 1.1rem;
}

.match-group-section {
  margin-top: 18px;
}

.match-group-section h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.match-group-wrap {
  display: grid;
  gap: 10px;
}

.match-group-box {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.match-group-box h4 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
}

.match-group-box ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.92);
}

.match-group-box li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.match-empty {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
}

.job-detail-empty-state {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #20324f;
  text-align: center;
  font-weight: 700;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .job-detail-layout.is-match-mode {
    grid-template-columns: 1fr;
  }

  .match-result-card-scroll,
  .job-detail-card-scroll {
    max-height: none;
  }
}

@media (max-width: 767px) {
  .job-detail-meta,
  .match-stat-grid,
  .job-kst-summary {
    grid-template-columns: 1fr;
  }

  .upload-box {
    flex-direction: column;
    align-items: stretch;
  }

  .match-score-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   POSITION PROFILE PAGE - FINAL
========================= */

.position-profile-body {
  overflow: hidden;
}

.position-profile-body .page-shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.position-profile-page {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 12px 0 16px;
  min-height: 0;
  overflow: hidden;
}

.position-profile-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.position-profile-container {
  width: min(1360px, calc(100% - 48px));
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* Heading */
.position-profile-heading {
  flex: 0 0 auto;
  width: min(1120px, 100%);
  margin: 0 auto 12px;
  text-align: center;
}

.position-profile-title {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: clamp(1.9rem, 2.8vw, 2.8rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.position-profile-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 650;
}

/* Search area */
.position-search-panel {
  flex: 0 0 auto;
  width: min(1080px, 100%);
  margin: 0 auto 12px;
}

.position-search-wrapper {
  width: 100%;
  min-height: 74px;
  padding: 9px 12px 9px 28px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  border-radius: 999px;
  background: rgba(244, 245, 248, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 34px rgba(15, 35, 66, 0.18);
}

.position-search-wrapper .search-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: #5f98e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.28rem;
}

.position-search-wrapper .search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #243757 !important;
  font-size: 1.05rem;
  font-weight: 750;
}

.position-search-wrapper .search-input::placeholder {
  color: #8ea0bc;
  font-weight: 750;
}

.position-search-wrapper .search-btn {
  flex: 0 0 auto;
  min-width: 170px;
  min-height: 56px;
  padding: 0 30px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #86b8f5, #5f98e6);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(95, 152, 230, 0.28);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.position-search-wrapper .search-btn:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(95, 152, 230, 0.34);
}

/* Select quick row */
.position-select-row {
  width: min(820px, 100%);
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.position-select-label {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.98rem;
  font-weight: 850;
  white-space: nowrap;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.position-select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 650px;
  min-height: 50px;
  padding: 0 42px 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 18px;
  outline: none;
  background: rgba(244, 245, 248, 0.96);
  color: #20324f;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 35, 66, 0.13);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-select:focus {
  border-color: rgba(95, 152, 230, 0.82);
  box-shadow: 0 0 0 4px rgba(95, 152, 230, 0.2);
}

/* Empty state */
.position-empty-state {
  flex: 0 0 auto;
  width: min(920px, 100%);
  margin: 10px auto 0;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: #20324f;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(21, 45, 82, 0.13);
}

/* Main layout: không cuộn page, chỉ cuộn trong card */
.position-profile-layout {
  flex: 1 1 auto;
  min-height: 0;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.position-profile-layout.is-match-mode {
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  align-items: stretch;
}

.position-profile-left,
.position-profile-right {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.position-profile-card,
.profile-match-card {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(21, 45, 82, 0.16);
}

.position-profile-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.position-profile-card-scroll,
.profile-match-card-scroll {
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 22px;
}

.position-profile-card-scroll::-webkit-scrollbar,
.profile-match-card-scroll::-webkit-scrollbar {
  width: 8px;
}

.position-profile-card-scroll::-webkit-scrollbar-thumb,
.profile-match-card-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(95, 152, 230, 0.32);
}

.profile-card-title {
  margin: 0 0 14px;
  color: #20324f;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.2;
  font-weight: 950;
}

/* Meta */
.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 14px;
}

.profile-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 17px;
  background: #f6faff;
  border: 1px solid #deebfb;
  color: #31496c;
  font-size: 0.93rem;
  line-height: 1.46;
}

.profile-meta-item i {
  color: #6a9fe8;
  font-size: 1.03rem;
  margin-top: 2px;
}

.profile-card-note {
  margin: 0 0 14px;
  color: #647b9f;
  font-size: 0.92rem;
  line-height: 1.55;
}

/* K-S-T sections */
.profile-section {
  margin-top: 14px;
}

.profile-section h3 {
  margin: 0 0 8px;
  color: #243757;
  font-size: 1rem;
  font-weight: 900;
}

.profile-list-box {
  padding: 13px 16px;
  border-radius: 18px;
  background: #fbfdff;
  border: 1px solid #e3eefb;
}

.profile-list-box ul {
  margin: 0;
  padding-left: 18px;
  color: #334968;
}

.profile-list-box li {
  margin-bottom: 4px;
  line-height: 1.52;
}

.profile-list-empty {
  margin: 0;
  color: #6b7fa1;
  font-size: 0.94rem;
}

.profile-term-count {
  color: #6b7fa1;
  font-size: 0.88rem;
  font-weight: 650;
}

/* Buttons */
.profile-action-bar {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

.profile-primary-btn {
  min-height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #86b8f5, #5f98e6);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(95, 152, 230, 0.25);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.profile-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(95, 152, 230, 0.32);
}

/* Upload panel */
.profile-upload-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid #dceafa;
}

.upload-title {
  margin: 0 0 8px;
  color: #243757;
  font-size: 1rem;
  font-weight: 900;
}

.upload-desc {
  margin: 0 0 13px;
  color: #60779c;
  line-height: 1.55;
  font-size: 0.92rem;
}

.upload-desc code {
  padding: 2px 7px;
  border-radius: 8px;
  background: #eef5ff;
  color: #26405f;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-box input[type="file"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #dce7f7;
  background: #ffffff;
  color: #334968;
}

.upload-status {
  margin: 10px 0 0;
  color: #5f7394;
  font-size: 0.91rem;
  font-weight: 650;
}

/* Right match card */
.profile-match-card {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.profile-match-title {
  margin: 0 0 15px;
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 950;
}

.profile-match-score-panel {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.profile-match-score-circle {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-match-score-circle span {
  color: #ffffff;
  font-size: 1.28rem;
  font-weight: 950;
}

.profile-match-score-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
}

#matchScoreLabel {
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 900;
}

#matchScoreSubtext {
  font-size: 0.9rem;
  line-height: 1.5;
}

.profile-match-stat-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.profile-match-stat-item {
  padding: 13px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-match-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  line-height: 1.42;
}

.profile-match-stat-item strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 1.08rem;
}

.profile-match-group-section {
  margin-top: 16px;
}

.profile-match-group-section h3 {
  margin: 0 0 9px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.profile-match-group-wrap {
  display: grid;
  gap: 9px;
}

.profile-match-group-box,
.match-group-box {
  padding: 13px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.profile-match-group-box h4,
.match-group-box h4 {
  margin: 0 0 9px;
  color: #ffffff;
  font-size: 0.93rem;
  font-weight: 900;
}

.profile-match-group-box ul,
.match-group-box ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.92);
}

.profile-match-group-box li,
.match-group-box li {
  margin-bottom: 4px;
  line-height: 1.48;
}

.profile-match-empty,
.match-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.91rem;
}

/* Utility */
.is-hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .position-profile-layout.is-match-mode {
    grid-template-columns: 1fr;
  }

  .position-profile-card-scroll,
  .profile-match-card-scroll {
    height: 100%;
    max-height: none;
  }
}

@media (max-width: 767px) {
  .position-profile-body {
    overflow-y: auto;
  }

  .position-profile-body .page-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .position-profile-page {
    overflow: visible;
  }

  .position-profile-container {
    width: min(100% - 28px, 680px);
  }

  .position-profile-title {
    font-size: 2rem;
  }

  .position-profile-subtitle {
    font-size: 0.95rem;
  }

  .position-search-wrapper {
    min-height: auto;
    padding: 14px;
    border-radius: 28px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .position-search-wrapper .search-icon {
    display: none;
  }

  .position-search-wrapper .search-input {
    min-height: 52px;
    padding: 0 8px !important;
  }

  .position-search-wrapper .search-btn {
    width: 100%;
    min-width: unset;
    min-height: 56px;
  }

  .position-select-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .position-select-label {
    text-align: center;
  }

  .position-select {
    width: 100%;
    max-width: 100%;
  }

  .position-profile-layout {
    overflow: visible;
  }

  .position-profile-left,
  .position-profile-right,
  .position-profile-card,
  .profile-match-card {
    height: auto;
  }

  .position-profile-card-scroll,
  .profile-match-card-scroll {
    height: auto;
    overflow-y: visible;
  }

  .profile-meta-grid,
  .profile-match-stat-grid {
    grid-template-columns: 1fr;
  }

  .upload-box {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-match-score-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
HOME FIELD MODAL
========================= */
.home-page {
overflow-y: hidden;
}
/* Lớp phủ nhẹ khi mở pop-up */
.home-page.field-modal-open .page-shell::before {
content: "";
position: fixed;
inset: 0;
background: rgba(7, 18, 36, 0.34);
backdrop-filter: blur(2px);
z-index: 900;
}
/* Biến field-preview thành pop-up */
.home-page .field-preview {
position: fixed;
top: 50%;
left: 50%;
width: min(66.666vw, 1120px);
max-width: calc(100vw - 56px);
height: min(70vh, 720px);
max-height: calc(100vh - 110px);
margin: 0;
transform: translate(-50%, -50%);
z-index: 1000;
display: flex;
flex-direction: column;
padding: 22px 24px;
border-radius: 26px;
background: rgba(255, 255, 255, 0.98);
box-shadow: 0 24px 60px rgba(5, 16, 34, 0.30);
border: 1px solid rgba(255, 255, 255, 0.78);
text-align: left;
}
.home-page .field-preview.d-none {
display: none !important;
}
.home-page .field-preview-header {
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 16px;
}
.home-page #fieldPreviewTitle {
color: #20324f;
font-size: 1.1rem;
font-weight: 900;
line-height: 1.35;
}
.home-page .btn-close-preview {
border: none;
min-width: 78px;
padding: 10px 16px;
border-radius: 999px;
background: #edf5ff;
color: #5f98e6;
font-weight: 900;
cursor: pointer;
}
.home-page .btn-close-preview {
background: #deebff;
}
/* Danh sách 2 cột, cuộn trong pop-up */
.home-page .field-preview-list {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
padding-right: 8px;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
align-content: start;
gap: 12px 14px;
}
.home-page .field-preview-list::-webkit-scrollbar {
width: 8px;
}
.home-page .field-preview-list::-webkit-scrollbar-thumb {
background: rgba(95, 152, 230, 0.36);
border-radius: 999px;
}
.home-page .field-preview-list::-webkit-scrollbar-track {
background: transparent;
}
.home-page .preview-list-item {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 12px;
min-height: 58px;
padding: 12px 14px;
border-radius: 16px;
background: #f7fbff;
border: 1px solid #dceafe;
color: #20324f;
}
.home-page .preview-item-main {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.home-page .preview-item-main i {
color: #5f98e6;
flex-shrink: 0;
}
.home-page .preview-item-text {
display: block;
color: #20324f;
font-size: 0.94rem;
font-weight: 800;
line-height: 1.35;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.home-page .preview-item-actions {
display: flex;
align-items: center;
justify-content: flex-end;
}
.home-page .preview-item-btn {
border: none;
border-radius: 999px;
padding: 8px 13px;
background: linear-gradient(135deg, var(--blue-main), var(--blue-dark));
color: #ffffff;
font-size: 0.82rem;
font-weight: 900;
cursor: pointer;
white-space: nowrap;
box-shadow: 0 8px 16px rgba(95, 152, 230, 0.18);
}
.home-page .preview-item-btn {
transform: translateY(-1px);
}
/* Mobile: 1 cột */
@media (max-width: 991px) {
.home-page {
overflow-y: auto;
}
.home-page .field-preview {
width: calc(100vw - 28px);
height: min(78vh, 720px);
max-height: calc(100vh - 80px);
padding: 18px;
}
.home-page .field-preview-list {
grid-template-columns: 1fr;
}
.home-page .preview-list-item {
grid-template-columns: minmax(0, 1fr) auto;
}
}


