/* Hoteljob Resume Builder v3 — self-contained, no shared assets with the main site. */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --htj-orange-500: #F8801F;
  --htj-orange-600: #E66C0C;
  --htj-orange-50: #FFF5EA;
  --htj-orange-200: #FCC893;
  --htj-ink-900: #1A1A1A;
  --htj-ink-700: #3a4150;
  --htj-ink-500: #8a93a3;
  --htj-ink-50: #eceef1;
  --htj-gray-50: #F7F8FA;
  --htj-gray-100: #F1F3F5;
  --htj-gray-200: #E7E9ED;
  --htj-gray-300: #D7DADF;
  --htj-danger-500: #E23D3D;
  --sec-chip: rgba(248,128,31,0.12);
  --sec-chip-left: rgba(255, 255, 255, .2);
  --sec-accent: #fff;

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 999px;
  --shadow-xs: 0 1px 2px rgba(26,26,26,0.05);
  --shadow-md: 0 2px 8px rgba(26,26,26,0.08), 0 1px 3px rgba(26,26,26,0.04);
  --shadow-lg: 0 8px 24px rgba(26,26,26,0.12), 0 2px 6px rgba(26,26,26,0.06);
  --header-h: 60px;
  /* Hàng pill nav (header hàng 2) + bottom bar editor — chỉ có giá trị ≤1080px */
  --mob-views-h: 0px;
  --mobbar-h: 0px;
  /* Be Vietnam Pro not bundled yet — system sans fallback, no external CDN calls. */
  --rc-font: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (max-width: 1080px) {
  :root { --mob-views-h: 44px; --mobbar-h: 62px; }
}

.rc-body {
  font-family: var(--rc-font);
  color: var(--htj-ink-700);
  background: var(--htj-gray-50);
}

