/* Template "Front Office Pro" — khung CV 2 cột (sidebar accent trái + nội dung
   phải). Carve nguyên vẹn từ resume-v3.css (chỉ di chuyển vị trí, không đổi
   nội dung rule) khi tách kiến trúc "chọn/đổi mẫu CV" — xem
   plans/260912-1718-resume-v3-template-picker/phase-02-view-css-dispatch.md.
   Biến CSS (--htj-orange-500, --sec-chip, v.v.) vẫn khai báo ở :root trong
   resume-v3.css (luôn load cùng file này), không lặp lại ở đây. */
.rc-cv-page {
  width: 794px; min-height: 1000px; background: #fff; box-shadow: var(--shadow-md);
  display: flex; align-items: stretch; overflow: hidden;
}
/* .rc-cv-page fixed width: 794px vì view.php render thẳng _preview-panel.php
   trong <main>, KHÔNG có wrapper .rc-page-wrap (flex justify-content:center)
   như bên builder — nên card cố định 794px nằm sát trái, để trống mảng phải
   khi trang PDF rộng hơn 794px. Export mode cần full width thật sự, không
   phải căn giữa — bỏ luôn width cố định để sidebar 30% + nội dung flex:1 giãn
   hết chiều rộng trang. Carve cùng đợt với phần còn lại của .rc-cv-page
   (trước đó nằm ở resume-v3.css, bị bỏ sót lần carve đầu vì selector không
   bắt đầu bằng ".rc-cv-" — code review phát hiện, xem
   plans/260912-1718-resume-v3-template-picker/phase-02-view-css-dispatch.md). */
body.rc-export-mode .rc-cv-page { width: 100%; }
.rc-cv-sidebar {
  width: 30%; flex-shrink: 0; background: var(--htj-orange-500); color: #fff;
  padding: 36px 22px; box-sizing: border-box;
}
.rc-cv-main { flex: 1; min-width: 0; padding: 40px 40px 40px 34px; box-sizing: border-box; }
.rc-cv-header { border-bottom: 2px solid var(--htj-ink-50); padding-bottom: 16px; margin-bottom: 20px; }
.rc-cv-name { font-size: 32px; font-weight: 800; color: var(--htj-ink-900); }
.rc-cv-title { font-size: 16px; color: var(--htj-orange-600); font-weight: 600; margin-top: 4px; }
.rc-cv-contact { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: rgba(255,255,255,.9); margin-bottom: 22px; }
.rc-cv-contact h2 {
  display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700;
  color: #fff; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 10px;
}
.rc-cv-contact-item { display: flex; align-items: center; gap: 8px; }
.rc-cv-contact-item svg { flex-shrink: 0; opacity: .9; }
.rc-cv-section { margin-bottom: 30px; }
.rc-cv-section h2 {
  display: flex; align-items: center; gap: 6px;
  font-size: 16px; font-weight: 700; color: var(--htj-ink-900); text-transform: uppercase;
  letter-spacing: .03em; margin-bottom: 10px;
}
.rc-cv-section-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 8px;
  background: var(--sec-chip); color: var(--htj-orange-600);
}
.rc-cv-section-icon-left {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 8px;
  background: var(--sec-chip-left); color: var(--sec-accent);
}
.rc-cv-section p { font-size: 12.5px; line-height: 1.6; color: var(--htj-ink-700); }
.rc-cv-item { margin-bottom: 12px; }
.rc-cv-item-title { font-size: 15px; font-weight: 700; color: var(--htj-ink-900); }
.rc-cv-item-meta { font-size: 12.5px; color: var(--htj-ink-500); margin-top: 10px; }
.rc-cv-item-meta-dark { color: var(--htj-ink-700); }
.rc-cv-item-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rc-cv-item-date { font-size: 12.5px; color: var(--htj-ink-500); white-space: nowrap; flex-shrink: 0; }
.rc-cv-item-accent { font-size: 14px; font-weight: 700; color: var(--htj-orange-600); margin-top: 2px; }
.rc-cv-lang-item { margin-bottom: 10px; }
.rc-cv-lang-row { display: flex; justify-content: space-between; font-size: 12.5px; color: rgba(255,255,255,.9); margin-bottom: 4px; }
.rc-cv-lang-bar { height: 5px; background: rgba(255,255,255,.3); border-radius: 3px; overflow: hidden; }
.rc-cv-lang-bar-fill { height: 100%; background: #fff; border-radius: 3px; }
.rc-cv-skills { display: flex; flex-wrap: wrap; gap: 7px; }
.rc-cv-skill-chip {
  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-cv-sidebar .rc-cv-section h2 { color: #fff; }
.rc-cv-sidebar .rc-cv-item-title { color: #fff; }
.rc-cv-sidebar .rc-cv-item-meta { color: rgba(255,255,255,.82); }
.rc-cv-sidebar .rc-cv-skill-chip {
  background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4);
}

.rc-cv-avatar-wrap { display: flex; justify-content: center; margin-bottom: 22px; }
.rc-cv-avatar { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.rc-cv-avatar-img, .rc-cv-avatar-initials {
  width: 110px; height: 110px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; object-fit: cover; border: 3px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.22); font-size: 34px; font-weight: 800; color: #fff;
}
.rc-cv-avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: rgba(0,0,0,.45); color: #fff; opacity: 0;
  cursor: pointer; transition: opacity .15s ease;
}
.rc-cv-avatar:hover .rc-cv-avatar-overlay { opacity: 1; }
.rc-cv-avatar-remove {
  position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #fff; background: var(--htj-danger-500); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm, var(--shadow-xs));
}

.rc-cv-avatar-uploading .rc-cv-avatar-img,
.rc-cv-avatar-uploading .rc-cv-avatar-initials { opacity: .35; }
.rc-cv-avatar-uploading .rc-cv-avatar-overlay,
.rc-cv-avatar-uploading .rc-cv-avatar-remove { opacity: 0; pointer-events: none; }
.rc-cv-avatar-uploading::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px;
  margin: -14px 0 0 -14px; border-radius: 50%; border: 3px solid rgba(0,0,0,.15);
  border-top-color: var(--htj-orange-500); animation: rc-spin .7s linear infinite;
}
@keyframes rc-spin { to { transform: rotate(360deg); } }

/* Toggled by toggleFieldInvalid() (resume-v3.js) on the live-canvas mirror of
   a missing required field — same red used by the sidebar's .rc-in-invalid/
   .rc-field-invalid. !important because the mirrored node already carries a
   contextual color rule above (.rc-cv-item-title, .rc-cv-item-accent,
   .rc-cv-sidebar .rc-cv-item-title, ...) that would otherwise win on color
   alone (same 1-class specificity, declared earlier in this file). */
.rc-cv-field-invalid { color: #e11d48 !important; }

/* Toggled by toggleFieldInvalid() (resume-v3.js) on the .rc-cv-item wrapper
   of a repeat-item entry (education/experience/certificate/award/project/
   reference) that still has a missing required field — box-shadow instead
   of border/padding so no layout shift happens when it's added/removed. */
.rc-cv-item-invalid { box-shadow: 0 0 0 1.5px #e11d48; border-radius: var(--radius-md, 6px); }
