/* YouthPlug CV Generator – frontend */
.ypcv-app { max-width: 1100px; margin: 0 auto; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: #0f172a; }
.ypcv-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) {
  .ypcv-layout { grid-template-columns: 1fr; }
}

.ypcv-form-panel, .ypcv-preview-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.ypcv-section-title {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.ypcv-section-title:first-child { margin-top: 0; }

.ypcv-templates { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
.ypcv-template-card {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  margin: 0;
}
.ypcv-template-card:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}
.ypcv-template-body { display: flex; flex-direction: column; gap: 0.15rem; }
.ypcv-template-body small { color: #64748b; font-size: 0.8rem; }

.ypcv-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
@media (max-width: 560px) { .ypcv-grid-2 { grid-template-columns: 1fr; } }

.ypcv-field { margin-bottom: 0.65rem; }
.ypcv-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: #334155; }
.ypcv-field .req { color: #dc2626; }
.ypcv-field input,
.ypcv-field textarea,
.ypcv-field select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.ypcv-field input:focus,
.ypcv-field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.15);
}

.ypcv-repeaters { margin-bottom: 0.5rem; }
.ypcv-repeater-item {
  position: relative;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 2rem 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
  background: #f8fafc;
}
.ypcv-remove-item {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.ypcv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.ypcv-btn-primary,
.ypcv-btn-secondary {
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.ypcv-btn-primary { background: #2563eb; color: #fff; }
.ypcv-btn-primary:hover { background: #1d4ed8; }
.ypcv-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ypcv-btn-secondary { background: #f1f5f9; color: #0f172a; border: 1px solid #e2e8f0; }
.ypcv-btn-secondary:hover { background: #e2e8f0; }

.ypcv-status { min-height: 1.25rem; font-size: 0.85rem; color: #475569; margin: 0.5rem 0 0; }
.ypcv-status.is-error { color: #b91c1c; }
.ypcv-status.is-ok { color: #047857; }

.ypcv-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.ypcv-preview-frame {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  min-height: 420px;
  padding: 1.25rem;
  overflow: auto;
  max-height: 80vh;
}
.ypcv-preview-placeholder { color: #94a3b8; text-align: center; margin-top: 4rem; }

.ypcv-check { display:flex; align-items:flex-start; gap:0.5rem; font-weight:500; cursor:pointer; }
.ypcv-check input { margin-top:0.2rem; }


.ypcv-import-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 1rem 1.1rem 0.75rem;
  margin-bottom: 0.5rem;
}
.ypcv-import-box .ypcv-section-title { margin-top: 0; }
.ypcv-help { font-size: 0.85rem; color: #64748b; margin: 0 0 0.75rem; }
.ypcv-divider { border: none; border-top: 1px solid #e2e8f0; margin: 1rem 0 0.25rem; }
#ypcv-import-status { margin-top: 0.5rem; }