.rc-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--htj-gray-200); box-shadow: var(--shadow-xs);
}
.rc-header-inner {
  height: var(--header-h); display: flex; align-items: center; gap: 18px; padding: 0 22px;
}
.rc-logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; text-decoration: none; }
.rc-badge {
  font-size: 13px; font-weight: 800; color: var(--htj-orange-600); background: var(--htj-orange-50);
  padding: 3px 9px; border-radius: var(--radius-full);
}
.rc-header-nav { display: flex; gap: 4px; align-items: center; }
.rc-nav-tab {
  font-size: 13.5px; font-weight: 600; color: var(--htj-ink-500); padding: 8px 14px; border-radius: var(--radius-md); text-decoration: none;
}
.rc-nav-tab { transition: color .15s; }
.rc-nav-tab:hover { color: #f8801f; }
.rc-nav-tab-disabled { cursor: not-allowed; opacity: .55; }
.rc-nav-tab-active { color: var(--htj-orange-600); background: var(--htj-orange-50); }
.rc-header-spacer { flex: 1; }
.rc-save-status { font-size: 12.5px; color: var(--htj-ink-500); }
.rc-header-btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--htj-gray-300); background: #fff;
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--htj-ink-900); padding: 8px 14px;
  border-radius: var(--radius-md); text-decoration: none;
}
.rc-header-btn-primary { border: none; background: var(--htj-orange-500); color: #fff; font-weight: 700; padding: 9px 16px; box-shadow: var(--shadow-brand, 0 4px 12px rgba(248,128,31,.28)); }
.rc-header-btn-disabled { cursor: not-allowed; opacity: .5; }
/* Save-All button disabled while a save request is in flight (see saveAll()
   in resume-v3.js — saveBtn.disabled toggled around the fetch call). */
.rc-header-btn-primary#rc-save-all[disabled] { cursor: not-allowed; opacity: .6; }

/* Cụm user góc phải header: avatar + tên (đã đăng nhập) / nút Đăng nhập (khách) */
.rc-user { position: relative; flex-shrink: 0; }
.rc-user-toggle {
  display: inline-flex; align-items: center; gap: 8px; border: none; background: none; cursor: pointer;
  padding: 4px 8px 4px 4px; border-radius: var(--radius-full); font-size: 13.5px; font-weight: 600; color: var(--htj-ink-900);
}
.rc-user-toggle:hover { background: var(--htj-gray-100); }
.rc-user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.rc-user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-user-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; z-index: 60;
  background: #fff; border: 1px solid var(--htj-gray-200); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 6px;
}
.rc-user-open .rc-user-menu { display: block; }
.rc-user-menu a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 13.5px; color: var(--htj-ink-700); text-decoration: none; }
.rc-user-sep { height: 1px; margin: 6px 4px; background: var(--htj-gray-200); }
.rc-user-menu a.rc-user-logout { display: flex; align-items: center; gap: 8px; color: #b42318; font-weight: 600; }
.rc-user-menu a.rc-user-logout:hover { background: #fdecec; color: #b42318; }
.rc-user-menu a:hover { background: var(--htj-orange-50); color: var(--htj-orange-600); }
@media (max-width: 1080px) { .rc-user-name { display: none; } }

.rc-editor-grid {
  display: grid;
  grid-template-columns: 246px 390px 1fr;
  height: calc(100vh - var(--header-h));
}

/* Editor mobile/tablet (≤1080px, plans/261121-0955-resumev3-mobile-tabbed-
   editor): 3 tab Các mục / Chỉnh sửa / Xem CV — mỗi lúc chỉ hiện 1 trong 3
   cột có sẵn theo data-mob trên #rc-editor-app (resume-v3-mobile-tabs.js đổi
   attr). Canvas ở tab Xem CV chỉ xem + đổi avatar (resume-v3-inline-edit.css
   tắt affordance bằng CSS ở breakpoint này). Cùng chuỗi media query với
   RCMobile.mq trong JS — đổi thì đổi cả hai. */
.rc-mobbar { display: none; }
@media (max-width: 1080px) {
  .rc-editor-grid {
    grid-template-columns: 1fr;
    height: calc(100vh - var(--header-h) - var(--mob-views-h) - var(--mobbar-h) - env(safe-area-inset-bottom));
    height: calc(100dvh - var(--header-h) - var(--mob-views-h) - var(--mobbar-h) - env(safe-area-inset-bottom));
  }
  .rc-editor-grid[data-mob="sections"] .rc-editcol,
  .rc-editor-grid[data-mob="sections"] .rc-page-wrap,
  .rc-editor-grid[data-mob="edit"] .rc-sidebar,
  .rc-editor-grid[data-mob="edit"] .rc-page-wrap,
  .rc-editor-grid[data-mob="preview"] .rc-sidebar,
  .rc-editor-grid[data-mob="preview"] .rc-editcol { display: none; }
  .rc-sidebar, .rc-editcol { border-right: none; padding: 16px; }
  .rc-tab-row { padding: 11px 10px; }
  .rc-tab-label { font-size: 14.5px; }
  /* iOS Safari tự zoom khi focus input < 16px */
  .rc-editcol input, .rc-editcol select, .rc-editcol textarea { font-size: 16px; }

  .rc-mobbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(var(--mobbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--htj-gray-200);
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
  }
  .rc-mobbar-btn {
    flex: 1; border: none; border-top: 2px solid transparent; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 11.5px; font-weight: 600; color: var(--htj-ink-500); padding: 0;
  }
  .rc-mobbar-btn-active { color: var(--htj-orange-600); font-weight: 700; border-top-color: var(--htj-orange-500); }
}

.rc-sidebar {
  background: #fff;
  border-right: 1px solid var(--htj-gray-200);
  overflow-y: auto;
  padding: var(--space-4) var(--space-3);
}
.rc-sidebar-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--htj-ink-500); padding: 4px 8px 10px;
}
.rc-tab-row {
  display: flex; align-items: center; gap: 9px; border: 1px solid transparent;
  background: transparent; cursor: pointer; padding: 9px 10px; border-radius: var(--radius-md);
  margin-bottom: 3px;
}
.rc-tab-active {
  background: var(--htj-orange-50); border-color: var(--htj-orange-200);
}
.rc-tab-drag {
  display: flex; color: var(--htj-ink-500); cursor: grab;
  touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.rc-tab-icon { display: flex; color: var(--htj-ink-500); }
.rc-tab-active .rc-tab-icon { color: var(--htj-orange-600); }
.rc-tab-label {
  flex: 1; font-size: 13.5px; font-weight: 600; color: var(--htj-ink-700);
  white-space: normal; overflow: hidden; text-overflow: ellipsis;
}
.rc-tab-active .rc-tab-label { color: var(--htj-orange-600); }
.rc-tab-eye {
  border: none; background: transparent; cursor: pointer; display: flex;
  color: var(--htj-ink-500); padding: 2px;
}
.rc-tab-eye-hidden { color: var(--htj-gray-300); }
.rc-tab-row-ghost { opacity: .4; }
.rc-tab-row-chosen { background: #fff; box-shadow: var(--shadow-md); }

.rc-editcol {
  background: #fbfbfc;
  border-right: 1px solid var(--htj-gray-200);
  overflow-y: auto;
  padding: 20px 18px;
}
.rc-editcol-header { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.rc-editcol-header h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--htj-ink-900); }
.rc-editcol-icon { display: flex; color: var(--htj-orange-600); }
.rc-editcol-hint { display: none; font-size: 12.5px; color: var(--htj-ink-500); margin: 0 0 16px; line-height: 1.6; }
.rc-editcol-hint-active { display: block; }
.rc-section-panel { display: none; }
.rc-section-panel-active { display: block; }

.rc-field { margin-bottom: 14px; }
.rc-field-row { display: flex; gap: 10px; margin-bottom: 14px; }
.rc-field-row .rc-field { margin-bottom: 0; flex: 1; }
.rc-lb { display: block; font-size: 12px; font-weight: 600; color: var(--htj-ink-500); margin-bottom: 5px; }
.rc-required { color: #e11d48; font-weight: 700; }
.rc-chip-hint { font-weight: 400; color: var(--htj-ink-500); }
.rc-lb-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 8px 0; }
.rc-in {
  width: 100%; border: 1px solid var(--htj-gray-300); border-radius: var(--radius-md);
  padding: 9px 11px; font-size: 14px; font-family: inherit; color: var(--htj-ink-900);
  line-height: 20px;
}
.rc-repeat-item:not(.rc-repeat-item-inline) > .rc-in { margin-bottom: 8px; }
.rc-repeat-item:not(.rc-repeat-item-inline) > .rc-in:last-child { margin-bottom: 0; }
.rc-field-invalid .rc-in,
.rc-field-invalid.rc-chip-picker .rc-chip-add { border-color: #e11d48; }
/* Direct invalid state for repeat-item fields (education, etc.) — these have
   no .rc-field wrapper div, data-required sits on the input/select itself. */
.rc-in-invalid { border-color: #e11d48; }

.rc-chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.rc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; background: var(--htj-orange-50); color: var(--htj-orange-600);
  border: 1px solid var(--htj-orange-200); padding: 5px 10px; border-radius: var(--radius-full);
}
.rc-chip-remove {
  border: none; background: transparent; cursor: pointer; color: var(--htj-orange-600);
  font-size: 14px; line-height: 1; padding: 0;
}
.rc-chip-add[disabled] { opacity: .5; cursor: not-allowed; }

.rc-repeat-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.rc-repeat-item {
  border: 1px solid var(--htj-gray-200); border-radius: var(--radius-lg);
  background: #fff; padding: 13px; box-shadow: var(--shadow-xs);
}
.rc-repeat-item-inline { display: flex; gap: 8px; align-items: center; padding: 8px 10px; }
.rc-repeat-item-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: var(--htj-ink-500); margin-bottom: 10px;
}
.rc-btn-remove-item {
  border: none; background: transparent; cursor: pointer; color: var(--htj-danger-500);
  font-size: 16px; line-height: 1; padding: 2px 6px;
}
/* Item #1 (DOM order, not a fixed record) must always stay — every
   multi-item section always keeps at least one item. attachRemove()'s own
   click-guard (resume-v3.js) is the defense-in-depth backstop. */
.rc-repeat-list > .rc-repeat-item:first-child .rc-btn-remove-item,
.rc-repeat-list > .rc-repeat-item-inline:first-child .rc-btn-remove-item {
  display: none;
}
.rc-btn-add {
  width: 100%; border: 1px dashed var(--htj-gray-300); background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--htj-orange-600); padding: 10px;
  border-radius: var(--radius-md); margin-bottom: 12px;
}
.rc-page-wrap {
  overflow: auto; padding: 34px 20px 60px; display: flex; justify-content: center;
  background: #e7e9ee;
}
/* Khung render CV (.rc-cv-*) đã tách theo template — xem
   assets_2026/resume-v3/templates/{template}.css, đăng ký động theo
   template_id ở layouts/builder.php và layouts/view.php. */

