/* ==========================================================================
   StudentJob: Interactive CV Builder Styles
   ========================================================================== */

.cv-builder-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem 1.25rem;
}

.cv-top-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cv-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

@media (max-width: 1024px) {
  .cv-builder-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Form Editor */
.cv-editor-panel {
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-width: 0;
  box-sizing: border-box;
}

.cv-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0b264b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.35rem;
  margin-bottom: 0.65rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.55rem;
  min-width: 0;
  box-sizing: border-box;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: -0.01em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.42rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
  min-width: 0;
}

/* Custom Profile Photo Upload Button - Fits perfectly without passing lines */
.cv-photo-upload-box {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cv-photo-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
}

.cv-photo-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  height: 35px;
  padding: 0 0.65rem;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 7px;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cv-photo-upload-box:hover .cv-photo-upload-label,
.cv-photo-file-input:focus+.cv-photo-upload-label {
  background: #1c7bff17;
  border-color: #1c7bff;
  color: #1c7bff;
}

.cv-photo-upload-box.has-file .cv-photo-upload-label {
  background: #f0fdf4;
  border-color: #86efac;
  border-style: solid;
  color: #16a34a;
}

.cv-photo-upload-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact Country Phone Picker in CV Builder */
.cv-editor-panel .sj-phone-group,
.cv-editor-panel .contact-phone-group {
  height: 35px !important;
  min-height: 35px !important;
  border-radius: 7px !important;
  border-color: #cbd5e1 !important;
}

.cv-editor-panel .sj-country-picker-btn,
.cv-editor-panel .contact-country-picker-btn {
  padding: 0 0.55rem !important;
  font-size: 0.8rem !important;
  height: 100% !important;
}

.cv-editor-panel .sj-phone-input,
.cv-editor-panel .contact-phone-input {
  padding: 0 0.65rem !important;
  font-size: 0.85rem !important;
  height: 100% !important;
}

.cv-repeater-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.cv-repeater-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.cv-repeater-card .form-group {
  margin-bottom: 0.45rem;
}

.cv-repeater-card .form-group:last-child {
  margin-bottom: 0;
}

.cv-repeater-card textarea.exp-desc {
  min-height: 46px;
  resize: vertical;
}

#cvInputAbout {
  min-height: 52px;
  resize: vertical;
}

.cv-add-item-btn {
  background: #eff6ff;
  color: var(--color-primary);
  border: 1px dashed var(--color-primary);
  border-radius: 7px;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  width: 100%;
  margin-top: 0.15rem;
  transition: all 0.2s;
}

.cv-add-item-btn:hover {
  background: #dbeafe;
}

/* Right CV Preview Canvas */
.cv-preview-wrapper {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cv-preview-header-bar {
  width: 100%;
  max-width: 794px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
  gap: 0.75rem;
}

.cv-download-pdf-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.cv-download-pdf-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 123, 255, 0.35) !important;
}

.cv-a4-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.cv-a4-preview-toggle input {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary, #1c7bff);
}

.cv-color-palette-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #f8fafc;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.cv-gradient-pill {
  width: 110px;
  height: 26px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #1e1b4b, #2563eb, #06b6d4, #059669, #eab308, #ea580c, #dc2626, #7c3aed);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  border: 2px solid #ffffff;
  outline: 1px solid #cbd5e1;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  flex-shrink: 0;
}

.cv-gradient-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cv-color-swatches {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cv-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  outline: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
  display: inline-block;
}

.cv-swatch:hover {
  transform: scale(1.18);
}

.cv-swatch.active {
  outline: 2px solid #1c7bff;
  outline-offset: 1px;
  transform: scale(1.18);
}

/* Font Size Control Matching Reference Screenshot */
.cv-font-scale-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.2rem 0.35rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  height: 38px;
  box-sizing: border-box;
}

.cv-font-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.cv-font-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cv-font-btn:active {
  transform: scale(0.95);
}

.cv-font-scale-val {
  min-width: 44px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  user-select: none;
}

.cv-canvas {
  --cv-main-color: #2b2e32;
  --cv-font-scale: 1;
  width: 100%;
  max-width: 794px;
  min-height: 1122px;
  background: white;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  transition: all 0.2s ease;
}

