:root {
  --brand: #16a34a;
  --brand-dark: #15803d;
  --brand-light: #dcfce7;
  --urgent: #e11d48;
  --urgent-light: #ffe4e6;
  --employer: #d97706;
  --employer-light: #fef3c7;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1a1f2b;
  --muted: #6b7280;
  --border: #e5e8eb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 88px;
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.navbar {
  width: 100%;
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: var(--brand-dark);
}

.navbar .brand {
  justify-self: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.navbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.navbar-actions .divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, .25);
  flex-shrink: 0;
}

.navbar-actions .nav-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.navbar-actions .nav-cta-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .75);
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}

.navbar-actions .btn-outline {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .6);
  white-space: nowrap;
}
.navbar-actions .btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.navbar-actions .btn-solid {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: #fff;
  white-space: nowrap;
}
.navbar-actions .btn-solid:hover { background: var(--brand-light); color: var(--brand-dark); }

/* Identity chip (logged-in) — same avatar+role-badge component reused in navbar-actions
   (desktop dropdown trigger) and at the top of nav-drawer (mobile, static display), so the
   "who's logged in" element looks identical across breakpoints; only the interaction differs. */

.chip-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.chip-greeting {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.chip-role {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.chip-role--candidate { background: var(--brand-light); color: var(--brand-dark); }
.chip-role--employer { background: var(--employer-light); color: var(--employer); }

.identity-chip { position: relative; }
.chip-toggle-input { position: absolute; opacity: 0; pointer-events: none; }

.chip-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}
.chip-trigger:hover { background: rgba(255, 255, 255, .1); }
.chip-trigger--mobile { display: none; }
.chip-caret { color: rgba(255, 255, 255, .8); font-size: 0.75rem; }

.chip-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 149;
  cursor: default;
}
.chip-toggle-input:checked ~ .chip-backdrop { display: block; }

.chip-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 150;
  width: 260px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.identity-chip:hover .chip-menu,
.chip-toggle-input:checked ~ .chip-menu {
  display: flex;
}

.chip-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.chip-menu-header .chip-avatar { background: var(--brand-light); color: var(--brand-dark); }
.chip-menu-header .chip-greeting { color: var(--text); }

.chip-menu-link {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.chip-menu-link:hover { background: var(--brand-light); color: var(--brand-dark); }
.chip-menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.chip-menu-logout-form { display: contents; }
.chip-menu-logout:hover { background: var(--urgent-light); color: var(--urgent); }

/* Mirrors .chip-menu-header visuals at the top of the mobile drawer */
.drawer-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 16px;
}
.drawer-identity .chip-avatar { background: var(--brand-light); color: var(--brand-dark); }
.drawer-identity .chip-greeting { color: var(--text); }

/* Hamburger + off-canvas drawer (holds Viec lam / Dang nhap / Dang xuat) */

.burger {
  justify-self: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  flex-shrink: 0;
}
.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

#nav-toggle { display: none; }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 20, .45);
  z-index: 149;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 82vw);
  background: #fff;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 14px;
  box-shadow: var(--shadow-md);
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.nav-drawer .drawer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--brand-dark);
  padding: 6px 14px 16px;
}
.nav-drawer a, .nav-drawer .link-button {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  background: none;
  border: none;
}
.nav-drawer a:hover, .nav-drawer .link-button:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
}
.nav-drawer .inline-form { display: block; }

#nav-toggle:checked ~ .nav-overlay { display: block; }
#nav-toggle:checked ~ .nav-drawer { transform: translateX(0); }

/* Prominent header search band — shown on every page */