/* Khoảng cách chung giữa dòng tiêu đề/accent của 1 mục (giải thưởng, dự án,
   kinh nghiệm...) và đoạn mô tả ngay bên dưới — template nào cũng để p sát
   dòng trên (không có margin), nhìn dính. Đặt ở đây (không phải từng template)
   vì file này luôn load trước CSS template ở cả editor lẫn view/PDF nên 2 nơi
   luôn giống nhau; các template không đặt margin-top cho p nên không bị ghi đè. */
.rc-cv-item-accent + p,
.rc-cv-item-row + p,
.rc-cv-item-meta + p { margin-top: 10px; }

/* Chuỗi dài không dấu cách (vd "ddddd…") phải tự xuống dòng thay vì tràn khỏi trang —
   áp cho MỌI template (file này load trước CSS template). */
.rc-cv-section p,
.rc-cv-section [data-field],
.rc-cv-item-title,
.rc-cv-item-accent,
.rc-cv-item-meta,
.rc-cv-name,
.rc-cv-title { overflow-wrap: anywhere; }
.rc-cv-item-row > * { min-width: 0; }
.rc-cv-item-row > .rc-cv-item-date { min-width: auto; }

.rc-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--htj-ink-900); color: #fff; font-size: 13px; padding: 12px 18px;
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); z-index: 999;
  opacity: 0; transition: opacity .2s ease;
  /* Multi-section validation messages join lines with \n (see
     formatInvalidSectionsMessage() in resume-v3.js) — pre-line renders those
     as real line breaks while still wrapping/collapsing within each line. */
  max-width: min(420px, calc(100vw - 32px)); white-space: pre-line; text-align: left; line-height: 1.5;
}
.rc-toast-visible { opacity: 1; }
/* formatInvalidSectionsMessage() puts the title ("Bạn cần hoàn thành nhập
   các trường sau:") on its own first line — bold it so it reads as a
   heading above the per-section list instead of blending into it. */