.cv-canvas.a4-fixed-preview {
  width: 794px;
  min-height: 1123px;
  box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.cv-canvas,
.cv-canvas * {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Template Visibility & Switching */
.cv-template-1,
.cv-template-2 {
  display: none;
  width: 100%;
  min-height: 1122px;
}

.cv-canvas.template-1 .cv-template-1,
.cv-canvas.active-template-1 .cv-template-1 {
  display: grid;
  grid-template-columns: 250px 1fr;
}

.cv-canvas.template-2 .cv-template-2,
.cv-canvas.active-template-2 .cv-template-2 {
  display: grid;
  grid-template-columns: 265px 1fr;
}

/* Fallback for direct elements if no wrapper */
.cv-canvas.template-1>.cv-sidebar {
  display: flex;
}

.cv-canvas.template-1:not(:has(.cv-template-1)) {
  display: grid;
  grid-template-columns: 250px 1fr;
}

/* Template 1: Two Column Modern Navy */
.cv-template-1 .cv-sidebar,
.cv-canvas.template-1>.cv-sidebar {
  background-color: var(--cv-main-color, #0b264b);
  color: #ffffff;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.cv-template-1 .cv-main,
.cv-canvas.template-1>.cv-main {
  background-color: #ffffff;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.cv-template-1 .cv-main h3,
.cv-template-1 .cv-main .cv-main-section-title {
  color: var(--cv-main-color, #0b264b) !important;
  border-bottom: 1px solid var(--cv-main-color, #1c7bff) !important;
}

/* ==========================================================================
   Template 2: Charcoal Curved Modern (Matching User's Reference)
   ========================================================================== */
.cv-template-2 {
  background: #ffffff;
  color: #2b2e32;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  box-sizing: border-box;
}

.t2-sidebar {
  display: flex;
  flex-direction: column;
  background: #edf0f4;
  min-height: 100%;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Top Dark Header */
.t2-header-dark {
  background: var(--cv-main-color, #2b2e32);
  color: #ffffff;
  padding: 2.5rem 1.25rem 2rem 1.25rem;
  text-align: center;
  position: relative;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  transition: background-color 0.2s ease;
}

.t2-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.15;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.t2-profession {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 3px;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.t2-avatar-wrapper {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.t2-avatar-box {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 10px var(--cv-main-color, #2b2e32);
  overflow: hidden;
  background: #374151;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  transition: box-shadow 0.2s ease;
}

.t2-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Middle Contact Section */
.t2-contact-section {
  background: #edf0f4;
  padding: 2.25rem 1.5rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.t2-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.t2-contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: #374151;
  word-break: break-word;
  font-weight: 500;
}

.t2-contact-item svg {
  flex-shrink: 0;
  color: var(--cv-main-color, #2b2e32);
  transition: color 0.2s ease;
}

/* Bottom Dark Section with Signature Arch */
.t2-bottom-dark {
  background: var(--cv-main-color, #2b2e32);
  color: #ffffff;
  padding: 3rem 1.5rem 2.5rem 1.5rem;
  border-top-right-radius: 120px;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  flex: 1;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  transition: background-color 0.2s ease;
}

/* Section Headings */
.t2-section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.t2-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.t2-badge-dark {
  background: var(--cv-main-color, #2b2e32);
  color: #ffffff;
  transition: background-color 0.2s ease;
}

.t2-badge-light {
  background: #ffffff;
  color: var(--cv-main-color, #2b2e32);
  transition: color 0.2s ease;
}

.t2-heading-text {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cv-main-color, #2b2e32);
  transition: color 0.2s ease;
}

.t2-heading-white {
  color: #ffffff !important;
}

/* Education in Template 2 Sidebar */
.t2-edu-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.t2-edu-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.t2-edu-degree {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.t2-edu-sub {
  font-size: 0.75rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* Languages in Template 2 Sidebar */
.t2-languages-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.t2-language-item {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.t2-language-item::before {
  content: '• ';
  color: #ffffff;
  font-weight: 900;
  margin-right: 2px;
}

/* Right Main Area */
.t2-main {
  background: #ffffff;
  padding: 2.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.t2-about-text {
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.65;
  margin: 0;
}

/* Experience List in Template 2 */
.t2-experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.t2-exp-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.t2-exp-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.t2-exp-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cv-main-color, #2b2e32);
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.t2-exp-dates {
  font-size: 0.8rem;
  color: #4b5563;
  font-weight: 600;
  white-space: nowrap;
}

.t2-exp-company {
  font-size: 0.82rem;
  font-style: italic;
  color: #6b7280;
}

.t2-exp-desc {
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.55;
  margin-top: 0.25rem;
}

/* Skills List with Progress Meters in Template 2 (Interactive & Adjustable) */
.t2-skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.t2-skill-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  transition: all 0.2s ease;
}

.t2-skill-row:hover .t2-skill-inline-del {
  opacity: 1;
  pointer-events: auto;
}

.t2-skill-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cv-main-color, #2b2e32);
  min-width: 110px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.t2-skill-meter {
  flex: 1;
  max-width: 170px;
  height: 9px;
  background: #e2e8f0;
  border-radius: 6px;
  position: relative;
  cursor: ew-resize;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  transition: height 0.15s ease, background 0.15s ease;
  user-select: none;
}

.t2-skill-meter:hover,
.t2-skill-meter.is-dragging {
  height: 12px;
  background: #cbd5e1;
}

.t2-skill-meter::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.t2-skill-meter:hover::after,
.t2-skill-meter.is-dragging::after {
  opacity: 1;
}

.t2-skill-fill {
  height: 100%;
  background: var(--cv-main-color, #2b2e32);
  border-radius: 6px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  pointer-events: none;
  transition: width 0.05s ease, background-color 0.2s ease;
}

.t2-skill-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--cv-main-color, #2b2e32);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.t2-skill-meter:hover .t2-skill-thumb,
.t2-skill-meter.is-dragging .t2-skill-thumb {
  transform: translate(-50%, -50%) scale(1);
}

.t2-skill-inline-del {
  opacity: 0;
  pointer-events: none;
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: -0.5rem;
}

.t2-skill-inline-del:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.15);
}

/* Skills & Languages Form Editor Styles */
.cv-section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.35rem;
  margin-bottom: 0.65rem;
}

.cv-section-title-wrap .cv-section-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.cv-section-clear-btn {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cv-section-clear-btn:hover {
  background: #fecaca;
  color: #dc2626;
  transform: scale(1.04);
}

.cv-skill-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cv-skill-item-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.cv-skill-row-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cv-skill-name-input {
  flex: 1;
  padding: 0.32rem 0.55rem !important;
  border: 1px solid #cbd5e1;
  border-radius: 6px !important;
  font-size: 0.82rem !important;
  font-weight: 600;
  color: #1e293b;
  min-width: 0;
  height: 32px;
}

.cv-skill-name-input:focus {
  border-color: #1c7bff !important;
  outline: none;
}

.cv-item-remove-btn {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.cv-item-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.cv-skill-level-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.cv-skill-level-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.cv-skill-level-slider {
  flex: 1;
  height: 5px;
  accent-color: #1c7bff;
  cursor: pointer;
  margin: 0;
}

.cv-skill-level-val {
  font-size: 0.74rem;
  font-weight: 700;
  color: #1c7bff;
  min-width: 32px;
  text-align: right;
}

/* Language Item Card */
.cv-language-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: border-color 0.2s ease;
}

.cv-language-item-card:hover {
  border-color: #cbd5e1;
}

.cv-language-name-input {
  flex: 1.1;
  padding: 0.32rem 0.55rem !important;
  border: 1px solid #cbd5e1;
  border-radius: 6px !important;
  font-size: 0.82rem !important;
  font-weight: 600;
  color: #1e293b;
  min-width: 0;
  background: #ffffff;
  height: 32px;
}

.cv-language-name-input:focus {
  border-color: #1c7bff !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(28, 123, 255, 0.12);
}

.cv-language-level-select {
  flex: 0 0 135px;
  max-width: 150px;
  min-width: 115px;
  padding: 0.32rem 1.5rem 0.32rem 0.55rem !important;
  border: 1px solid #cbd5e1;
  border-radius: 6px !important;
  font-size: 0.78rem !important;
  font-weight: 600;
  color: #334155;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.5rem center !important;
  background-size: 10px !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  height: 32px;
}

.cv-language-level-select:focus {
  border-color: #1c7bff !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(28, 123, 255, 0.12);
}

@media (max-width: 440px) {
  .cv-language-item-card {
    flex-wrap: wrap;
  }

  .cv-language-level-select {
    flex: 1 1 120px;
    max-width: none;
  }
}

/* Language items hover in preview */
.t2-language-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.t2-language-item .t2-lang-del-btn {
  opacity: 0;
  pointer-events: none;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 3px;
  width: 14px;
  height: 14px;
  font-size: 9px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  margin-left: 2px;
}

.t2-language-item:hover .t2-lang-del-btn {
  opacity: 1;
  pointer-events: auto;
}

@media print {

  .t2-skill-inline-del,
  .t2-lang-del-btn,
  .t2-skill-thumb {
    display: none !important;
  }

  .t2-skill-meter {
    height: 7px !important;
    cursor: default !important;
  }
}

/* Common CV Elements */
.cv-avatar-box {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  background: #334155;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.cv-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  word-break: break-all;
  color: #cbd5e1;
}

.cv-contact-item a {
  color: inherit;
  text-decoration: none;
}

.cv-skill-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin: 0 4px 4px 0;
}

.cv-timeline-item {
  margin-bottom: 1.25rem;
}

.cv-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.cv-item-sub {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.cv-item-desc {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

/* ==========================================================================
   Dynamic Typography Font Scaling Support (--cv-font-scale)
   ========================================================================== */
.t2-name {
  font-size: calc(1.45rem * var(--cv-font-scale, 1)) !important;
}

.t2-profession {
  font-size: calc(0.72rem * var(--cv-font-scale, 1)) !important;
}

.t2-contact-item {
  font-size: calc(0.82rem * var(--cv-font-scale, 1)) !important;
}

.t2-heading-text {
  font-size: calc(0.95rem * var(--cv-font-scale, 1)) !important;
}

.t2-heading-badge {
  font-size: calc(0.85rem * var(--cv-font-scale, 1)) !important;
}

.t2-edu-degree {
  font-size: calc(0.85rem * var(--cv-font-scale, 1)) !important;
}

.t2-edu-sub {
  font-size: calc(0.75rem * var(--cv-font-scale, 1)) !important;
}

.t2-language-item {
  font-size: calc(0.78rem * var(--cv-font-scale, 1)) !important;
}

.t2-about-text {
  font-size: calc(0.88rem * var(--cv-font-scale, 1)) !important;
}

.t2-exp-title {
  font-size: calc(0.95rem * var(--cv-font-scale, 1)) !important;
}

.t2-exp-dates {
  font-size: calc(0.8rem * var(--cv-font-scale, 1)) !important;
}

.t2-exp-company {
  font-size: calc(0.82rem * var(--cv-font-scale, 1)) !important;
}

.t2-exp-desc {
  font-size: calc(0.85rem * var(--cv-font-scale, 1)) !important;
}

.t2-skill-name {
  font-size: calc(0.85rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 #previewNameSidebar {
  font-size: calc(1.25rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 #previewTitleSidebar {
  font-size: calc(0.85rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 .cv-contact-item {
  font-size: calc(0.8rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 .cv-skill-tag {
  font-size: calc(0.75rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 #previewLanguagesSidebar {
  font-size: calc(0.8rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 .cv-main h3 {
  font-size: calc(1.15rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 #previewAbout {
  font-size: calc(0.9rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 .cv-item-title {
  font-size: calc(1rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 .cv-item-sub {
  font-size: calc(0.85rem * var(--cv-font-scale, 1)) !important;
}

.cv-template-1 .cv-item-desc {
  font-size: calc(0.85rem * var(--cv-font-scale, 1)) !important;
}

/* Print Optimization & Exact Color Adjustments */
@page {
  size: A4 portrait;
  margin: 0;
}

@media print {

  /* Enforce exact background colors and graphics on all browsers */
  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body,
  body.admin-bar {
    margin: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: #ffffff !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide everything outside the CV preview canvas (do not hide .admin-bar which is on body!) */
  #wpadminbar,
  .site-header,
  .site-footer,
  header,
  footer,
  .cv-top-toolbar,
  .cv-editor-panel,
  .cv-preview-header-bar,
  .cv-download-pdf-btn,
  #cvDownloadPdfBtn,
  .cv-a4-preview-label,
  .cv-current-color-badge,
  .cv-a4-preview-toggle,
  .sj-onboarding-modal-backdrop,
  .sj-profile-actions,
  .navbar,
  nav {
    display: none !important;
  }

  .cv-builder-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    background: transparent !important;
    display: block !important;
  }

  .cv-builder-grid {
    display: block !important;
    grid-template-columns: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .cv-preview-wrapper {
    position: static !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .cv-canvas {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 297mm !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Template 1 Print Rules */
  .cv-canvas.template-1 .cv-template-1,
  .cv-canvas.active-template-1 .cv-template-1,
  .cv-canvas.template-1:not(:has(.cv-template-1)) {
    display: grid !important;
    grid-template-columns: 260px 1fr !important;
    min-height: 297mm !important;
  }

  .cv-canvas.template-1 .cv-sidebar,
  .cv-template-1 .cv-sidebar {
    background-color: var(--cv-main-color, #0b264b) !important;
    background: var(--cv-main-color, #0b264b) !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    padding: 2.5rem 1.5rem !important;
    min-height: 297mm !important;
    box-sizing: border-box !important;
  }

  .cv-canvas.template-1 .cv-sidebar *,
  .cv-template-1 .cv-sidebar * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cv-canvas.template-1 .cv-main,
  .cv-template-1 .cv-main {
    background-color: #ffffff !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    padding: 2.5rem 2rem !important;
    min-height: 297mm !important;
    box-sizing: border-box !important;
  }

  .cv-canvas.template-1 .cv-main h3,
  .cv-template-1 .cv-main h3,
  .cv-template-1 .cv-main .cv-main-section-title {
    color: var(--cv-main-color, #0b264b) !important;
    border-bottom: 1px solid var(--cv-main-color, #1c7bff) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Template 2 Print Rules (Charcoal Curved Modern) */
  .cv-canvas.template-2 .cv-template-2,
  .cv-canvas.active-template-2 .cv-template-2 {
    display: grid !important;
    grid-template-columns: 265px 1fr !important;
    min-height: 297mm !important;
  }

  .t2-sidebar {
    background: #edf0f4 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .t2-header-dark {
    background: var(--cv-main-color, #2b2e32) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .t2-contact-section {
    background: #edf0f4 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .t2-bottom-dark {
    background: var(--cv-main-color, #2b2e32) !important;
    border-top-right-radius: 120px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .t2-badge-dark {
    background: var(--cv-main-color, #2b2e32) !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cv-template-2 .t2-main .t2-heading-text,
  .cv-template-2 .t2-main .cv-draggable-section .t2-heading-text {
    color: var(--cv-main-color, #2b2e32) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cv-template-2 .t2-main .t2-badge-icon,
  .cv-template-2 .t2-main .cv-draggable-section .t2-badge-icon {
    background: var(--cv-main-color, #2b2e32) !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .t2-badge-light {
    background: #ffffff !important;
    color: var(--cv-main-color, #2b2e32) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .t2-avatar-box {
    border: 4px solid #ffffff !important;
    box-shadow: 0 0 0 10px var(--cv-main-color, #2b2e32) !important;
    background: #374151 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .t2-skill-meter {
    background: #e2e8f0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .t2-skill-fill {
    background: var(--cv-main-color, #2b2e32) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cv-skill-tag {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .cv-avatar-box {
    background: #334155 !important;
    border: 3px solid rgba(255, 255, 255, 0.25) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* =============================================================================
   CV Builder - Interactive Drag and Drop Sections Customizer
   ============================================================================= */

.cv-draggable-section {
  position: relative;
  cursor: grab;
  transition: outline 0.15s ease, background-color 0.2s ease, transform 0.15s ease;
}

.cv-draggable-section:hover {
  outline: 1.5px dashed rgba(28, 123, 255, 0.45);
  outline-offset: 4px;
  border-radius: 6px;
}

.cv-draggable-section.cv-dragging-active {
  opacity: 0.35 !important;
  transform: scale(0.98);
  outline: 2px dashed #1c7bff !important;
}

.cv-section-drag-handle {
  position: absolute;
  top: -11px;
  right: 6px;
  display: none;
  align-items: center;
  gap: 4px;
  background: #0f172a;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 50;
  user-select: none;
  pointer-events: auto;
}

.cv-draggable-section:hover>.cv-section-drag-handle {
  display: inline-flex;
}

.cv-drag-grip-icon {
  cursor: grab;
  font-size: 0.85rem;
  color: #a855f7;
  line-height: 1;
}

.cv-drag-grip-label {
  font-size: 0.68rem;
  color: #e2e8f0;
  margin-right: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cv-section-drag-handle button {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  border-radius: 4px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.68rem;
  padding: 0;
  transition: all 0.15s ease;
}

.cv-section-drag-handle button:hover {
  background: #1c7bff;
  color: #ffffff;
  transform: scale(1.15);
}

.cv-drop-zone {
  position: relative;
  min-height: 80px;
  transition: background-color 0.2s ease;
}

.cv-drop-zone.cv-zone-drag-over {
  background-color: rgba(28, 123, 255, 0.05) !important;
}

.cv-drop-indicator {
  width: 100%;
  height: 3px;
  background: #1c7bff;
  border-radius: 3px;
  margin: 6px 0;
  box-shadow: 0 0 10px rgba(28, 123, 255, 0.8);
  pointer-events: none;
  animation: cvDropIndicatorPulse 1s ease-in-out infinite alternate;
}

@keyframes cvDropIndicatorPulse {
  from {
    opacity: 0.6;
    transform: scaleY(0.9);
  }

  to {
    opacity: 1;
    transform: scaleY(1.4);
  }
}

.cv-dropped-pulse {
  animation: cvDroppedFlash 0.5s ease-out;
}

@keyframes cvDroppedFlash {
  0% {
    background-color: rgba(28, 123, 255, 0.18);
  }

  100% {
    background-color: transparent;
  }
}

/* Template 1 Adaptive Styling: When Sections are in Sidebar */
.cv-template-1 .cv-sidebar .cv-draggable-section {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
}

.cv-template-1 .cv-sidebar .cv-draggable-section h3,
.cv-template-1 .cv-sidebar .cv-draggable-section .cv-sidebar-section-title {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding-bottom: 0.35rem !important;
  margin: 0 0 0.65rem 0 !important;
}

.cv-template-1 .cv-sidebar .cv-draggable-section .cv-item-title {
  color: #ffffff !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
}

.cv-template-1 .cv-sidebar .cv-draggable-section .cv-item-sub {
  color: #93c5fd !important;
  font-size: 0.78rem !important;
}

.cv-template-1 .cv-sidebar .cv-draggable-section .cv-item-desc {
  color: #cbd5e1 !important;
  font-size: 0.75rem !important;
  line-height: 1.4 !important;
}

.cv-template-1 .cv-sidebar .cv-draggable-section p {
  color: #cbd5e1 !important;
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
}

/* Template 1 Adaptive Styling: When Sections are in Main */
.cv-template-1 .cv-main .cv-draggable-section {
  border-top: none !important;
  padding-top: 0 !important;
}

.cv-template-1 .cv-main .cv-draggable-section h3,
.cv-template-1 .cv-main .cv-draggable-section .cv-sidebar-section-title {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: var(--cv-main-color, #0b264b) !important;
  border-bottom: 1px solid var(--cv-main-color, #1c7bff) !important;
  padding-bottom: 0.35rem !important;
  margin: 0 0 1rem 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.cv-template-1 .cv-main .cv-draggable-section .cv-item-title {
  color: #0f172a !important;
  font-size: 1rem !important;
}

.cv-template-1 .cv-main .cv-draggable-section .cv-item-sub {
  color: #64748b !important;
  font-size: 0.85rem !important;
}

.cv-template-1 .cv-main .cv-draggable-section .cv-item-desc {
  color: #475569 !important;
  font-size: 0.85rem !important;
}

.cv-template-1 .cv-main .cv-draggable-section p {
  color: #475569 !important;
  font-size: 0.9rem !important;
}

.cv-template-1 .cv-main .cv-draggable-section .cv-skill-tag {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 6px !important;
}

.cv-template-1 .cv-main .cv-draggable-section #previewLanguagesSidebar {
  color: #334155 !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
}

.cv-template-1 .cv-main .cv-draggable-section .cv-contact-item {
  color: #334155 !important;
  font-size: 0.9rem !important;
}

/* Template 2 Adaptive Styling */
.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-heading-text {
  color: #ffffff !important;
}

.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-badge-icon {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-exp-title,
.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-edu-degree {
  color: #ffffff !important;
  font-size: 0.85rem !important;
}

.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-exp-company,
.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-edu-sub {
  color: #93c5fd !important;
  font-size: 0.78rem !important;
}

.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-exp-desc,
.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-about-text {
  color: #cbd5e1 !important;
  font-size: 0.75rem !important;
}

.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-skill-name {
  color: #ffffff !important;
}

.cv-template-2 .t2-bottom-dark .cv-draggable-section .t2-skill-meter {
  background: rgba(255, 255, 255, 0.2) !important;
}

.cv-template-2 .t2-main .t2-heading-text,
.cv-template-2 .t2-main .cv-draggable-section .t2-heading-text,
.cv-template-2 .t2-main .t2-section-heading .t2-heading-text {
  color: var(--cv-main-color, #2b2e32) !important;
  transition: color 0.2s ease;
}

.cv-template-2 .t2-main .t2-badge-icon,
.cv-template-2 .t2-main .cv-draggable-section .t2-badge-icon,
.cv-template-2 .t2-main .t2-section-heading .t2-badge-icon,
.cv-template-2 .t2-main .t2-badge-dark,
.cv-template-2 .t2-main .t2-badge-light {
  background: var(--cv-main-color, #2b2e32) !important;
  color: #ffffff !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cv-template-2 .t2-main .t2-badge-icon svg,
.cv-template-2 .t2-main .cv-draggable-section .t2-badge-icon svg {
  fill: #ffffff !important;
  color: #ffffff !important;
}

.cv-template-2 .t2-main .cv-draggable-section .t2-edu-degree {
  color: #0f172a !important;
  font-size: 1rem !important;
}

.cv-template-2 .t2-main .cv-draggable-section .t2-edu-sub {
  color: #64748b !important;
  font-size: 0.85rem !important;
}

.cv-template-2 .t2-main .cv-draggable-section .t2-language-item span {
  color: #0f172a !important;
}

/* Section Hide & Visibility Styles */
.cv-draggable-section.cv-section-hidden {
  display: none !important;
}

.cv-section-drag-handle .cv-quick-hide-btn {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #fca5a5 !important;
  width: auto !important;
  height: 18px !important;
  padding: 0 6px !important;
  gap: 3px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.cv-section-drag-handle .cv-quick-hide-btn:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  transform: scale(1.06) !important;
}

/* Hidden Sections Bar (Above Preview Canvas) */
.cv-hidden-sections-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.cv-hidden-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cv-hidden-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.cv-hidden-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

.cv-hidden-chips-container {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cv-unhide-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.cv-unhide-chip:hover {
  background: #1c7bff;
  color: #ffffff;
  border-color: #1c7bff;
  transform: translateY(-1px);
}

.cv-unhide-chip .cv-unhide-plus {
  color: #1c7bff;
  font-weight: 800;
}

.cv-unhide-chip:hover .cv-unhide-plus {
  color: #ffffff;
}

.cv-unhide-all-btn {
  background: transparent;
  border: none;
  color: #1c7bff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  white-space: nowrap;
}

.cv-unhide-all-btn:hover {
  color: #6d28d9;
}

/* Form Visibility Toggle Buttons */
.cv-form-toggle-vis {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 6px;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  user-select: none;
}

.cv-form-toggle-vis:hover {
  border-color: #1c7bff;
  color: #1c7bff;
}

.cv-form-toggle-vis.is-hidden {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.cv-form-toggle-vis.is-hidden:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

/* Save CV Button & Unsaved Dot */
.cv-save-cv-btn {
  padding: 0.5rem 1.25rem !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  background: linear-gradient(135deg, #1c7bff, #6d28d9) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(28, 123, 255, 0.35) !important;
  position: relative !important;
  cursor: pointer !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

.cv-save-cv-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
  box-shadow: 0 6px 18px rgba(28, 123, 255, 0.45) !important;
  transform: translateY(-1px);
}

.cv-save-cv-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.cv-unsaved-dot {
  display: none;
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #ffffff;
  margin-left: 2px;
}

.cv-save-cv-btn.has-unsaved .cv-unsaved-dot {
  display: inline-block;
  animation: cvDotPulse 1.5s infinite;
}

@keyframes cvDotPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }

  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Toast Notice */
.cv-toast-notice {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.cv-toast-notice.show {
  display: inline-flex !important;
  transform: translateY(0);
  opacity: 1;
}

.cv-toast-notice .cv-toast-icon {
  width: 24px;
  height: 24px;
  background: #10b981;
  color: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Unsaved Changes & Auth Modals */
/* ==========================================================================
   Premium Modal Design for Unsaved Changes & Leave Confirmation
   ========================================================================== */
.cv-unsaved-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 99999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem !important;
  animation: cvModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cv-unsaved-modal-overlay.show {
  display: flex !important;
}

.cv-unsaved-modal-card {
  background: #ffffff !important;
  border-radius: 28px !important;
  width: 100% !important;
  max-width: 460px !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  overflow: hidden !important;
  animation: cvModalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 2.25rem 2rem 1.85rem !important;
  position: relative !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.cv-unsaved-modal-close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.cv-unsaved-modal-close:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  transform: rotate(90deg) !important;
}

.cv-unsaved-modal-badge-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 1.25rem !important;
}

.cv-unsaved-modal-badge {
  width: 72px !important;
  height: 72px !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 2px solid #fde68a !important;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2), 0 0 0 8px rgba(254, 243, 199, 0.45) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: cvPulseBadge 2.5s infinite ease-in-out !important;
}

.cv-unsaved-modal-badge.cv-badge-purple {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%) !important;
  border-color: #ddd6fe !important;
  box-shadow: 0 10px 25px rgba(28, 123, 255, 0.2), 0 0 0 8px rgba(237, 233, 254, 0.45) !important;
}

.cv-unsaved-modal-title {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 0.5rem 0 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.02em !important;
}

.cv-unsaved-modal-desc {
  font-size: 0.92rem !important;
  color: #64748b !important;
  line-height: 1.6 !important;
  margin: 0 0 1.75rem 0 !important;
  padding: 0 0.5rem !important;
}

.cv-unsaved-modal-footer {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.65rem !important;
}

.cv-modal-btn {
  padding: 0 1.25rem !important;
  height: 48px !important;
  border-radius: 12px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
}

.cv-modal-save-btn {
  background: linear-gradient(135deg, #1c7bff 0%, #6e27ec 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(28, 123, 255, 0.35) !important;
}

.cv-modal-save-btn:hover {
  background: linear-gradient(135deg, #7c3ff0 0%, #5e1ad8 100%) !important;
  box-shadow: 0 8px 25px rgba(28, 123, 255, 0.45) !important;
  transform: translateY(-1px) !important;
  color: #ffffff !important;
}

.cv-modal-stay-btn {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

.cv-modal-stay-btn:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.cv-modal-leave-btn {
  background: transparent !important;
  color: #ef4444 !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  height: 36px !important;
  margin-top: 2px !important;
}

.cv-modal-leave-btn:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

@keyframes cvModalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes cvModalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes cvPulseBadge {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Print Rules for Drag and Drop, Modals & Hidden Sections */
@media print {

  .cv-section-drag-handle,
  .cv-drop-indicator,
  .cv-reset-layout-btn,
  .cv-hidden-sections-bar,
  .cv-form-toggle-vis,
  .cv-save-cv-btn,
  .cv-unsaved-modal-overlay,
  .cv-toast-notice {
    display: none !important;
  }

  .cv-draggable-section {
    outline: none !important;
    cursor: default !important;
  }
}