.header-search-band {
  background: linear-gradient(135deg, var(--brand-light) 0%, #fff 65%);
  padding: 16px clamp(16px, 4vw, 48px) 20px;
  border-bottom: 1px solid var(--border);
}

.header-search-form {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  border: 2px solid var(--brand);
  box-shadow: 0 8px 24px rgba(22, 163, 74, .18);
  padding: 4px 4px 4px 18px;
  gap: 6px;
}

.header-search-form .hsf-icon { font-size: 1.05rem; flex-shrink: 0; }

.header-search-form input[type="text"] {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 12px 8px;
  font-size: 0.98rem;
}
.header-search-form input[type="text"]:focus { outline: none; }

.header-search-form .hsf-sep { width: 1px; height: 26px; background: var(--border); flex-shrink: 0; }

.header-search-form select {
  border: none;
  padding: 12px 10px;
  font-size: 0.9rem;
  color: var(--muted);
  background: transparent;
  max-width: 170px;
}
.header-search-form select:focus { outline: none; }

.header-search-form .hsf-submit {
  flex-shrink: 0;
  border: none;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  cursor: pointer;
}
.header-search-form .hsf-submit:hover { filter: brightness(1.05); }

/* Trang chủ: box tìm kiếm 1 dòng, ngôn ngữ tự nhiên (chỉ icon + textarea, không nút) */
.header-search-form--simple { padding: 4px 4px 4px 18px; }

.header-search-form--simple .hsf-textarea {
  flex: 1;
  min-width: 0;
  border: none;
  resize: none;
  overflow: hidden;
  padding: 13px 14px 13px 8px;
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.3;
  height: 46px;
}
.header-search-form--simple .hsf-textarea:focus { outline: none; }
.header-search-form.header-search-form--simple .hsf-icon { order: -1; }
.header-search-form.header-search-form--simple .hsf-textarea { order: 0; }

/* Dãy filter dưới ô search — luôn hiện ở trang chủ (.home-filter-row), chỉ hiện sau khi gõ
   chữ ở các trang khác (.header-search-filters, xem static/js/pv-search.js) */
.header-search-filters,
.home-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.header-search-filters[hidden] { display: none; }
.header-search-filters select,
.home-filter-row select {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.88rem;
}

.location-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.location-picker select { min-width: 150px; }

.popular-keyword-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.85rem;
}
.popular-keyword-chips .pk-label { color: var(--muted); }
.pk-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.pk-chip:hover { border-color: var(--brand); color: var(--brand-dark); }

/* Lịch sử trao đổi trong banner AI search — dùng lại .chat-msg đã có (mục Chat) */
.ai-chat-history {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 4px;
}

/* Bản đồ chọn vị trí (Leaflet/OpenStreetMap) */
.pv-map-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pv-map-modal[hidden] { display: none; }
.pv-map-modal-inner {
  background: #fff;
  border-radius: var(--radius);
  width: min(720px, 100%);
  overflow: hidden;
}
.pv-map-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.pv-map-modal-head p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.pv-map-close {
  border: none;
  background: var(--bg);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}
#pv-map-canvas { height: 420px; width: 100%; }

/* Modal chung (VD: thêm cán bộ tuyển dụng qua AJAX) — cùng khung nhìn với .pv-map-modal
   nhưng dùng backdrop riêng thay vì click-anywhere-to-close trên chính overlay, để tránh
   đóng nhầm khi kéo chọn text trong form. */
.pv-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pv-modal[hidden] { display: none; }
.pv-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.pv-modal-inner {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  width: min(420px, 100%);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.pv-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.pv-modal-close {
  border: none;
  background: var(--bg);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}
.pv-modal-body { padding: 16px; }

/* ---------- Social login buttons (dung o o vuong icon + trong trang login) ---------- */

.social-btn {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
.social-btn:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }

/* ---------- Login page (/accounts/login/) — giong bo cuc ChoiXanhWeb: thanh mau o dau
   the, form Tai khoan/Mat khau, nut chinh, roi den hang nut dang nhap nhanh social ---------- */

.login-page { max-width: 420px; margin: 40px auto 64px; padding: 0 20px; }

.login-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: #fff;
}
.login-card-header {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  padding: 18px 24px;
  font-weight: 700;
  font-size: 1.1rem;
}
.login-card-body { padding: 26px 24px 28px; }

.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-weight: 600; font-size: 0.85rem; margin: 0 0 6px; }
.login-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.login-field input:focus { outline: none; border-color: var(--brand); }
.login-field .errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--urgent); font-size: 0.82rem; }

.login-card .non-field-errors { list-style: none; margin: 0 0 16px; padding: 10px 12px; background: var(--urgent-light); color: var(--urgent); border-radius: var(--radius-sm); font-size: 0.85rem; }