.rc-toast::first-line { font-weight: 600; }

/* Draft-saved indicator — fades in briefly whenever persistDraft() writes to
   localStorage (see showDraftSavedIcon() in resume-v3.js), replacing the
   removed per-section "Lưu" buttons as the save feedback signal. */
.rc-draft-saved-icon {
  display: inline-flex; align-items: center; justify-content: center;
  color: #1a7f3c; opacity: 0; transition: opacity .25s ease;
  flex-shrink: 0;
}
.rc-draft-saved-icon-visible { opacity: 1; }

/* Draft-conflict resolution modal (Phase 4 — restore/discard localStorage
   draft on load). Blocks interaction with the rest of the page until the
   user picks an action (see showDraftConflictModal() in resume-v3.js). */
.rc-draft-modal {
  display: none;
  position: fixed; inset: 0; z-index: 998;
  align-items: center; justify-content: center;
  background: rgba(26,26,26,.45);
}
.rc-draft-modal-visible { display: flex; }
.rc-draft-modal-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  max-width: 420px; width: calc(100% - 40px); padding: 22px;
}
.rc-draft-modal-title { font-size: 16px; font-weight: 800; color: var(--htj-ink-900); margin-bottom: 10px; }
.rc-draft-modal-body { font-size: 13.5px; line-height: 1.6; color: var(--htj-ink-700); margin-bottom: 18px; }
.rc-draft-modal-actions { display: flex; flex-direction: column; gap: 8px; }
.rc-draft-modal-actions .rc-header-btn { width: 100%; justify-content: center; }
/* Body scroll lock while the modal is open (toggled alongside
   .rc-draft-modal-visible in showDraftConflictModal()). */
body.rc-modal-open { overflow: hidden; }