.login-forgot { display: block; text-align: right; font-size: 0.85rem; margin: -8px 0 18px; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 0.8rem;
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.social-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.social-btn-icon {
  flex: 1 1 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
}
.social-btn-icon svg { width: 16px; height: 16px; flex-shrink: 0; }
.social-btn-icon:hover { color: #fff; opacity: .9; }
.social-btn-icon.google { background: #ea4335; }
.social-btn-icon.facebook { background: #1877f2; }
.social-btn-icon.x { background: #000; }
.social-btn-icon.apple { background: #000; }

.login-signup-hint { text-align: center; margin: 18px 0 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- Newsletter signup ---------- */

.newsletter-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px 28px;
}
.newsletter-msg { margin: 0 0 18px; font-size: 1.05rem; }
.newsletter-msg strong { color: var(--brand-dark); }

.newsletter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.newsletter-social { display: flex; flex-direction: column; gap: 10px; }
.newsletter-social-label { font-size: 0.85rem; color: var(--muted); font-style: italic; }
.newsletter-social-btns { display: flex; gap: 8px; }
.newsletter-social-btns .social-btn-icon { flex: 0 0 auto; padding: 10px 18px; }

.newsletter-email-form {
  display: flex;
  align-items: center;
  flex: 1 1 360px;
  max-width: 460px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.newsletter-email-form .nef-icon { padding: 0 12px; color: var(--muted); }
.newsletter-email-form input {
  flex: 1;
  border: none;
  padding: 12px 8px 12px 0;
  font-size: 0.95rem;
  min-width: 0;
}
.newsletter-email-form input:focus { outline: none; }
.newsletter-email-form button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
}
.newsletter-email-form button:hover { background: var(--brand-dark); }
.newsletter-email-form button:disabled { opacity: .6; cursor: default; }
.newsletter-email-form .nef-send { display: inline-block; transform: rotate(90deg); }

.newsletter-feedback { margin: 14px 0 0; font-size: 0.85rem; }
.newsletter-feedback.ok { color: var(--brand-dark); }
.newsletter-feedback.error { color: var(--urgent); }

@media (max-width: 640px) {
  .newsletter-row { flex-direction: column; align-items: stretch; }
  .newsletter-email-form { max-width: none; }
}

/* ---------- Bottom nav (mobile) ---------- */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(16, 24, 40, .08);
  padding: 6px 4px 4px;
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-align: center;
}
.bn-item:hover { color: var(--brand-dark); }
.bn-item svg { width: 22px; height: 22px; }
.bn-fab { margin-top: -22px; color: var(--brand-dark); }
.bn-fab-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(22, 163, 74, .4);
  margin-bottom: 2px;
}
.bn-fab-circle svg { width: 24px; height: 24px; }

/* ---------- Hero text (nay nam chung nhom trang tri voi o tim kiem trong header) ---------- */

.header-hero-text {
  margin: 4px 0 18px;
  color: var(--text);
}

.header-hero-text h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-hero-text .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.inline-stats {
  margin-top: 16px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
}
.inline-stats strong { color: var(--brand-dark); }

.search-form {
  display: flex;
  gap: 8px;
  max-width: 720px;
  background: var(--surface);
  padding: 6px;
  border-radius: var(--radius);
  border: 1.5px solid var(--brand);
}

.search-form input[type="text"] {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  min-width: 0;
}
.search-form input[type="text"]:focus { outline: none; }

.search-form select {
  border: none;
  border-left: 1px solid var(--border);
  padding: 12px 10px;
  font-size: 0.9rem;
  color: var(--muted);
  background: #fff;
  border-radius: 0;
}

.tag-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-links a {
  color: var(--brand-dark);
  background: var(--brand-light);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.tag-links a:hover { background: var(--brand); color: #fff; }
.tag-links a.active { background: var(--brand-dark); color: #fff; }

/* ---------- Sections ---------- */

.section { padding: 48px 0; }
.section.alt { background: var(--surface); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-head h2 { margin: 0; font-size: 1.4rem; }
.section-head a { font-size: 0.9rem; font-weight: 600; }

/* ---------- Category grid ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* The tile - style anh that co chu phu day (photo-caption card), khong co anh that
   nen dung gradient mau xoay vong lam nen thay the, giong bo cuc that cua vieclamtot. */
.category-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, box-shadow .15s;
  color: #fff;
}
.category-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.category-tile .icon {
  font-size: 2.4rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}

.category-tile .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
  text-align: left;
}
.category-tile .name { font-weight: 700; font-size: 0.88rem; color: #fff; line-height: 1.25; }
.category-tile .count { font-size: 0.72rem; color: rgba(255,255,255,.85); margin-top: 2px; }

.category-tile.c0 { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); }
.category-tile.c1 { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.category-tile.c2 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.category-tile.c3 { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.category-tile.c4 { background: linear-gradient(135deg, #0f766e, #2dd4bf); }
.category-tile.c5 { background: linear-gradient(135deg, #be185d, #f472b6); }
.category-tile.c6 { background: linear-gradient(135deg, #334155, #64748b); }
.category-tile.c7 { background: linear-gradient(135deg, #b91c1c, #f87171); }

/* ---------- Job cards ---------- */

.job-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.job-grid .empty-recommend { grid-column: 1 / -1; color: var(--muted); }

/* Chip thuộc tính tin tuyển dụng — 1 kiểu thống nhất cho mọi giá trị dùng để lọc (ngành nghề,
   tỉnh/thành, hình thức, kinh nghiệm, hệ đào tạo, mức lương, kỹ năng, tag). Bấm vào để lọc
   ngay các tin tương tự — .attr-chip--static dùng cho thông tin không phải tiêu chí lọc được. */
.attr-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.attr-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
a.attr-chip:hover { background: var(--brand); color: #fff; }
.attr-chip--static { background: var(--bg); border: 1px solid var(--border); color: var(--muted); cursor: default; }
.attr-chip--salary { background: var(--brand); color: #fff; font-weight: 700; }
a.attr-chip--salary:hover { filter: brightness(1.08); background: var(--brand); }

.job-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: box-shadow .15s, border-color .15s;
  display: flex;
  gap: 14px;
}
.job-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand); }

.job-card .urgent-ribbon {
  position: absolute;
  top: 10px;
  right: -1px;
  background: var(--urgent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px 3px 12px;
  border-radius: 999px 0 0 999px;
  letter-spacing: .02em;
}

.job-card .applicant-count { display: inline-flex; align-items: center; gap: 4px; }

.job-card .logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.job-card .logo.cover-thumb { object-fit: cover; }

.job-card .body { min-width: 0; flex: 1; }

.job-card h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  line-height: 1.35;
}
.job-card h3 a { color: var(--text); }
.job-card h3 a:hover { color: var(--brand-dark); }

.job-card .company { font-size: 0.88rem; color: var(--muted); margin-bottom: 8px; }

.job-card .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.job-card .meta-row span { display: inline-flex; align-items: center; gap: 4px; }

.job-card .salary {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.job-card .bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.job-card .posted { font-size: 0.78rem; color: var(--muted); }

/* ---------- News ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.news-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
  color: var(--text);
}
.news-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand); }

.news-card-thumb {
  aspect-ratio: 16 / 9;
  background: var(--brand-light) center/cover no-repeat;
}
.news-card-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.news-card-body { padding: 14px; }
.news-card-body h3 { margin: 4px 0 6px; font-size: 1rem; line-height: 1.35; }
.news-card-body p { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); }
.news-card-body time { font-size: 0.76rem; color: var(--muted); }

.news-card-category {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
}

.news-detail h1 { margin: 10px 0 6px; }
.news-detail-date { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }
.news-detail-thumb { width: 100%; border-radius: var(--radius); margin-bottom: 16px; }
.news-detail-body { line-height: 1.7; }

@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); color: #fff; }

.btn.secondary {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--brand);
}
.btn.secondary:hover { background: var(--brand-light); }

.btn.block { width: 100%; }
.btn.small { padding: 7px 16px; font-size: 0.85rem; }

.btn:disabled, .btn:disabled:hover {
  background: var(--border);
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* ---------- Messages ---------- */

.messages { list-style: none; padding: 0; margin: 16px 0; }
.messages li {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.9rem;
}
.messages li.error { background: #fee2e2; color: #991b1b; }
.messages li.success { background: #dcfce7; color: #166534; }

/* ---------- Generic page content (search/detail/forms) ---------- */

.page { padding: 32px 0 56px; }
.page h1 { font-size: 1.6rem; margin: 0 0 20px; }

.search-form.advanced {
  flex-wrap: wrap;
  box-shadow: none;
  border: 1px solid var(--border);
}

.filter-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.filter-panel h4, .detail-search-widget h4 { margin: 0 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.filter-panel select, .detail-search-widget select {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  font-size: 0.9rem;
  background: #fff;
}

.result-count { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }

.job-list-column { display: flex; flex-direction: column; gap: 12px; }
.job-list-column .job-card { flex-direction: row; }

/* ---------- Job detail ---------- */

.job-cover-image {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 12px 0 20px;
}

.job-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.share-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-light);
  font-size: 1.1rem;
  text-decoration: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.share-btn:hover { background: var(--brand); }
.share-btn--linkedin { font-weight: 800; font-size: 0.85rem; letter-spacing: -0.02em; color: var(--brand-dark); }

.job-media-item {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #000;
}

.job-media-cell { position: relative; }
.job-media-cover-form { position: absolute; top: 6px; right: 6px; margin: 0; }
.job-media-cover-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.job-media-cover-btn.is-cover { background: #f59e0b; color: #fff; }

.license-pdf-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f3f4f6;
  color: var(--text);
  font-weight: 600;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.detail-main h1 { font-size: 1.5rem; margin-bottom: 6px; }
.detail-main h3 { font-size: 1rem; margin: 22px 0 8px; }

.detail-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  text-align: center;
}
.detail-side-stack { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }
.detail-side-stack .detail-side { position: static; }

.detail-search-widget { text-align: left; padding: 18px; }

.detail-side .logo {
  width: 64px; height: 64px; margin: 0 auto 12px;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.5rem;
}

.related-jobs { display: flex; flex-direction: column; gap: 10px; }

.sidebar-search-results { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.sidebar-search-results .pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 4px; font-size: 0.85rem; color: var(--muted);
}

/* ---------- Chat ---------- */

.chat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 320px;
  margin-bottom: 16px;
}

.chat-msg { margin-bottom: 10px; padding: 10px 14px; border-radius: var(--radius-sm); max-width: 80%; font-size: 0.92rem; }
.chat-msg.user { background: var(--brand); color: #fff; margin-left: auto; }
.chat-msg.assistant { background: var(--bg); }

form.chat-input { display: flex; gap: 8px; }
form.chat-input textarea {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  resize: vertical;
  font-family: inherit;
}

/* ---------- Forms ---------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 440px;
}
.form-card.wide { max-width: 640px; }
.form-card.plain {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: none;
}
.form-card.borderless {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: none;
}
.form-card p { margin: 14px 0; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.92rem;
}
.form-card input[type="checkbox"], .form-card input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
}
.form-card label { font-size: 0.85rem; color: var(--muted); display: block; margin-bottom: 4px; }

/* ---------- Floating label (form nhập liệu chính — resume/company/job/account) ---------- */

.form-card .form-floating:nth-of-type(5n+1) { --field-accent: var(--brand); }
.form-card .form-floating:nth-of-type(5n+2) { --field-accent: #0ea5e9; }
.form-card .form-floating:nth-of-type(5n+3) { --field-accent: #f97316; }
.form-card .form-floating:nth-of-type(5n+4) { --field-accent: #a855f7; }
.form-card .form-floating:nth-of-type(5n+5) { --field-accent: #ec4899; }

.form-floating { position: relative; margin-bottom: 16px; }
.form-floating > input,
.form-floating > select,
.form-floating > textarea {
  width: 100%;
  height: calc(3.3rem + 2px);
  padding: 1.5rem 0.9rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-floating > textarea { height: auto; min-height: 110px; resize: vertical; padding-top: 1.6rem; }
.form-floating > label {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  height: 100%;
  max-width: 100%;
  padding: 1rem 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  color: var(--muted);
  font-size: 0.95rem;
  transform-origin: 0 0;
  transition: opacity .1s ease-in-out, transform .15s ease-in-out, color .15s;
}
.form-floating > select ~ label,
.form-floating > .tag-picker ~ label,
.form-floating > input:focus ~ label,
.form-floating > input:not(:placeholder-shown) ~ label,
.form-floating > textarea:focus ~ label,
.form-floating > textarea:not(:placeholder-shown) ~ label {
  opacity: .8;
  transform: scale(.82) translateY(-.65rem) translateX(.2rem);
}
.form-floating > input:focus ~ label,
.form-floating > textarea:focus ~ label {
  color: var(--field-accent, var(--brand-dark));
  font-weight: 600;
}
.form-floating > input:focus,
.form-floating > select:focus,
.form-floating > textarea:focus {
  border-color: var(--field-accent, var(--brand));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--field-accent, var(--brand)) 18%, transparent);
  outline: none;
}
.form-floating > input::placeholder,
.form-floating > textarea::placeholder { color: transparent; }
.form-card .field-hint { margin: -8px 0 14px; }

/* ---------- Ô tải ảnh kéo-thả (VD: logo công ty) ---------- */

.logo-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: #f3f4f6;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s;
}
.logo-dropzone:hover,
.logo-dropzone.is-dragover { border-color: var(--brand); }
.logo-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.logo-dropzone-empty,
.logo-dropzone-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.logo-dropzone-icon { font-size: 1.8rem; }
.logo-dropzone-hint { margin: 0; color: var(--muted); font-size: 0.88rem; }
.logo-dropzone-preview img { max-height: 96px; max-width: 100%; border-radius: var(--radius-sm); object-fit: contain; }
.logo-dropzone-replace { color: var(--brand-dark); font-weight: 600; font-size: 0.85rem; }

/* Hình đại diện — luôn hiện 1 ảnh (thật hoặc mặc định), khác .logo-dropzone thường (không có
   trạng thái "rỗng" riêng), ảnh cắt tròn để rõ đây là avatar. */
.avatar-dropzone { min-height: auto; padding: 16px; }
.avatar-dropzone .logo-dropzone-preview img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; max-height: none;
}

.avatar-crop-stage {
  display: flex; justify-content: center; margin-bottom: 12px;
  background: #111827; border-radius: var(--radius-sm); overflow: hidden;
}
#avatar-crop-canvas { cursor: grab; touch-action: none; }
#avatar-crop-canvas:active { cursor: grabbing; }
.avatar-crop-zoom { width: 100%; margin-bottom: 12px; }
.avatar-crop-actions { display: flex; gap: 10px; justify-content: flex-end; }

#id-card-section { margin-bottom: 24px; }

/* Khối gộp "dán link HOẶC kéo-thả file" làm 1 (VD: nhập nhanh tin tuyển dụng) — hàng trên là ô
   nhập link bình thường, hàng dưới là vùng kéo-thả file, cùng bọc trong 1 khung viền để đọc
   như 1 khối duy nhất dù về mặt tương tác vẫn là 2 input độc lập. */
.combo-dropzone {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.combo-dropzone.is-dragover { border-color: var(--brand); }
.combo-dropzone-url {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}
.combo-dropzone-url:focus { outline: none; background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.combo-dropzone-zone { position: relative; padding: 18px; text-align: center; background: #f3f4f6; cursor: pointer; }
.combo-dropzone-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.combo-dropzone-hint { display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.combo-dropzone-hint span { font-size: 1.5rem; }
.combo-dropzone-hint p { margin: 0; color: var(--muted); font-size: 0.85rem; }

/* Khoá ô Lương từ/Lương đến khi radio "Lương" chọn "Không" — xem pv-job-salary-toggle.js. */
.salary-field.is-locked { opacity: .5; }
.salary-field.is-locked input { background: var(--bg); cursor: not-allowed; }

/* Nhóm radio dạng thẻ chọn (VD: Địa chỉ trên giấy phép/Địa chỉ khác, Lương Có/Không) — dễ
   trang trí hơn checkbox đơn, dùng :has() để tô thẻ đang chọn (không cần JS riêng). */
.radio-toggle-label { display: block; font-size: 0.85rem; color: var(--muted); margin: 4px 0 8px; }
.radio-toggle-group { display: flex; gap: 10px; margin-bottom: 16px; }
.radio-toggle-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.92rem;
  transition: border-color .15s, background .15s;
}
.radio-toggle-option input[type="radio"] { accent-color: var(--brand); width: 17px; height: 17px; margin: 0; flex-shrink: 0; }
.radio-toggle-option:has(input:checked) { border-color: var(--brand); background: var(--brand-light); font-weight: 600; }

/* Chia form dài (VD: đăng tin) thành từng mục có tiêu đề — dễ đọc/thân thiện hơn 1 danh sách
   field phẳng dài. */
.form-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.form-section-title { margin: 0 0 16px; font-size: 1.05rem; color: var(--brand-dark); }

.brief-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
}

label.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 24px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.terms-checkbox input { margin-top: 3px; flex-shrink: 0; }

/* ---------- Tag picker (autocomplete nhiều giá trị — VD: kỹ năng) ---------- */

.tag-picker { position: relative; margin-bottom: 4px; }
/* Bọc trong .form-floating (VD: Kỹ năng yêu cầu ở employer_job_form.html) — label nổi luôn
   ở trạng thái thu nhỏ như <select> (không dùng :placeholder-shown vì ô gõ có thể trống dù
   đã chọn sẵn vài chip), khung viền chuyển ra ngoài .tag-picker để không bị viền đôi với
   .tag-picker-input bên trong. */
.form-floating > .tag-picker {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1.5rem 0.9rem 0.5rem;
  margin-bottom: 0;
}
.form-floating > .tag-picker .tag-picker-input { border: none; padding: 4px 0; }
.tag-picker-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.tag-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
}
.tag-picker-chip-remove {
  border: none;
  background: transparent;
  color: var(--brand-dark);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.tag-picker-chip-remove:hover { color: var(--urgent); }
.tag-picker-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.92rem;
}
.tag-picker-suggestions,
.addr-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
}
.tag-picker-suggestion,
.addr-suggestion { padding: 8px 12px; font-size: 0.9rem; cursor: pointer; }
.tag-picker-suggestion:hover,
.addr-suggestion:hover { background: var(--brand-light); }
.tag-picker-suggestion--new { color: var(--brand-dark); font-weight: 600; border-top: 1px solid var(--border); }
.school-picker { position: relative; margin-bottom: 4px; }

/* ---------- Form ứng tuyển kiểu soạn email ---------- */

.email-compose-form { max-width: 640px; padding: 0; overflow: hidden; }
.email-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.email-field label { flex: 0 0 90px; margin-bottom: 0; }
.email-field input, .email-field select { flex: 1; border: none; padding: 4px 0; }
.email-field input:focus, .email-field select:focus { outline: none; }
.email-field-value { flex: 1; font-size: 0.92rem; }
.email-field .field-hint { flex: 0 0 auto; font-size: 0.78rem; }
.email-field-body { flex-direction: column; align-items: stretch; border-bottom: none; }
.email-field-body label { margin-bottom: 8px; }
.email-field-body textarea { border: none; padding: 0; resize: vertical; }
.email-compose-form .btn.block { margin: 16px 20px 20px; width: calc(100% - 40px); }

.social-login-list { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.social-login-list a {
  display: block; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; text-align: center; font-weight: 600;
}
.social-login-list a:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ---------- Manage list rows (employer/admin-facing lists) ---------- */

.list-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.list-row h3 { margin: 0 0 6px; font-size: 1rem; }
.list-row .meta-row { margin-bottom: 8px; }
.list-row .actions a { margin-right: 14px; font-weight: 600; font-size: 0.88rem; }

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
}
.link-button:hover { text-decoration: underline; }

/* ---------- Bảng dữ liệu (VD: danh sách nhân sự phụ trách tuyển dụng) ---------- */

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .03em; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table td.text-end, .data-table th.text-end { text-align: right; }
.data-table td.text-center { text-align: center; color: var(--muted); }
.data-table td.text-end a, .data-table td.text-end .inline-form { margin-left: 14px; font-weight: 600; font-size: 0.88rem; }
.data-table td.text-end .inline-form { display: inline; }

/* ---------- Member area (breadcrumb + sidebar) ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb .crumb-sep { color: var(--border); }
.breadcrumb .crumb-current {
  color: var(--text); font-weight: 600;
  margin: 0; font-size: inherit; line-height: inherit; display: inline;
}

.member-nav { display: flex; flex-direction: column; gap: 2px; }
.member-nav-link {
  display: block;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.member-nav-link:hover { background: var(--brand-light); color: var(--brand-dark); }
.member-nav-link.active { background: var(--brand); color: #fff; }
.member-nav-link.active:hover { color: #fff; }

.member-nav-sep { height: 1px; background: var(--border); margin: 8px 4px; }
.member-nav-logout-form { display: contents; }
.member-nav-logout {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--urgent);
}
.member-nav-logout:hover { background: var(--urgent-light); color: var(--urgent); }

.member-content { min-width: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: #10241a;
  color: #cfe8d8;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  padding: 40px 0 24px;
}
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin: 0 0 12px; }
.footer-grid p, .footer-grid a { color: #a8c9b4; font-size: 0.88rem; }
.footer-grid a { display: block; margin-bottom: 6px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 20px;
  text-align: center;
  font-size: 0.8rem;
  color: #8fb69d;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .category-grid, .job-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-layout, .detail-layout { grid-template-columns: 1fr; }
  .filter-panel, .detail-side, .detail-side-stack { position: static; }
  .member-nav { flex-direction: row; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .bottom-nav { display: flex; align-items: flex-end; justify-content: space-around; }
  body { padding-bottom: 68px; }

  .navbar .brand { font-size: 1.05rem; }
  .chip-trigger--desktop { display: none; }
  .chip-trigger--mobile { display: flex; }
  .chip-menu { display: none !important; }
  .navbar-actions .nav-cta.candidate-cta,
  .navbar-actions .divider { display: none; }

  .header-search-form { flex-wrap: wrap; border-radius: var(--radius); padding: 8px; }
  .header-search-form input[type="text"] { flex: 1 1 100%; order: 1; }
  .header-search-form .hsf-icon { order: 1; }
  .header-search-form .hsf-sep { display: none; }
  .header-search-form select { flex: 1 1 auto; order: 2; max-width: none; border-top: 1px solid var(--border); }
  .header-search-form .hsf-submit { flex: 1 1 auto; order: 3; border-radius: var(--radius-sm); }

  .header-search-band { padding-top: 14px; }
  .search-form { flex-direction: column; padding: 10px; }
  .search-form select { border-left: none; border-top: 1px solid var(--border); }

  .category-grid, .job-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .job-card { flex-direction: column; }
  .job-card .posted { margin-left: 0; }

  .footer-grid { grid-template-columns: 1fr; padding: 28px 0 16px; }
}

/* ---------- AI search mode (jobs/job_list.html) ---------- */

.ai-search-banner {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
}
.ai-search-banner.state-ask { border-left-color: var(--brand-dark); }
.ai-search-title { margin: 0 0 4px; font-weight: 700; color: var(--brand-dark); }
.ai-search-question { margin: 0 0 10px; font-style: italic; }
.ai-search-note { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
.ai-search-links { margin: 8px 0 0; font-size: 0.9rem; }
.ai-search-clarify-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.ai-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ai-chip-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ---------- CV có cấu trúc (thiết kế hồ sơ xin việc) ---------- */

.cv-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 16px; }
.cv-title-tag { margin-right: auto; font-weight: 700; color: var(--brand-dark); }

.cv-sheet {
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 48px;
}

.cv-header { text-align: center; border-bottom: 2px solid var(--brand); padding-bottom: 16px; margin-bottom: 20px; }
.cv-header h1 { margin: 0 0 4px; font-size: 1.7rem; }
.cv-headline { margin: 0 0 10px; color: var(--brand-dark); font-weight: 600; }
.cv-contact { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; font-size: 0.88rem; color: var(--muted); }

.cv-section { margin-bottom: 22px; }
.cv-section h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--brand-dark);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.cv-section p { margin: 4px 0 0; font-size: 0.92rem; }

.cv-entry { margin-bottom: 14px; }
.cv-entry:last-child { margin-bottom: 0; }
.cv-entry-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.92rem; }
.cv-entry-dates { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

.cv-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-chip {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------- Danh sách "CV của tôi" (profile_form.html) ---------- */
.cv-list { display: flex; flex-direction: column; gap: 12px; }
.cv-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  transition: box-shadow .15s, border-color .15s;
}
.cv-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand); }
.cv-card.is-default { border-color: var(--brand); }
.cv-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  overflow: hidden;
}
.cv-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.cv-card-body { min-width: 0; flex: 1; }
.cv-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 4px; }
.cv-card-head h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.cv-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-chip-default { display: inline-flex; align-items: center; gap: 3px; }
.cv-card-headline { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
.cv-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.cv-card-actions a,
.cv-card-actions .link-button { display: inline-flex; align-items: center; gap: 4px; }
.link-button-danger { color: var(--urgent); }
.link-button-danger:hover { color: var(--urgent); }

.application-status-form { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.application-status-form select { padding: 7px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ---------- 404 page ---------- */
.error-404-box {
  max-width: 560px;
  text-align: center;
  padding: 40px 20px 8px;
}
.error-404-code {
  font-size: 5.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
}
.error-404-heading { margin: 8px 0 6px; font-size: 1.5rem; }
.error-404-message { color: var(--muted); margin: 0 0 28px; }
.error-404-search-hint { font-weight: 600; margin: 0 0 10px; }
.error-404-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow-sm);
  margin: 0 0 24px;
}
.error-404-search-form .hsf-icon { font-size: 1.05rem; flex-shrink: 0; }
.error-404-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  min-width: 0;
  background: transparent;
  color: var(--text);
}
.error-404-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

@media print {
  .site-header, .bottom-nav, .site-footer, .messages, .no-print { display: none !important; }
  body { padding-bottom: 0 !important; }
  .cv-sheet { border: none; padding: 0; max-width: none; }
}

/* Kiểm duyệt AI — 5 trạng thái luôn hiện đủ, đúng 1 active (xem core/_moderation_badge.html) */
.moderation-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 20px;
}
.moderation-badges-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 4px;
}
.moderation-badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: #fff;
  opacity: 0.55;
}
.moderation-badge.active {
  opacity: 1;
  font-weight: 600;
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(22, 163, 74, 0.08);
}
.moderation-badge.active.is-rejected {
  border-color: var(--urgent);
  color: var(--urgent);
  background: rgba(225, 29, 72, 0.08);
}
/* Mục 7 checklist_resume_edit_form — "làm nổi bật" badge kiểm duyệt trên trang Sửa CV: khung
   viền rõ + đệm rộng hơn quanh khối badge, chữ đậm hơn cho trạng thái active, không đổi CSS gốc
   của .moderation-badges dùng chung ở nơi khác (employer_job_form.html/company_form.html). */
.moderation-badges-prominent {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface, #f8fafc);
  margin: 12px 0 22px;
}
.moderation-badges-prominent .moderation-badges {
  margin: 0;
}
.moderation-badges-prominent .moderation-badge.active {
  font-size: 0.9rem;
  padding: 6px 14px;
}