.rc-view-wrap { max-width: 860px; margin: 100px auto 24px; padding: 0 16px; font-family: var(--rc-font); }
/* export mode (Browserless quét PDF, khổ A4) không có header-full nên bỏ
   margin-top dành chỗ cho nav, đồng thời bỏ min-width toàn site
   (style.min.css: body{min-width:992px!important}) và max-width 860px —
   nếu không nội dung bị ép/căn giữa lọt thỏm giữa trang giấy PDF. */
body.rc-export-mode { min-width: 0 !important; width: auto; }
body.rc-export-mode .rc-view-wrap { max-width: 100%; width: 100%; margin: 24px 0; padding: 0 24px; box-sizing: border-box; }
/* Cho phép Chrome (qua Browserless, preferCSSPageSize=true — xem
   Functions::savePdf()) tự co chiều cao trang PDF đúng theo nội dung thay vì
   luôn cố định khổ A4 — tránh trang trắng lem nhem phía dưới khi CV ngắn.
   Chỉ có tác dụng khi thực sự in/xuất PDF (@page không áp dụng lúc xem web
   bình thường), nên an toàn để khai báo không điều kiện ở đây. */
@page { size: 210mm auto; margin: 0; }

.rc-manage-wrap { max-width: 1120px; margin: 24px auto; padding: 0 20px; }
.rc-manage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.rc-manage-head h1 { font-size: 22px; font-weight: 800; color: var(--htj-ink-900); }
.rc-gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.rc-stat-card { background: #fff; border: 1px solid var(--htj-gray-200); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-xs); }
.rc-stat-label { font-size: 12px; color: var(--htj-ink-500); font-weight: 600; }
.rc-stat-value { font-size: 24px; font-weight: 800; color: var(--htj-ink-900); margin-top: 4px; }
.rc-manage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rc-manage-card { background: #fff; border: 1px solid var(--htj-gray-200); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; }
.rc-manage-thumb { position: relative; height: 186px; background: var(--htj-orange-50); overflow: hidden; }
/* Preview SỐNG của hồ sơ — <iframe> trỏ thẳng actionView() (?embed=1, xem
   ResumeV3Controller.php), không sinh/lưu ảnh. Kích thước tự nhiên khớp
   trang A4 (794×1000), co nhỏ bằng transform:scale() tính động ở
   resume-v3-responsive-scale.js theo đúng chiều rộng card thật — không
   hardcode 1 tỉ lệ cố định vì grid responsive đổi số cột theo breakpoint. */
.rc-manage-thumb-iframe { width: 794px; height: 1000px; border: 0; pointer-events: none; transform-origin: top left; }
.rc-manage-primary-badge { position: absolute; top: 10px; left: 10px; font-size: 10.5px; font-weight: 800; color: #8a5a00; background: linear-gradient(90deg,#fff3d6,#ffe4a8); border: 1px solid #f0d492; border-radius: var(--radius-full); padding: 3px 8px; }
.rc-manage-body { padding: 12px 14px; flex: 1; }
.rc-manage-name { font-size: 15px; font-weight: 700; color: var(--htj-ink-900); margin-top: 8px; }
.rc-manage-role { font-size: 12.5px; color: var(--htj-ink-500); margin-top: 2px; }
.rc-manage-meta { font-size: 11.5px; color: var(--htj-ink-500); margin-top: 8px; }
.rc-mstat { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); }
.rc-mstat--ok { background: #e6f6ec; color: #1a7f3c; }
.rc-mstat--wait { background: var(--htj-orange-200); color: var(--htj-orange-600); }
.rc-mstat--hidden { background: var(--htj-gray-100); color: var(--htj-ink-500); }
.rc-manage-name a { color: inherit; text-decoration: none; }
.rc-manage-name a:hover { color: var(--htj-orange-600); }
.rc-manage-footer { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--htj-gray-100); }
.rc-manage-footer-time { font-size: 11.5px; color: var(--htj-ink-500); white-space: nowrap; flex-shrink: 0; }
.rc-manage-footer-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.rc-mbtn { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; padding: 4px 10px; border: 1px solid var(--htj-gray-200); border-radius: var(--radius-md); background: #fff; color: var(--htj-ink-700); cursor: pointer; text-decoration: none; }
.rc-mbtn--icon { width: 28px; height: 28px; padding: 0; }
.rc-mbtn--star { color: var(--htj-ink-500); }
.rc-mbtn--star.is-on { color: #f0a500; border-color: var(--htj-orange-200); }
.rc-mbtn--danger { color: var(--htj-danger-500); }
.rc-mbtn--disabled { opacity: .5; cursor: not-allowed; }
.rc-manage-footer-actions .rc-mbtn--edit { padding: 5px 12px; font-size: 12px; }
.rc-manage-empty { text-align: center; padding: 60px 20px; color: var(--htj-ink-500); }
.rc-manage-empty-icon { font-size: 48px; margin-bottom: 12px; }
.rc-manage-empty p { margin-bottom: 16px; }
@media (max-width: 1080px) {
  .rc-manage-grid { grid-template-columns: 1fr; }
  .rc-gallery-grid { grid-template-columns: 1fr 1fr; }
}

/* Trang chọn mẫu CV toàn màn hình (create.php, GET /tao-ho-so/v3) */
.rc-tpl-page { max-width: none; margin: 0; padding: 0 0 64px; }
.rc-tpl-hero { position: relative; overflow: hidden; background: #fff; border-bottom: 1px solid var(--htj-gray-200); margin-bottom: 0; text-align: left; }
.rc-tpl-hero-glow {
  position: absolute; right: -120px; top: -140px; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, #fff1e3 0%, rgba(255,241,227,0) 70%); pointer-events: none;
}
.rc-tpl-hero-row {
  position: relative; max-width: 1140px; margin: 0 auto; padding: 40px 22px 0;
  display: flex; align-items: flex-end; gap: 24px;
}
.rc-tpl-hero-text { flex: 1 1 0; min-width: 0; padding-bottom: 44px; }
.rc-tpl-hero-pill {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--htj-orange-600); background: var(--htj-orange-50); border: 1px solid var(--htj-orange-200);
  padding: 5px 12px; border-radius: 99px; margin-bottom: 18px;
}
.rc-tpl-hero-title { display: flex; align-items: flex-end; gap: 4px; line-height: 1; margin: 0; }
.rc-tpl-hero-make {
  font-family: 'Roboto Slab', Georgia, serif; font-size: clamp(48px, 5.6vw, 72px); font-weight: 800;
  color: #161b26; white-space: nowrap; letter-spacing: -.01em;
}
.rc-tpl-hero-five {
  position: relative; display: inline-block; padding-right: 40px; margin-left: 10px;
  font-size: clamp(88px, 10vw, 128px); font-weight: 900; line-height: .82; color: var(--htj-orange-500);
}
.rc-tpl-hero-five svg { position: absolute; top: -6px; right: 0; }
.rc-tpl-hero-with {
  font-family: 'Roboto Slab', Georgia, serif; font-size: clamp(28px, 3vw, 38px); font-weight: 400;
  line-height: 1.25; color: #161b26; white-space: nowrap; margin-top: 12px;
}
.rc-tpl-hero-with span { font-weight: 700; background: linear-gradient(transparent 68%, #ffd9b5 68%); }
.rc-tpl-hero-desc { margin: 20px 0 0; font-size: 16px; line-height: 1.65; color: var(--htj-ink-500); max-width: 520px; }
.rc-tpl-hero-img { flex: 0 0 auto; width: clamp(240px, 34vw, 400px); height: auto; display: block; mix-blend-mode: multiply; }

.rc-tpl-form { max-width: none; margin: 0; padding: 0; }
.rc-tpl-content { max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.rc-tpl-toolbar {
  position: sticky; top: calc(var(--header-h) + var(--mob-views-h)); z-index: 5;
  background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--htj-gray-200);
}
.rc-tpl-toolbar-inner { position: relative; max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.rc-tpl-tabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; height: 56px; }
.rc-tpl-tabs::-webkit-scrollbar { display: none; }
.rc-tpl-tabs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--htj-gray-300); border-radius: 50%; background: #fff; color: var(--htj-ink-700);
  cursor: pointer; box-shadow: var(--shadow-sm, 0 2px 6px rgba(26,26,26,.12));
}
.rc-tpl-tabs-arrow[hidden] { display: none; }
.rc-tpl-tabs-arrow:hover { color: var(--htj-orange-600); border-color: var(--htj-orange-200); }
.rc-tpl-tabs-arrow-prev { left: 6px; }
.rc-tpl-tabs-arrow-next { right: 6px; }
.rc-tpl-tab {
  flex-shrink: 0; white-space: nowrap; height: 100%; border: none; border-bottom: 2px solid transparent;
  background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--htj-ink-500);
  padding: 0 12px; transition: color .15s;
}
.rc-tpl-tab:hover { color: var(--htj-ink-900); }
.rc-tpl-tab-active { color: var(--htj-orange-600); font-weight: 700; border-bottom-color: var(--htj-orange-500); }
.rc-tpl-listhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 16px; }
.rc-tpl-count { font-size: 14px; color: var(--htj-ink-500); }
.rc-tpl-count strong { color: var(--htj-ink-900); font-size: 15px; }
.rc-tpl-select-wrap { position: relative; color: var(--htj-ink-500); }
.rc-tpl-select-wrap svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.rc-tpl-select {
  appearance: none; -webkit-appearance: none; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--htj-ink-900);
  background: #fff; border: 1px solid var(--htj-gray-300); border-radius: var(--radius-full);
  padding: 8px 36px 8px 16px; cursor: pointer; outline: none;
}

.rc-tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rc-tpl-card {
  background: #fff; border: 1px solid var(--htj-gray-200); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-xs);
}
.rc-tpl-card-locked { opacity: .55; }

.rc-tpl-thumb-wrap { position: relative; height: 190px; background: var(--htj-gray-50); padding: 16px; }
.rc-tpl-thumb { height: 100%; background: #fff; border-radius: 6px; box-shadow: var(--shadow-xs); overflow: hidden; display: flex; flex-direction: column; }

/* Ảnh preview thật (vlnm-2) thay cho khối màu mô phỏng — object-fit: cover
   để lấp đầy khung bất kể tỉ lệ ảnh gốc, object-position: top vì phần đầu
   trang CV (header/avatar) là chi tiết nhận diện quan trọng nhất. */
.rc-tpl-thumb-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* classic/nophoto: 2 khối chia dọc — cột trái hẹp màu accent, cột phải trắng */
.rc-tpl-thumb-classic, .rc-tpl-thumb-nophoto { flex-direction: row; }
.rc-tpl-thumb-classic::before, .rc-tpl-thumb-nophoto::before { content: ''; display: block; width: 34%; background: var(--tpl-accent); }
.rc-tpl-thumb-classic::after, .rc-tpl-thumb-nophoto::after {
  content: ''; display: block; flex: 1;
  background:
    linear-gradient(var(--htj-gray-200) 8px, transparent 0) 12px 16px / calc(100% - 24px) 8px no-repeat,
    linear-gradient(var(--htj-gray-100) 6px, transparent 0) 12px 32px / 60% 6px no-repeat;
}

/* minimal/basic: 1 khối dọc, vạch mỏng accent (basic bỏ màu, chỉ vạch xám — "chuẩn ATS thuần") */
.rc-tpl-thumb-minimal, .rc-tpl-thumb-basic { padding: 16px; }
.rc-tpl-thumb-minimal::before { content: ''; display: block; width: 40%; height: 3px; background: var(--tpl-accent); }
.rc-tpl-thumb-basic::before { content: ''; display: block; width: 40%; height: 3px; background: var(--htj-gray-300); }

/* creative: dải màu accent nằm ngang ở đầu khối (header band) */
.rc-tpl-thumb-creative { padding: 0; }
.rc-tpl-thumb-creative::before { content: ''; display: block; height: 40px; background: var(--tpl-accent); flex-shrink: 0; }

.rc-tpl-badge {
  position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 700;
  background: var(--htj-orange-600); color: #fff; padding: 3px 9px; border-radius: var(--radius-full);
}
.rc-tpl-locked-badge {
  position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700;
  background: var(--htj-gray-100); color: var(--htj-ink-500); padding: 3px 9px; border-radius: var(--radius-full);
}
.rc-tpl-body { padding: 13px 15px; }
.rc-tpl-body-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rc-tpl-name { font-size: 14px; font-weight: 700; color: var(--htj-ink-900); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-tpl-use-btn {
  border: none; background: none; color: var(--htj-orange-600); cursor: pointer;
  font-size: 12px; font-weight: 700; padding: 0; flex-shrink: 0;
}
.rc-tpl-use-btn:hover { color: var(--htj-orange-500); }
.rc-tpl-pop { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.rc-tpl-pop-bar { flex: 1; height: 4px; background: var(--htj-gray-100); border-radius: 2px; overflow: hidden; }
.rc-tpl-pop-fill { height: 100%; background: var(--htj-orange-500); border-radius: 2px; }
.rc-tpl-pop-text { font-size: 11px; font-weight: 600; color: var(--htj-ink-500); flex-shrink: 0; }
.rc-tpl-empty { text-align: center; padding: 60px 20px; color: var(--htj-ink-500); }

@media (max-width: 1080px) {
  .rc-tpl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .rc-tpl-hero-row { padding-top: 28px; }
  .rc-tpl-hero-text { padding-bottom: 28px; }
  .rc-tpl-hero-img { display: none; }
  .rc-tpl-hero-with { white-space: normal; }
}

/* Quick template switcher — rail nổi trong editor (edit.php) */
.rc-rail {
  position: fixed; top: calc(var(--header-h) + 16px); right: 16px; width: 76px;
  background: #fff; border: 1px solid var(--htj-gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 8px 6px; display: flex; flex-direction: column; gap: 4px;
  z-index: 40;
}
.rc-rail-label {
  font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--htj-ink-500); text-align: center; padding: 2px 0 4px;
}
.rc-rail-btn {
  width: 100%; border: 1px solid var(--htj-gray-200); border-radius: var(--radius-md);
  cursor: pointer; background: #fff; color: var(--htj-ink-900);
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px;
}
.rc-rail-btn:hover { border-color: var(--htj-orange-200); }
.rc-rail-btn span { font-size: 10px; font-weight: 600; }

.rc-theme-popup {
  position: fixed; top: calc(var(--header-h) + 20px); right: 102px; width: 288px;
  max-height: calc(100vh - 90px); overflow-y: auto;
  background: #fff; border: 1px solid var(--htj-gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 16px; z-index: 41;
}
.rc-theme-popup-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rc-theme-popup-title { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--htj-ink-900); }
.rc-theme-popup-icon {
  width: 26px; height: 26px; border-radius: 7px; background: var(--htj-orange-50); color: var(--htj-orange-600);
  display: flex; align-items: center; justify-content: center;
}
.rc-theme-popup-close { border: none; background: transparent; cursor: pointer; color: var(--htj-ink-500); display: flex; }

.rc-qs-label { font-size: 12px; font-weight: 600; color: var(--htj-ink-500); margin-bottom: 5px; }
.rc-qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-qs-card {
  cursor: pointer; border: 1.5px solid var(--htj-gray-200); border-radius: 8px;
  overflow: hidden; background: #fff; padding: 0; text-align: left;
}
.rc-qs-thumb { height: 56px; }
.rc-qs-thumb .rc-tpl-thumb { border-radius: 0; box-shadow: none; }
.rc-qs-name { font-size: 11px; font-weight: 600; color: var(--htj-ink-900); padding: 6px 4px; }
.rc-qs-current-badge {
  display: inline-block; font-size: 9.5px; font-weight: 700; color: var(--htj-orange-600);
  background: var(--htj-orange-50); padding: 1px 5px; border-radius: var(--radius-full); margin-left: 3px;
}
.rc-qs-locked-badge { color: var(--htj-ink-500); background: var(--htj-gray-100); }
.rc-qs-card-locked { opacity: .55; cursor: not-allowed; }
.rc-qs-card-active { border-color: var(--htj-orange-500); border-width: 2px; cursor: default; }
.rc-qs-viewall {
  display: block; margin-top: 12px; width: 100%; border: 1px solid var(--htj-gray-300);
  background: #fff; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--htj-ink-900);
  padding: 9px; border-radius: var(--radius-md); text-align: center; text-decoration: none;
}

/* .rc-rail (quick template switcher) stays visible at every viewport size —
   .rc-theme-popup it opens was dropped from the same hide rule too, since
   keeping the rail clickable while its own popup stayed force-hidden below
   960px would make the button a dead click. */
